input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testPublicModifer ( ) { com . thoughtworks . qdox . model . impl . AbstractJavaEntity entity = newAbstractJavaEntity ( ) ; entity . setModifiers ( java . util . Collections . singletonList ( "public" ) ) ; "<AssertPlaceHolder>" ; } isPublic ( ) { return isModifierPresent ( "public" ) ; } | org . junit . Assert . assertTrue ( entity . isPublic ( ) ) |
testRemove ( ) { com . liferay . journal . model . JournalFolder newJournalFolder = addJournalFolder ( ) ; _persistence . remove ( newJournalFolder ) ; com . liferay . journal . model . JournalFolder existingJournalFolder = _persistence . fetchByPrimaryKey ( newJournalFolder . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>... | org . junit . Assert . assertNull ( existingJournalFolder ) |
batchedProxyChainedStyleNoVerisons ( ) { java . lang . String host = "host.com" ; java . lang . String path = ( "/proxy/" + ( DefaultProxyUriManager . CHAINED_PARAMS_TOKEN ) ) + "/path" ; java . util . List < org . apache . shindig . common . uri . Uri > resources = com . google . common . collect . ImmutableList . < o... | org . junit . Assert . assertEquals ( 3 , uris . size ( ) ) |
testGetFamilies ( ) { java . lang . String [ ] expectedFamilies = new java . lang . String [ ] { "Databases<sp>NoSQL/MarkLogic" , "Big<sp>Data/MarkLogic" } ; java . lang . String [ ] actualFamilies = definition . getFamilies ( ) ; "<AssertPlaceHolder>" ; } getFamilies ( ) { return new java . lang . String [ ] { org . t... | org . junit . Assert . assertArrayEquals ( expectedFamilies , actualFamilies ) |
testExtractMinuteTime ( ) { java . lang . String sqlText = ( "select<sp>t,<sp>EXTRACT(MINUTE<sp>FROM<sp>t)<sp>as<sp>\"MINUTE\"<sp>from<sp>" + ( com . splicemachine . derby . utils . SpliceDateFunctionsIT . tableWatcherI ) ) + "<sp>order<sp>by<sp>t" ; try ( com . splicemachine . derby . utils . ResultSet rs = methodWatc... | org . junit . Assert . assertEquals ( ( ( "\n" + sqlText ) + "\n" ) , expected , TestUtils . FormattedResult . ResultFactory . toStringUnsorted ( rs ) ) |
eb14_misdirectedRequest ( ) { try { org . apache . juneau . rest . client . remote . EndToEndInterfaceTest . ieb . misdirectedRequest ( ) ; org . junit . Assert . fail ( ) ; } catch ( org . apache . juneau . rest . client . remote . MisdirectedRequest e ) { "<AssertPlaceHolder>" ; } } getMessage ( ) { return msg ; } | org . junit . Assert . assertEquals ( "foo" , e . getMessage ( ) ) |
testCollect ( ) { rapaio . data . Frame x = rapaio . data . SolidFrame . byVars ( rapaio . data . VarInt . seq ( 10 ) ) ; java . lang . Object [ ] a1 = x . stream ( ) . toArray ( ) ; java . lang . Object [ ] a2 = x . stream ( ) . toArray ( java . lang . Object [ ] :: new ) ; for ( int i = 0 ; i < 10 ; i ++ ) { "<Assert... | org . junit . Assert . assertEquals ( a1 [ i ] , a2 [ i ] ) |
testNullPOJO ( ) { "<AssertPlaceHolder>" ; } mapFrom ( java . lang . Object ) { if ( obj == null ) { return null ; } else { return new io . vertx . core . json . JsonObject ( ( ( io . vertx . core . json . Map < java . lang . String , java . lang . Object > ) ( Json . mapper . convertValue ( obj , io . vertx . core . j... | org . junit . Assert . assertNull ( io . vertx . core . json . JsonObject . mapFrom ( null ) ) |
shouldReplaceIncorrectLabels ( ) { java . util . List < java . lang . String > labels = java . util . Arrays . asList ( "authme" , "wrong" ) ; fr . xephi . authme . command . CommandDescription command = fr . xephi . authme . command . TestCommandsUtil . getCommandWithLabel ( fr . xephi . authme . command . help . Help... | org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . contains ( "authme" , "register" ) ) |
testParseSimpleNoDecimals ( ) { java . lang . String source = "1<sp>+<sp>1i" ; org . hipparchus . complex . Complex expected = new org . hipparchus . complex . Complex ( 1 , 1 ) ; org . hipparchus . complex . Complex actual = complexFormat . parse ( source ) ; "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { ... | org . junit . Assert . assertEquals ( expected , actual ) |
testVirtualShowItemThrowsSetData ( ) { final org . eclipse . swt . widgets . LoggingListener log = new org . eclipse . swt . widgets . LoggingListener ( ) ; tree = new org . eclipse . swt . widgets . Tree ( shell , org . eclipse . swt . SWT . VIRTUAL ) ; tree . setItemCount ( 100 ) ; tree . setSize ( 100 , 100 ) ; tree... | org . junit . Assert . assertTrue ( log . getItems ( ) . contains ( tree . getItem ( 30 ) ) ) |
testRemoveZeroesWhenCpuBecomesNegative ( ) { org . apache . storm . scheduler . resource . normalization . NormalizedResources resources = new org . apache . storm . scheduler . resource . normalization . NormalizedResources ( normalize ( java . util . Collections . singletonMap ( Constants . COMMON_CPU_RESOURCE_NAME ,... | org . junit . Assert . assertThat ( resources . getTotalCpu ( ) , org . hamcrest . CoreMatchers . is ( 0.0 ) ) |
testValidUri1 ( ) { connectionUri = "postgresql://" ; actualConfiguration = io . reactiverse . pgclient . PgConnectOptions . fromUri ( connectionUri ) ; expectedConfiguration = new io . reactiverse . pgclient . PgConnectOptions ( ) ; "<AssertPlaceHolder>" ; } fromUri ( java . lang . String ) { io . vertx . core . json ... | org . junit . Assert . assertEquals ( expectedConfiguration , actualConfiguration ) |
case4 ( ) { org . openstack . atlas . usagerefactor . List < org . openstack . atlas . service . domain . usage . entities . LoadBalancerMergedHostUsage > mergedRecords = usagePollerHelper . processExistingEvents ( lbHostMap ) ; "<AssertPlaceHolder>" ; org . openstack . atlas . usagerefactor . junit . AssertLoadBalance... | org . junit . Assert . assertEquals ( 3 , mergedRecords . size ( ) ) |
happyPathTestCacheEnabled ( ) { java . util . Calendar currentTime = java . util . GregorianCalendar . getInstance ( ) ; currentTime . set ( 2017 , 2 , 5 , 3 , 30 ) ; when ( timeService . getCurrentTime ( ) ) . thenReturn ( currentTime . getTime ( ) ) ; java . util . Calendar currentTimeMinus2Minutes = java . util . Gr... | org . junit . Assert . assertThat ( result . isHealthy ( ) , org . hamcrest . core . Is . is ( true ) ) |
Create3G_test9 ( ) { com . att . aro . core . configuration . pojo . Profile3G profile3g = mock ( com . att . aro . core . configuration . pojo . Profile3G . class ) ; when ( profile3g . getProfileType ( ) ) . thenReturn ( ProfileType . T3G ) ; when ( profile3g . getIdleDchPromoAvg ( ) ) . thenReturn ( 12000.0 ) ; when... | org . junit . Assert . assertEquals ( 1 , testList . size ( ) ) |
testOptionalToStream ( ) { java . util . Optional < java . lang . String > op = java . util . Optional . ofNullable ( "String<sp>value" ) ; java . util . stream . Stream < java . lang . String > strOptionalStream = op . stream ( ) ; java . util . stream . Stream < java . lang . String > filteredStream = strOptionalStre... | org . junit . Assert . assertEquals ( 1 , filteredStream . count ( ) ) |
initJdbcPropertyStore ( ) { org . springframework . jdbc . datasource . embedded . EmbeddedDatabaseBuilder b2 = new org . springframework . jdbc . datasource . embedded . EmbeddedDatabaseBuilder ( ) ; org . springframework . jdbc . datasource . embedded . EmbeddedDatabase db2 = b2 . setType ( EmbeddedDatabaseType . HSQ... | org . junit . Assert . assertNotNull ( jdbcStore2 ) |
testConverter1 ( ) { com . gargoylesoftware . htmlunit . html . HtmlPage page = webClient . getPage ( ( ( webUrl ) + "faces/converter/converter1.xhtml" ) ) ; "<AssertPlaceHolder>" ; } getPage ( java . lang . String ) { lastpage = ( ( com . gargoylesoftware . htmlunit . html . HtmlPage ) ( client . getPage ( getURL ( pa... | org . junit . Assert . assertNotNull ( page ) |
checkTest ( ) { com . navercorp . pinpoint . web . vo . Application application = new com . navercorp . pinpoint . web . vo . Application ( com . navercorp . pinpoint . web . alarm . checker . ErrorCountToCalleCheckerTest . FROM_SERVICE_NAME , com . navercorp . pinpoint . common . trace . ServiceType . STAND_ALONE ) ; ... | org . junit . Assert . assertTrue ( checker . isDetected ( ) ) |
whenRandomDices_0point5_returnsStrategy2 ( ) { com . graphhopper . jsprit . core . algorithm . SearchStrategyManager managerUnderTest = new com . graphhopper . jsprit . core . algorithm . SearchStrategyManager ( ) ; com . graphhopper . jsprit . core . algorithm . SearchStrategy mockedStrategy1 = mock ( com . graphhoppe... | org . junit . Assert . assertThat ( managerUnderTest . getRandomStrategy ( ) , org . hamcrest . CoreMatchers . is ( mockedStrategy2 ) ) |
isActivationAllowed_SuspendedSubscriptionNoPaymentEnabled ( ) { subscription . setStatus ( SubscriptionStatus . SUSPENDED ) ; subscription . setBillingContact ( null ) ; subscription . setPaymentInfo ( pInfo ) ; doReturn ( false ) . when ( accService ) . isPaymentTypeEnabled ( org . oscm . subscriptionservice . bean . ... | org . junit . Assert . assertFalse ( isActivationAllowed ) |
testUpdateBatchKeeperActive ( ) { for ( com . ctrip . xpipe . redis . console . model . RedisTbl redisTbl : redises ) { redisTbl . setKeeperActive ( ( ! ( redisTbl . isKeeperActive ( ) ) ) ) ; } redisDao . updateBatchKeeperActive ( redises ) ; for ( com . ctrip . xpipe . redis . console . model . RedisTbl redisTbl : re... | org . junit . Assert . assertEquals ( redisTbl . isKeeperActive ( ) , byPK . isKeeperActive ( ) ) |
testBasic_OrderFail ( ) { restrictions = in . cubestack . android . lib . storm . criteria . StormRestrictions . restrictionsFor ( in . cubestack . apps . android . storm . entitites . RestrictionTestEntity . class ) ; "<AssertPlaceHolder>" ; in . cubestack . android . lib . storm . criteria . Restriction res = restric... | org . junit . Assert . assertNotNull ( restrictions ) |
cache_remains_active_on_server_on_client_close ( ) { org . terracotta . management . entity . sample . client . CacheFactory cacheFactory = new org . terracotta . management . entity . sample . client . CacheFactory ( java . net . URI . create ( "passthrough://stripe-1:9510" ) , "cat-clinic" ) ; cacheFactory . init ( )... | org . junit . Assert . assertThat ( cache . get ( "client1" ) , org . hamcrest . CoreMatchers . equalTo ( "Mat" ) ) |
testOriginalMultipleCalls ( ) { byte [ ] fileID1 = fileIDGenerator . getUpdatedFileID ( ) ; byte [ ] fileID2 = fileIDGenerator . getUpdatedFileID ( ) ; "<AssertPlaceHolder>" ; } getUpdatedFileID ( ) { return fixedFileID ; } | org . junit . Assert . assertTrue ( java . util . Arrays . equals ( fileID1 , fileID2 ) ) |
testInSimpleAsArray ( ) { java . util . List < java . lang . String > items = new java . util . LinkedList ( ) ; java . lang . String expected = "swift<sp>in<sp>(" ; int i = 0 ; int inBlockSize = config . getInt ( DatabaseConfigFactory . IN_OPERATOR_BLOCK_SIZE ) ; for ( ; i < ( inBlockSize - 1 ) ; i ++ ) { expected += ... | org . junit . Assert . assertEquals ( expected , ie . toString ( ) ) |
testSaml2TokenHOKConfig ( ) { org . apache . cxf . service . Service service = createService ( ) ; java . util . Map < java . lang . String , java . lang . Object > inProperties = new java . util . HashMap ( ) ; inProperties . put ( ConfigurationConstants . ACTION , ( ( ( org . apache . wss4j . common . ConfigurationCo... | org . junit . Assert . assertEquals ( "test" , echo . echo ( "test" ) ) |
testConstructor ( ) { org . pentaho . platform . plugin . services . importexport . exportManifest . bindings . CronJobTrigger trigger = new org . pentaho . platform . plugin . services . importexport . exportManifest . bindings . CronJobTrigger ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( trigger ) |
shouldGetFromSpecifiedLifecycleId ( ) { given ( this . lifecycleFactory . getLifecycle ( "example" ) ) . willReturn ( this . lifecycle ) ; this . lifecycleAccessor . setServletContext ( this . servletContext ) ; this . lifecycleAccessor . setLifecycleId ( "example" ) ; javax . faces . lifecycle . Lifecycle actual = thi... | org . junit . Assert . assertThat ( actual , org . hamcrest . Matchers . is ( this . lifecycle ) ) |
testQueueLarge ( ) { int count = 1000 ; for ( int i = 1 ; i <= count ; i ++ ) { com . huffingtonpost . chronos . model . JobSpec aJob = com . huffingtonpost . chronos . model . TestAgent . getTestJob ( "Vincent<sp>Van<sp>Gogh" , dao ) ; long id = dao . createJob ( aJob ) ; aJob = dao . getJob ( id ) ; com . huffingtonp... | org . junit . Assert . assertEquals ( count , dao . getQueue ( null ) . size ( ) ) |
shouldNotFailWithAValidProject ( ) { org . apache . maven . project . MavenProject mp1 = createProjectParent ( ) ; org . apache . maven . project . MavenProject mp2 = createProjectChild1 ( mp1 ) ; org . apache . maven . project . MavenProject mp3 = createProjectChild2 ( mp1 ) ; java . util . List < org . apache . maven... | org . junit . Assert . assertTrue ( true ) |
getPass ( ) { java . lang . String result = encryptor . encrypt ( "root" ) ; System . out . println ( ( result + "----------------" ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( ( ( result . length ( ) ) > 0 ) ) |
matches ( ) { "<AssertPlaceHolder>" ; } status ( int ) { return new simplehttp . matchers . HttpResponseStatusCodeMatcher ( expected ) ; } | org . junit . Assert . assertThat ( simplehttp . matchers . HttpResponseStatusCodeMatcher . status ( 200 ) . matches ( response ) , is ( true ) ) |
testGetParameterStringBooleanIntString ( ) { org . owasp . esapi . filters . SecurityWrapperRequestTest . ValidatorTestContainer validatorTester = new org . owasp . esapi . filters . SecurityWrapperRequestTest . ValidatorTestContainer ( mockValidator ) ; validatorTester . getValidInputReturns ( testValueCanonical ) ; o... | org . junit . Assert . assertEquals ( testValueCanonical , rval ) |
testMillisSerialization ( ) { com . owlike . genson . Genson genson = createTimestampGenson ( java . time . OffsetDateTime . class , TimestampFormat . MILLIS ) ; java . lang . Long millis = 4534654564653L ; java . time . OffsetDateTime dt = java . time . OffsetDateTime . ofInstant ( java . time . Instant . ofEpochMilli... | org . junit . Assert . assertEquals ( millis . toString ( ) , genson . serialize ( dt ) ) |
shutdownDuringCompactingSplitting ( ) { try ( org . apache . accumulo . core . client . AccumuloClient c = org . apache . accumulo . core . client . Accumulo . newClient ( ) . from ( getClientProps ( ) ) . build ( ) ) { java . lang . String tableName = getUniqueNames ( 1 ) [ 0 ] ; org . apache . accumulo . test . Verif... | org . junit . Assert . assertNotNull ( splitThreshold ) |
testGetAreaAtUL ( ) { when ( lienzoLayer . getLienzoLayer ( ) . getLayer ( ) . findShapeAtPoint ( eq ( 20 ) , eq ( 20 ) ) ) . thenReturn ( shape ) ; org . kie . workbench . common . stunner . core . graph . Node < org . kie . workbench . common . stunner . core . graph . content . view . View < ? > , org . kie . workbe... | org . junit . Assert . assertNotNull ( node ) |
testReplaceGivenServerContextRoot ( ) { java . lang . String actual = flex . messaging . util . SettingsReplaceUtil . replaceAllTokensGivenServerName ( "http://{server.name}:{server.port}/{context.root}/foo.mxml" , "/dev" , "10.1.1.1" , "80" , "http" ) ; java . lang . String expected = "http://10.1.1.1:80/dev/foo.mxml"... | org . junit . Assert . assertEquals ( expected , actual ) |
testMissingAfterSecondLast ( ) { System . out . println ( "binarySearch" ) ; int [ ] index = new int [ ] { 10 , 13 , 15 , 17 , 19 } ; int key = 18 ; int begin = 0 ; int end = 5 ; int expResult = - 5 ; int result = org . genemania . engine . matricks . Utils . myBinarySearch ( index , key , begin , end ) ; "<AssertPlace... | org . junit . Assert . assertEquals ( expResult , result ) |
noAnnotationReturnsNull ( ) { javax . ws . rs . ext . ParamConverter < java . lang . String > converter = provider . getConverter ( java . lang . String . class , java . lang . String . class , new java . lang . annotation . Annotation [ 0 ] ) ; "<AssertPlaceHolder>" ; } getConverter ( java . lang . Class , java . lang... | org . junit . Assert . assertNull ( converter ) |
maximumPacketLengthForInboundUnsequencedData ( ) { java . lang . String message = repeat ( 'X' , com . paritytrading . nassau . soupbintcp . SoupBinTCPSessionTest . MAX_RX_PAYLOAD_LENGTH ) ; client . send ( wrap ( message ) ) ; while ( ( serverMessages . collect ( ) . size ( ) ) != 1 ) server . receive ( ) ; "<AssertPl... | org . junit . Assert . assertEquals ( asList ( message ) , serverMessages . collect ( ) ) |
testOrOnEmptyOptionalAndEmptySupplierOptional ( ) { final com . annimon . stream . OptionalDouble optional = com . annimon . stream . OptionalDouble . empty ( ) . or ( new com . annimon . stream . function . Supplier < com . annimon . stream . OptionalDouble > ( ) { @ com . annimon . stream . Override public com . anni... | org . junit . Assert . assertThat ( optional , isEmpty ( ) ) |
startProcess ( ) { org . activiti . engine . RepositoryService repositoryService = activitiRule . getRepositoryService ( ) ; repositoryService . createDeployment ( ) . addInputStream ( "process1.bpmn20.xml" , new java . io . FileInputStream ( filename ) ) . deploy ( ) ; org . activiti . engine . RuntimeService runtimeS... | org . junit . Assert . assertNotNull ( processInstance . getId ( ) ) |
testEvaluationAdjacent1 ( ) { java . lang . String query = buildFunction ( ContentFunctions . CONTENT_ADJACENT_FUNCTION_NAME , Constants . TERM_OFFSET_MAP_JEXL_VARIABLE_NAME , "'dog'" , "'cat'" ) ; org . apache . commons . jexl2 . Expression expr = datawave . query . jexl . functions . ContentFunctionsTest . engine . c... | org . junit . Assert . assertTrue ( datawave . query . jexl . functions . ContentFunctionsTest . expect ( o , true ) ) |
shouldNotEnableClusteringIfMissingDocument ( ) { org . modeshape . jcr . RepositoryConfiguration config = org . modeshape . jcr . RepositoryConfiguration . read ( "{<sp>'name'<sp>=<sp>'nm',<sp>'storage'<sp>:<sp>{}}" ) ; org . modeshape . jcr . RepositoryConfiguration . Clustering clusteringConfiguration = config . getC... | org . junit . Assert . assertFalse ( clusteringConfiguration . isEnabled ( ) ) |
purgeEncounterType_shouldThrowErrorWhenTryingToDeleteEncounterTypeWhenEncounterTypesAreLocked ( ) { org . openmrs . api . EncounterService encounterService = org . openmrs . api . context . Context . getEncounterService ( ) ; org . openmrs . EncounterType encounterType = org . openmrs . api . context . Context . getEnc... | org . junit . Assert . assertNotNull ( encounterType ) |
testValidFile_doesntExist ( ) { when ( file . isFile ( ) ) . thenReturn ( Boolean . FALSE ) ; when ( file . exists ( ) ) . thenReturn ( Boolean . FALSE ) ; org . sejda . model . output . FileOrDirectoryTaskOutput instance = new org . sejda . model . output . FileOrDirectoryTaskOutput ( file ) ; "<AssertPlaceHolder>" ; ... | org . junit . Assert . assertNotNull ( instance ) |
testGetAudioFolders ( ) { net . holmes . core . backend . manager . BackendManager backendManager = createMock ( net . holmes . core . backend . manager . BackendManager . class ) ; expect ( backendManager . getFolders ( net . holmes . core . backend . handler . AUDIO ) ) . andReturn ( newArrayList ( new net . holmes .... | org . junit . Assert . assertNotNull ( audioFoldersHandler . getAudioFolders ( ) ) |
testMatchesIsoCompatibleProprietaryCommandApdu_20800ProprietarySm ( ) { byte [ ] apdu = de . persosim . simulator . utils . HexString . toByteArray ( "8C208000" ) ; boolean result = de . persosim . simulator . apdu . CommandApduFactory . matchesIsoCompatibleProprietaryCommandApdu ( apdu ) ; "<AssertPlaceHolder>" ; } ma... | org . junit . Assert . assertTrue ( result ) |
multipleViews ( ) { java . lang . String xml = ( ( ( ( "<Preload<sp>href='" + ( org . apache . shindig . gadgets . spec . PreloadTest . HREF ) ) + '\'' ) + "<sp>views='" ) + ( org . apache . commons . lang . StringUtils . join ( org . apache . shindig . gadgets . spec . PreloadTest . VIEWS , ',' ) ) ) + "'/>" ; org . a... | org . junit . Assert . assertEquals ( org . apache . shindig . gadgets . spec . PreloadTest . VIEWS , preload . getViews ( ) ) |
delete ( ) { todoRepository . deleteById ( 101L ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 2 , todoRepository . count ( ) ) |
testDeviceCloudStatusEnumValues ( ) { for ( com . digi . xbee . api . models . DeviceCloudStatus status : dcStatuses ) "<AssertPlaceHolder>" ; } getID ( ) { return id ; } | org . junit . Assert . assertTrue ( ( ( status . getID ( ) ) >= 0 ) ) |
$and_logical_expression_returns_true_when_all_expressions_true ( ) { com . redhat . lightblue . query . QueryExpression q = com . redhat . lightblue . eval . EvalTestContext . queryExpressionFromJson ( "{'$and':<sp>[<sp>{'field':'field3','op':'$gt','rvalue':2},{'field':'field7.0.elemf1','op':'$eq','rvalue':'elvalue0_1'... | org . junit . Assert . assertTrue ( ctx . getResult ( ) ) |
testVersion ( ) { com . sap . core . odata . ref . model . Room room1 = new com . sap . core . odata . ref . model . Room ( 1 , null ) ; room1 . setVersion ( com . sap . core . odata . ref . model . RoomTest . VALUE_VERSION_NR ) ; "<AssertPlaceHolder>" ; } getVersion ( ) { return com . sap . core . odata . api . ODataS... | org . junit . Assert . assertEquals ( com . sap . core . odata . ref . model . RoomTest . VALUE_VERSION_NR , room1 . getVersion ( ) ) |
testColumnDescList ( ) { org . seasar . extension . jdbc . EntityMeta entityMeta = entityMetaFactory . getEntityMeta ( org . seasar . extension . jdbc . gen . internal . desc . TableDescFactoryImplTest . Aaa . class ) ; org . seasar . extension . jdbc . gen . desc . TableDesc tableDesc = tableDescFactory . getTableDesc... | org . junit . Assert . assertEquals ( 2 , tableDesc . getColumnDescList ( ) . size ( ) ) |
testImportTemplateInGroupFileFromDir ( ) { java . lang . String dir = getRandomDir ( ) ; writeFile ( dir , "x/a.st" , "a()<sp>::=<sp><<<sp><b()><sp>>>" ) ; java . lang . String groupFile = "b()<sp>::=<sp>\"group<sp>file<sp>b\"\n" + "c()<sp>::=<sp>\"group<sp>file<sp>c\"\n" ; writeFile ( dir , "y/group.stg" , groupFile )... | org . junit . Assert . assertEquals ( expected , result ) |
testConstantSetStrokeColor ( ) { org . orbisgis . coremap . renderer . se . AreaSymbolizer ls = getConstantSymbolizer ( ) ; org . orbisgis . legend . thematic . constant . UniqueSymbolArea usl = new org . orbisgis . legend . thematic . constant . UniqueSymbolArea ( ls ) ; usl . setLineColor ( Color . red ) ; "<AssertPl... | org . junit . Assert . assertTrue ( usl . getLineColor ( ) . equals ( Color . red ) ) |
shouldConvertLongToEntityAttribute ( ) { com . olacabs . fabric . manager . converter . JsonListConverter converter = new com . olacabs . fabric . manager . converter . JsonListConverter ( ) ; java . util . List list = converter . convertToEntityAttribute ( "[1,2]" ) ; "<AssertPlaceHolder>" ; } convertToEntityAttribute... | org . junit . Assert . assertEquals ( list . size ( ) , 2 ) |
testCardinality ( ) { int size = 1033 ; edu . ucla . sspace . util . SparseIntArray arr = new edu . ucla . sspace . util . SparseIntArray ( ) ; for ( int i = 1 ; i < size ; ++ i ) { arr . set ( i , i ) ; "<AssertPlaceHolder>" ; } } cardinality ( ) { return indices . length ; } | org . junit . Assert . assertEquals ( i , arr . cardinality ( ) ) |
metadata_xmlComplexTypePropertyComplexTypefalse ( ) { final java . lang . String entryName = "bar/90_contents/odatacol1/00_$metadata.xml" ; final java . lang . String filename = "/00_$metadata_compprop_type_circular_ref.xml" ; java . net . URL fileUrl = java . lang . ClassLoader . getSystemResource ( ( ( com . fujitsu ... | org . junit . Assert . assertFalse ( res ) |
testResourcesMissingOnlyFrenchLabelsCount ( ) { java . util . Map < org . eclipse . rdf4j . model . Resource , java . util . Collection < java . lang . String > > incompleteLangCoverage = incompleteLanguageCoverage . getResult ( ) . getData ( ) ; java . util . List < org . eclipse . rdf4j . model . Value > foundResourc... | org . junit . Assert . assertEquals ( 2 , foundResources . size ( ) ) |
wildcard_name_pattern_matches_part_of_name ( ) { gherkin . events . PickleEvent pickleEvent = createPickleWithName ( "a<sp>pickleEvent<sp>name" ) ; cucumber . runtime . filter . NamePredicate predicate = new cucumber . runtime . filter . NamePredicate ( asList ( java . util . regex . Pattern . compile ( "a<sp>.*<sp>nam... | org . junit . Assert . assertTrue ( predicate . apply ( pickleEvent ) ) |
testParseNoTimeTrackingInfo ( ) { final com . atlassian . jira . rest . client . api . domain . Issue issue = parseIssue ( "/json/issue/valid-unassigned-no-time-tracking.json" ) ; "<AssertPlaceHolder>" ; } getTimeTracking ( ) { return timeTracking ; } | org . junit . Assert . assertNull ( issue . getTimeTracking ( ) ) |
deveObterDataOcorrenciaBaixaComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . cadastro . NFRetornoConsultaCadastroSituacaoCadastral retorno = new com . fincatto . documentofiscal . nfe310 . classes . cadastro . NFRetornoConsultaCadastroSituacaoCadastral ( ) ; final java . time . LocalDate ... | org . junit . Assert . assertEquals ( dataOcorrenciaBaixa , retorno . getDataOcorrenciaBaixa ( ) ) |
setProtocolSetsProtocol ( ) { tests . unit . com . microsoft . azure . sdk . iot . device . DeviceClientConfig config = tests . unit . com . microsoft . azure . sdk . iot . device . Deencapsulation . newInstance ( tests . unit . com . microsoft . azure . sdk . iot . device . DeviceClientConfig . class , mockIotHubConne... | org . junit . Assert . assertEquals ( IotHubClientProtocol . AMQPS , savedProtocol ) |
testRemoveCell ( ) { org . apache . poi . hssf . record . BlankRecord blankRecord1 = org . apache . poi . hssf . record . aggregates . TestValueRecordsAggregate . newBlankRecord ( ) ; valueRecord . insertCell ( blankRecord1 ) ; org . apache . poi . hssf . record . BlankRecord blankRecord2 = org . apache . poi . hssf . ... | org . junit . Assert . assertEquals ( 0 , getValueRecords ( ) . size ( ) ) |
getLibraries ( ) { "<AssertPlaceHolder>" ; } getLibraries ( ) { org . junit . Assert . assertTrue ( "Exactly<sp>one<sp>library<sp>has<sp>to<sp>be<sp>defined<sp>on<sp>build<sp>path" , ( ( buildPathsPropertyPage . getLibraries ( ) . size ( ) ) == 1 ) ) ; } | org . junit . Assert . assertTrue ( "Exactly<sp>one<sp>library<sp>has<sp>to<sp>be<sp>defined<sp>on<sp>build<sp>path" , ( ( buildPathsPropertyPage . getLibraries ( ) . size ( ) ) == 1 ) ) |
testSetRootDataMap ( ) { org . apache . cayenne . map . DataMap map = new org . apache . cayenne . map . DataMap ( "map" ) ; builder . setRoot ( map , QueryDescriptor . DATA_MAP_ROOT , null ) ; "<AssertPlaceHolder>" ; } getRoot ( ) { return root ; } | org . junit . Assert . assertSame ( map , builder . getRoot ( ) ) |
testAttributeNamePrefixedWithOperatorName ( ) { com . mitchellbosecke . pebble . PebbleEngine pebble = new com . mitchellbosecke . pebble . PebbleEngine . Builder ( ) . loader ( new com . mitchellbosecke . pebble . loader . StringLoader ( ) ) . strictVariables ( false ) . build ( ) ; com . mitchellbosecke . pebble . te... | org . junit . Assert . assertEquals ( "success" , writer . toString ( ) ) |
testGetSuspendingTriggerDefinitionNoHit ( ) { final org . oscm . domobjects . Organization org = createOrgAndSetTriggerDefinition ( false , false ) ; runTX ( new java . util . concurrent . Callable < java . lang . Void > ( ) { public org . oscm . domobjects . Void call ( ) throws org . oscm . domobjects . Exception { o... | org . junit . Assert . assertNull ( suspendingTriggerDefinition ) |
testGetControl ( ) { org . eclipse . swt . widgets . Display display = new org . eclipse . swt . widgets . Display ( ) ; org . eclipse . swt . widgets . Control control = new org . eclipse . swt . widgets . Shell ( display ) ; org . eclipse . swt . dnd . DragSourceEffect dragSourceEffect = new org . eclipse . swt . dnd... | org . junit . Assert . assertSame ( control , dragSourceEffect . getControl ( ) ) |
round ( ) { "<AssertPlaceHolder>" ; } round ( ) { return roundProvider . round ( ) ; } | org . junit . Assert . assertEquals ( 0 , subject . round ( ) ) |
withPrefix_shouldId1BeGreaterForSameSerials ( ) { org . asteriskjava . manager . event . BridgeEnterEvent bridgeEnterEvent1 = org . asteriskjava . manager . internal . backwardsCompatibility . bridge . BridgeEnterEventComparatorTest . createBridgeEnterEvent ( "some_prefix-1515590353.30" ) ; org . asteriskjava . manager... | org . junit . Assert . assertEquals ( 1 , compareResult ) |
defaultSdkSocketOptionPresent ( ) { software . amazon . awssdk . http . nio . netty . internal . SdkChannelOptions channelOptions = new software . amazon . awssdk . http . nio . netty . internal . SdkChannelOptions ( ) ; java . util . Map < io . netty . channel . ChannelOption , java . lang . Object > expectedOptions =... | org . junit . Assert . assertEquals ( expectedOptions , channelOptions . channelOptions ( ) ) |
test ( ) { com . firefly . reactive . adapter . http . ReactiveHTTPClient c = Reactor . http . httpClient ( ) ; com . firefly . server . http2 . HTTP2ServerBuilder s = $ . httpServer ( ) ; s . router ( ) . get ( "/*" ) . asyncHandler ( ( ctx ) -> ctx . next ( new Promise < java . lang . String > ( ) { @ java . lang . O... | org . junit . Assert . assertThat ( body , is ( "hello<sp>reactor" ) ) |
testRemoveInvalidMember ( ) { "<AssertPlaceHolder>" ; verify ( dlg , never ( ) ) . removeMember ( memberDlg ) ; verify ( autosaveMgr , times ( 1 ) ) . autosave ( ) ; } removeMember ( java . security . Principal ) { if ( ! ( isMember ( user ) ) ) { return false ; } else { throw new java . lang . UnsupportedOperationExce... | org . junit . Assert . assertFalse ( group . removeMember ( memberDlg ) ) |
testBytesStore ( ) { @ org . jetbrains . annotations . NotNull net . openhft . chronicle . wire . Wire wire = createWire ( ) ; wire . write ( ) . object ( net . openhft . chronicle . bytes . Bytes . fromString ( "Hello" ) ) ; net . openhft . chronicle . bytes . Bytes b = net . openhft . chronicle . bytes . Bytes . elas... | org . junit . Assert . assertEquals ( "Hello" , b . toString ( ) ) |
testBondOrTT ( ) { org . openscience . cdk . isomorphism . matchers . Expr expr = new org . openscience . cdk . isomorphism . matchers . Expr ( OR , new org . openscience . cdk . isomorphism . matchers . Expr ( TRUE ) , new org . openscience . cdk . isomorphism . matchers . Expr ( TRUE ) ) ; org . openscience . cdk . i... | org . junit . Assert . assertTrue ( expr . matches ( bond ) ) |
shouldRoundTripGenericAvroDataThroughKafka ( ) { org . apache . avro . Schema schema = new org . apache . avro . Schema . Parser ( ) . parse ( getClass ( ) . getResourceAsStream ( "/avro/io/confluent/examples/streams/wikifeed.avsc" ) ) ; org . apache . avro . generic . GenericRecord record = new org . apache . avro . g... | org . junit . Assert . assertEquals ( inputValues , actualValues ) |
testNumActiveUpdatedOnCheckOut ( ) { com . bazaarvoice . ostrich . pool . SingleThreadedClientServiceCache < com . bazaarvoice . ostrich . pool . SingleThreadedClientServiceCacheTest . Service > cache = newCache ( ) ; cache . checkOut ( com . bazaarvoice . ostrich . pool . SingleThreadedClientServiceCacheTest . END_POI... | org . junit . Assert . assertEquals ( 1 , cache . getNumActiveInstances ( com . bazaarvoice . ostrich . pool . SingleThreadedClientServiceCacheTest . END_POINT ) ) |
testRemoteCFWithTCPandHA ( ) { java . util . Hashtable < java . lang . String , java . lang . String > props = new java . util . Hashtable ( ) ; props . put ( Context . INITIAL_CONTEXT_FACTORY , "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory" ) ; props . put ( "connectionFactory.myConnectionFactory" , ... | org . junit . Assert . assertEquals ( true , cf . isHA ( ) ) |
getBooleanTrueT ( ) { final java . lang . Character value = 'T' ; final io . trane . ndbc . value . CharacterValue wrapper = new io . trane . ndbc . value . CharacterValue ( value ) ; "<AssertPlaceHolder>" ; } getBoolean ( ) { return ( get ( ) ) == 1 ; } | org . junit . Assert . assertEquals ( true , wrapper . getBoolean ( ) ) |
testGetLabelResource ( ) { System . out . println ( "getLabelResource" ) ; kg . apc . jmeter . threads . UltimateThreadGroupGui instance = new kg . apc . jmeter . threads . UltimateThreadGroupGui ( ) ; java . lang . String expResult = "UltimateThreadGroupGui" ; java . lang . String result = instance . getLabelResource ... | org . junit . Assert . assertEquals ( expResult , result ) |
testRemovesOneFileFromContainerWhenFileExistsForBDoc ( ) { org . digidoc4j . Container container = this . createEmptyContainer ( ) ; container . addDataFile ( "src/test/resources/testFiles/helper-files/test.txt" , "text/plain" ) ; container . removeDataFile ( "test.txt" ) ; "<AssertPlaceHolder>" ; } getDataFiles ( ) { ... | org . junit . Assert . assertEquals ( 0 , container . getDataFiles ( ) . size ( ) ) |
testTwoExistingAuthorizerProfileDoesNotMatch2 ( ) { profile . addRole ( org . pac4j . core . authorization . checker . ROLE ) ; final org . pac4j . core . authorization . checker . List < org . pac4j . core . authorization . authorizer . Authorizer > authorizers = new org . pac4j . core . authorization . checker . Arra... | org . junit . Assert . assertFalse ( checker . isAuthorized ( null , profiles , authorizers ) ) |
setPropertyValueOnResourceForContextShouldThrowExceptionWhenPropertyNotFound ( ) { java . lang . String resourceGroupName = "resourceGroupName" ; java . lang . String releaseName = "releaseName" ; java . lang . String contextName = "contextName" ; java . lang . String propertyName = "propertyName" ; java . lang . Strin... | org . junit . Assert . assertTrue ( properties . isEmpty ( ) ) |
putAddNewPairSucceed ( ) { com . microsoft . azure . sdk . iot . deps . twin . TwinCollection twinCollection = new com . microsoft . azure . sdk . iot . deps . twin . TwinCollection ( ) ; twinCollection . putFinal ( tests . unit . com . microsoft . azure . sdk . iot . deps . twin . TwinCollectionTest . VALID_KEY_NAME ,... | org . junit . Assert . assertEquals ( "NewNiceCar" , twinCollection . get ( tests . unit . com . microsoft . azure . sdk . iot . deps . twin . TwinCollectionTest . VALID_KEY_NAME ) ) |
testWrongTag ( ) { java . net . URI resource = getClass ( ) . getResource ( "/corrupted/private_input_without_default_wrong_tag.sl" ) . toURI ( ) ; io . cloudslang . lang . compiler . modeller . result . ExecutableModellingResult result = compiler . preCompileSource ( io . cloudslang . lang . compiler . SlangSource . f... | org . junit . Assert . assertTrue ( ( ( result . getErrors ( ) . size ( ) ) > 0 ) ) |
testRemovedEnumConstant ( ) { japicmp . model . JApiClass abcToAb = getJApiClass ( japicmp . test . EnumsTest . jApiClasses , japicmp . test . Enums . AbcToAb . class . getName ( ) ) ; "<AssertPlaceHolder>" ; } isBinaryCompatible ( ) { return true ; } | org . junit . Assert . assertThat ( abcToAb . isBinaryCompatible ( ) , org . hamcrest . CoreMatchers . is ( false ) ) |
whenCreatingEmptyRoute_itMustReturnEmptyRoute ( ) { @ jsprit . core . problem . solution . route . SuppressWarnings ( "unused" ) jsprit . core . problem . solution . route . VehicleRoute route = jsprit . core . problem . solution . route . VehicleRoute . emptyRoute ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( true ) |
testVersion1SecureRandomVersion ( ) { "<AssertPlaceHolder>" ; } timeRandomBasedUUID ( ) { return com . twelvemonkeys . util . UUIDFactory . createTimeBasedUUIDforNode ( com . twelvemonkeys . util . UUIDFactory . SECURE_RANDOM_NODE ) ; } | org . junit . Assert . assertEquals ( 1 , com . twelvemonkeys . util . UUIDFactory . timeRandomBasedUUID ( ) . version ( ) ) |
test130GetMapEndpointExtraParamsNoAmpAtEnd ( ) { java . io . InputStream is = org . deegree . protocol . wms . client . WMSClientTest . class . getResourceAsStream ( "wms130-capabilities-getmap-endpoint-extra-params-no-amp-at-end.xml" ) ; org . deegree . protocol . wms . client . WMSClient client = new org . deegree . ... | org . junit . Assert . assertNotNull ( response ) |
testEvents ( ) { org . cytoscape . view . model . CyNetworkView networkView = mock ( org . cytoscape . view . model . CyNetworkView . class ) ; org . cytoscape . view . model . events . UpdateNetworkPresentationEvent ev3 = new org . cytoscape . view . model . events . UpdateNetworkPresentationEvent ( networkView ) ; "<... | org . junit . Assert . assertEquals ( networkView , ev3 . getSource ( ) ) |
testGetParametersWithDefaultEntityAndDisabledSecurity ( ) { unit . setSecurity ( false ) ; org . lnu . is . domain . department . Department entity = new org . lnu . is . domain . department . Department ( ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . HashMap < java ... | org . junit . Assert . assertEquals ( expected , actual ) |
testCreateHospitalAdmissionDiagnosisSectionBuilder ( ) { org . openhealthtools . mdht . uml . cda . builder . SectionBuilder < org . openhealthtools . mdht . uml . cda . hitsp . HospitalAdmissionDiagnosisSection > sectionBuilder = org . openhealthtools . mdht . uml . cda . hitsp . builder . HITSPBuilderFactory . create... | org . junit . Assert . assertNotNull ( section ) |
testGetFaultFlag ( ) { boolean expResult = false ; boolean result = instance . getFaultFlag ( ) ; "<AssertPlaceHolder>" ; } getFaultFlag ( ) { return faultFlag ; } | org . junit . Assert . assertEquals ( expResult , result ) |
entityAllPrimAllNull ( ) { final org . apache . olingo . commons . api . edm . EdmEntitySet edmEntitySet = org . apache . olingo . server . core . serializer . json . ODataJsonSerializerv01Test . entityContainer . getEntitySet ( "ESAllPrim" ) ; org . apache . olingo . commons . api . data . Entity entity = data . readA... | org . junit . Assert . assertEquals ( expectedResult , resultString ) |
testDynamicQueryByPrimaryKeyMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . wiki . model . WikiPage . class , _dynamicQueryClassLoader ) ; dynamicQuery . add ( com . liferay . porta... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
testNoNext ( ) { while ( itr . hasNext ( ) ) { itr . next ( ) ; } "<AssertPlaceHolder>" ; try { itr . next ( ) ; } catch ( java . util . NoSuchElementException e ) { return ; } org . junit . Assert . fail ( "Must<sp>throw<sp>NoSuchElementException" ) ; } hasNext ( ) { return ( elementsRead ) < ( elements ) ; } | org . junit . Assert . assertFalse ( itr . hasNext ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.