input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
shouldReturnEqualsForTheSameInstance ( ) { org . eclipse . egit . ui . internal . synchronize . model . GitModelWorkingTree left = new org . eclipse . egit . ui . internal . synchronize . model . GitModelWorkingTree ( createModelRepository ( ) , lookupRepository ( leftRepoFile ) , null ) ; boolean actual = left . equal... | org . junit . Assert . assertTrue ( actual ) |
testFindByInterface ( ) { java . util . Collection < com . tacitknowledge . flip . properties . PropertyReader > objects = serviceProvider . find ( com . tacitknowledge . flip . properties . FlipProperty . class , com . tacitknowledge . flip . properties . PropertyReader . class ) ; "<AssertPlaceHolder>" ; testAllItems... | org . junit . Assert . assertFalse ( objects . isEmpty ( ) ) |
test_addHelpListenerLorg_eclipse_swt_events_HelpListener ( ) { org . eclipse . swt . events . HelpListener listener = ( e ) -> eventOccurred = true ; control . addHelpListener ( listener ) ; eventOccurred = false ; control . notifyListeners ( SWT . Help , new org . eclipse . swt . widgets . Event ( ) ) ; "<AssertPlaceH... | org . junit . Assert . assertTrue ( eventOccurred ) |
iHaveDefaultPictureConversionsOrder ( ) { java . lang . String [ ] defaultPictureConversionsOrder = new java . lang . String [ ] { "Thumbnail" , "Small" , "Medium" , "FullHD" , "OriginalJpeg" } ; java . util . List < org . nuxeo . ecm . platform . picture . api . PictureConversion > pictureConversions = imagingService ... | org . junit . Assert . assertEquals ( defaultPictureConversionsOrder [ i ] , pictureConversions . get ( i ) . getId ( ) ) |
testAcceptInValidParameter5 ( ) { final org . openspotlight . graph . query . console . ConsoleState state = new org . openspotlight . graph . query . console . ConsoleState ( null ) ; state . setInput ( "select<sp>*;<sp>><sp>" ) ; "<AssertPlaceHolder>" ; } accept ( org . openspotlight . graph . query . console . Conso... | org . junit . Assert . assertThat ( command . accept ( state ) , org . hamcrest . core . Is . is ( false ) ) |
creditApproved ( ) { org . switchyard . quickstarts . remoteinvoker . Application app = new org . switchyard . quickstarts . remoteinvoker . Application ( ) ; app . setName ( "phil<sp>garfield" ) ; app . setCreditScore ( 600 ) ; org . switchyard . quickstarts . remoteinvoker . Offer offer = new org . switchyard . quick... | org . junit . Assert . assertTrue ( result . isApproved ( ) ) |
canGetCurrentDummyPrincipal ( ) { java . security . Principal dummyPrincipal = login . login ( "dummyName" ) ; org . nuxeo . ecm . core . api . NuxeoPrincipal currentDummy = org . nuxeo . ecm . core . api . local . ClientLoginModule . getCurrentPrincipal ( ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; } | org . junit . Assert . assertEquals ( dummyPrincipal . getName ( ) , currentDummy . getName ( ) ) |
testHadoopCodecFactorySnappy ( ) { org . apache . avro . file . CodecFactory hadoopSnappyCodec = org . apache . avro . hadoop . file . HadoopCodecFactory . fromHadoopString ( "org.apache.hadoop.io.compress.SnappyCodec" ) ; org . apache . avro . file . CodecFactory avroSnappyCodec = org . apache . avro . file . CodecFac... | org . junit . Assert . assertTrue ( hadoopSnappyCodec . getClass ( ) . equals ( avroSnappyCodec . getClass ( ) ) ) |
testDiffMembers ( ) { org . apache . webbeans . container . BeanCacheKey a = new org . apache . webbeans . container . BeanCacheKey ( true , java . lang . String . class , null , ( it ) -> null , org . apache . webbeans . test . annotation . binding . BeanCacheKeyUnitTest . a4 ) ; org . apache . webbeans . container . ... | org . junit . Assert . assertFalse ( a . equals ( b ) ) |
testEquals ( ) { org . jfree . data . time . Day day1 = new org . jfree . data . time . Day ( 29 , org . jfree . date . MonthConstants . MARCH , 2002 ) ; org . jfree . data . time . Hour hour1 = new org . jfree . data . time . Hour ( 15 , day1 ) ; org . jfree . data . time . Minute minute1 = new org . jfree . data . ti... | org . junit . Assert . assertTrue ( minute1 . equals ( minute2 ) ) |
customInput ( ) { com . fizzed . blaze . util . CaptureOutput capture = com . fizzed . blaze . util . Streamables . captureOutput ( ) ; new com . fizzed . blaze . system . Exec ( context ) . command ( "tee" ) . path ( com . fizzed . blaze . system . ShellTestHelper . getBinDirAsResource ( ) ) . pipeInput ( com . fizzed... | org . junit . Assert . assertThat ( output . trim ( ) , org . hamcrest . CoreMatchers . is ( "hello<sp>dude" ) ) |
testGetAllMessagesSearchByHashtagORSender ( ) { java . util . List < com . streamreduce . core . model . messages . SobaMessage > messages = messageService . getAllMessages ( user , null , null , 4 , false , null , com . google . common . collect . Lists . newArrayList ( "#foo" ) , "nodeable" , false ) ; "<AssertPlaceH... | org . junit . Assert . assertEquals ( 2 , messages . size ( ) ) |
testToDateFromNonDateString ( ) { final java . util . List < org . apache . nifi . serialization . record . RecordField > fields = new java . util . ArrayList ( ) ; fields . add ( new org . apache . nifi . serialization . record . RecordField ( "id" , RecordFieldType . INT . getDataType ( ) ) ) ; fields . add ( new org... | org . junit . Assert . assertEquals ( "John<sp>Doe" , fieldValue . getValue ( ) ) |
testCreatesDefaultAuthenticationFactoryImpl ( ) { org . irods . jargon . core . connection . IRODSProtocolManager irodsConnectionManager = org . irods . jargon . core . connection . IRODSSimpleProtocolManager . instance ( ) ; "<AssertPlaceHolder>" ; } getAuthenticationFactory ( ) { return authenticationFactory ; } | org . junit . Assert . assertNotNull ( irodsConnectionManager . getAuthenticationFactory ( ) ) |
previousDayShouldBeReturnedWhenNonExistingDayIsRequested4 ( ) { com . graphaware . module . timetree . domain . TimeInstant timeInstant ; org . neo4j . graphdb . Node previous ; try ( org . neo4j . graphdb . Transaction tx = getDatabase ( ) . beginTx ( ) ) { previous = timeTree . getOrCreateInstant ( com . graphaware .... | org . junit . Assert . assertEquals ( previous , dayNode ) |
givenAsListMethodHandle_whenInvokingWithArguments_thenCorrectlyInvoked ( ) { java . lang . invoke . MethodHandles . Lookup publicLookup = java . lang . invoke . MethodHandles . publicLookup ( ) ; java . lang . invoke . MethodType mt = java . lang . invoke . MethodType . methodType ( java . util . List . class , java . ... | org . junit . Assert . assertThat ( java . util . Arrays . asList ( 1 , 2 ) , org . hamcrest . CoreMatchers . is ( list ) ) |
testOpen_invalid ( ) { org . eclipse . tracecompass . ctf . core . trace . CTFTrace trace = new org . eclipse . tracecompass . ctf . core . trace . CTFTrace ( "" ) ; try ( org . eclipse . tracecompass . ctf . core . trace . CTFTraceReader result = new org . eclipse . tracecompass . ctf . core . trace . CTFTraceReader (... | org . junit . Assert . assertNotNull ( result ) |
testGetRectangularSubset_withStartRowExceedingGridHeight ( ) { final com . valkryst . VTerminal . Tile [ ] [ ] rectSubset = StaticGrid . TILE_GRID . getRectangularSubset ( 100 , 0 , 2 , 2 ) ; "<AssertPlaceHolder>" ; } getRectangularSubset ( int , int , int , int ) { int endColumn = width + startColumn ; int endRow = he... | org . junit . Assert . assertEquals ( 0 , rectSubset . length ) |
fetchItems ( ) { itemProvider . addItems ( book . twju . chapter_5 . Listing_1_MockitoRunner_TimelineTest . FIRST_ITEM , book . twju . chapter_5 . Listing_1_MockitoRunner_TimelineTest . SECOND_ITEM , book . twju . chapter_5 . Listing_1_MockitoRunner_TimelineTest . THIRD_ITEM , book . twju . chapter_5 . Listing_1_Mockit... | org . junit . Assert . assertArrayEquals ( new book . twju . chapter_5 . Item [ ] { book . twju . chapter_5 . Listing_1_MockitoRunner_TimelineTest . SIXTH_ITEM , book . twju . chapter_5 . Listing_1_MockitoRunner_TimelineTest . FIFTH_ITEM , book . twju . chapter_5 . Listing_1_MockitoRunner_TimelineTest . FOURTH_ITEM , b... |
testUnreachableCode ( ) { int i = 46 + 1 ; if ( i < 47 ) { java . lang . String s = edu . columbia . cs . psl . test . phosphor . DroidBenchIntTagITCase . taintedString ( ) ; "<AssertPlaceHolder>" ; } } getTaint ( java . lang . String ) { return edu . columbia . cs . psl . phosphor . runtime . Tainter . getTaint ( desc... | org . junit . Assert . assertTrue ( ( ( edu . columbia . cs . psl . test . phosphor . DroidBenchIntTagITCase . getTaint ( s ) ) != 0 ) ) |
verifyThatStaticMethodsAndConstructorsAreNotMockedWhenCascading ( mockit . CascadingParametersTest$Foo ) { foo . getBar ( ) ; "<AssertPlaceHolder>" ; try { new mockit . CascadingParametersTest . Bar ( ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . RuntimeException ignored ) { } } staticMethod ( ) { retur... | org . junit . Assert . assertEquals ( "notMocked" , mockit . CascadingParametersTest . Bar . staticMethod ( ) ) |
testCreateGetRequest4 ( ) { java . lang . String url = "http://x.yz" ; java . util . Map < java . lang . String , java . lang . String > getMap = new java . util . HashMap ( ) ; getMap . put ( "a" , "x+y" ) ; java . lang . String expected = url + "?a=x%2By" ; java . lang . String actual = wsattacker . sso . openid . at... | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( expected ) ) |
testIsDebugEnabled ( ) { "<AssertPlaceHolder>" ; } isDebugLoggingEnabled ( ) { return systemLogger . isDebugEnabled ( ) ; } | org . junit . Assert . assertFalse ( logger . isDebugLoggingEnabled ( ) ) |
testGetAsObjectSpaceAndThreeByteSpaceMixtureTrailing ( ) { java . lang . String in = " " + ( ( ( ( "<sp>" + " " ) + "<sp>" ) + " " ) + "<sp>" ) ; java . lang . String out = ( ( java . lang . String ) ( converter . getAsObject ( context , component , in ) ) ) ; "<AssertPlaceHolder>" ; } getAsObject ( javax . faces . co... | org . junit . Assert . assertEquals ( null , out ) |
testResolveArtifact_latest ( ) { java . io . File dirFile = TempFileManager . INSTANCE . newTempDirectory ( "gradle" , null ) ; java . nio . file . Path gradleCachePath = dirFile . toPath ( ) ; java . lang . String group = "org.wildfly.swarm" ; java . lang . String packaging = "jar" ; java . lang . String artifact = "t... | org . junit . Assert . assertEquals ( artifactFileLatest , resolvedArtifactFile ) |
testMalformedDrl ( ) { byte [ ] content = new byte [ ] { 4 , 68 , 0 , 0 , 96 , 0 , 0 , 0 } ; org . kie . api . KieServices ks = KieServices . Factory . get ( ) ; org . kie . api . builder . KieFileSystem kfs = ks . newKieFileSystem ( ) . write ( "src/main/resources/r1.drl" , new java . lang . String ( content ) ) ; org... | org . junit . Assert . assertTrue ( ( ( results . getMessages ( ) . size ( ) ) > 0 ) ) |
testInfinite ( ) { java . lang . String result = "@test@<sp>line<sp>testvalue" ; java . lang . String line = "@test@<sp>line<sp>@test3@" ; org . apache . tools . ant . types . FilterSet fs = new org . apache . tools . ant . types . FilterSet ( ) ; fs . addFilter ( "test" , "@test1@" ) ; fs . addFilter ( "test3" 0 , "@t... | org . junit . Assert . assertEquals ( result , fs . replaceTokens ( line ) ) |
testToList01 ( ) { javax . el . ELProcessor processor = new javax . el . ELProcessor ( ) ; java . lang . Object result = processor . getValue ( "['a','b','c'].stream().toList()" , java . util . List . class ) ; java . util . List < java . lang . String > expected = new java . util . ArrayList ( 3 ) ; expected . add ( "... | org . junit . Assert . assertEquals ( expected , result ) |
overrideToolchains ( ) { com . facebook . buck . testutil . integration . ProjectWorkspace workspace = com . facebook . buck . testutil . integration . TestDataHelper . createProjectWorkspaceForScenario ( this , "sdk-discovery-minimal" , temp ) ; workspace . setUp ( ) ; java . nio . file . Path root = workspace . getPa... | org . junit . Assert . assertThat ( com . facebook . buck . apple . toolchain . impl . AppleSdkDiscovery . discoverAppleSdkPaths ( java . util . Optional . of ( root ) , com . google . common . collect . ImmutableList . of ( root ) , allToolchains , fakeAppleConfig ) , org . hamcrest . Matchers . equalTo ( expected ) ) |
testEmpty ( ) { java . lang . Object result = variance . getResult ( ) ; "<AssertPlaceHolder>" ; } getResult ( ) { return null ; } | org . junit . Assert . assertNull ( result ) |
testNullToEmptyLong ( ) { final long [ ] original = new long [ ] { 1L , 2L } ; "<AssertPlaceHolder>" ; } nullToEmpty ( java . lang . Object [ ] ) { if ( org . apache . commons . lang3 . ArrayUtils . isEmpty ( array ) ) { return org . apache . commons . lang3 . ArrayUtils . EMPTY_OBJECT_ARRAY ; } return array ; } | org . junit . Assert . assertEquals ( original , org . apache . commons . lang3 . ArrayUtils . nullToEmpty ( original ) ) |
testGetTestContext ( ) { testContainer = createTestContainer ( new com . hazelcast . simulator . worker . testcontainer . BaseTest ( ) ) ; "<AssertPlaceHolder>" ; } getTestContext ( ) { return testContext ; } | org . junit . Assert . assertEquals ( testContext , testContainer . getTestContext ( ) ) |
runTest ( ) { final uk . ac . ed . ph . qtiworks . mathassess . glue . types . ValueWrapper valueWrapperResult = process . executeStringOutput ( maximaRepresentation , false , valueWrapper . getClass ( ) ) ; "<AssertPlaceHolder>" ; } executeStringOutput ( java . lang . String , boolean , java . lang . Class ) { uk . ac... | org . junit . Assert . assertEquals ( valueWrapper , valueWrapperResult ) |
testExtensions ( ) { com . zsmartsystems . zigbee . ZigBeeNetworkManager manager = new com . zsmartsystems . zigbee . ZigBeeNetworkManager ( org . mockito . Mockito . mock ( com . zsmartsystems . zigbee . transport . ZigBeeTransportTransmit . class ) ) ; manager . addExtension ( new com . zsmartsystems . zigbee . app .... | org . junit . Assert . assertTrue ( ( returnedExtension instanceof com . zsmartsystems . zigbee . app . otaserver . ZigBeeOtaUpgradeExtension ) ) |
testToStringHumanWithQuota ( ) { long length = Long . MAX_VALUE ; long fileCount = 222222222 ; long directoryCount = 33333 ; long quota = 222256578 ; long spaceConsumed = 1073741825 ; long spaceQuota = 1 ; org . apache . hadoop . fs . ContentSummary contentSummary = new org . apache . hadoop . fs . ContentSummary . Bui... | org . junit . Assert . assertEquals ( expected , contentSummary . toString ( true , true ) ) |
test2CrossingsUnevenLayers ( ) { final org . kie . workbench . common . stunner . core . graph . processing . layout . sugiyama . GraphLayerImpl top = new org . kie . workbench . common . stunner . core . graph . processing . layout . sugiyama . GraphLayerImpl ( 0 ) ; top . addNewVertex ( "A" ) ; top . addNewVertex ( "... | org . junit . Assert . assertEquals ( 2 , result ) |
testParseContraction ( ) { opennlp . tools . util . InputStreamFactory streamFactory = new opennlp . tools . formats . ResourceAsStreamFactory ( opennlp . tools . formats . conllu . ConlluStreamTest . class , "pt_br-ud-sample.conllu" ) ; try ( opennlp . tools . util . ObjectStream < opennlp . tools . postag . POSSample... | org . junit . Assert . assertEquals ( expected , predicted ) |
testGetMaximumMongoDBConnectionsDefault ( ) { org . graylog2 . configuration . MongoDbConfiguration configuration = new org . graylog2 . configuration . MongoDbConfiguration ( ) ; new com . github . joschi . jadconfig . JadConfig ( new com . github . joschi . jadconfig . repositories . InMemoryRepository ( ) , configur... | org . junit . Assert . assertEquals ( 1000 , configuration . getMaxConnections ( ) ) |
testFetchByPrimaryKeyExisting ( ) { com . liferay . knowledge . base . model . KBFolder newKBFolder = addKBFolder ( ) ; com . liferay . knowledge . base . model . KBFolder existingKBFolder = _persistence . fetchByPrimaryKey ( newKBFolder . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amIm... | org . junit . Assert . assertEquals ( existingKBFolder , newKBFolder ) |
read1 ( ) { java . lang . String s = m . read ( "foo" , java . lang . String . class ) ; "<AssertPlaceHolder>" ; } read ( java . lang . Object , java . lang . Class ) { return p . createSession ( ) . parse ( input , type ) ; } | org . junit . Assert . assertEquals ( "foo" , s ) |
testReadWhenNoConfigFileProperty ( ) { propertyReader . readDescriptors ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { throw new java . lang . UnsupportedOperationException ( "Not<sp>supported<sp>yet." ) ; } | org . junit . Assert . assertTrue ( propertyReader . cache . isEmpty ( ) ) |
AskWithInexistingNabName ( ) { final net . violet . platform . datamodel . User myUser = getActionTestUser ( ) ; final net . violet . platform . datamodel . VObject myObject = Factories . VOBJECT . findByName ( "ActionTestObject" ) ; final net . violet . mynabaztag . form . MySrvDialogForm myForm = askDialog ( myUser ,... | org . junit . Assert . assertEquals ( 1 , myForm . getError_dne ( ) ) |
emptySet ( ) { final int ret = set . previousSetBit ( 0 ) ; "<AssertPlaceHolder>" ; } previousSetBit ( int ) { if ( i < 0 ) { if ( i == ( - 1 ) ) return - 1 ; throw new java . lang . IndexOutOfBoundsException ( ( "i=" + i ) ) ; } final long [ ] [ ] [ ] bits = this . bits ; final int aSize = ( bits . length ) - 1 ; if (... | org . junit . Assert . assertEquals ( ( - 1 ) , ret ) |
namedParameterShouldWorkWithouthAtParamsInAtQueryMethods ( ) { executeUpdate ( "CREATE<sp>(m:User<sp>{name:'Michal'})<-[:FRIEND_OF]-(a:User<sp>{name:'Adam'})" ) ; transactionTemplate . execute ( new org . springframework . transaction . support . TransactionCallbackWithoutResult ( ) { @ org . springframework . data . n... | org . junit . Assert . assertEquals ( "Michal" , user . getName ( ) ) |
testGetPackagesWithNoPackages ( ) { java . util . List < se . vidstige . jadb . managers . Package > expected = new java . util . ArrayList ( ) ; java . lang . String response = "" ; server . expectShell ( se . vidstige . jadb . test . unit . PackageManagerTest . DEVICE_SERIAL , "pm<sp>list<sp>packages" ) . returns ( r... | org . junit . Assert . assertEquals ( expected , actual ) |
assertContainDataSourceNameWithSlaveDataSourceName ( ) { org . apache . shardingsphere . core . rule . MasterSlaveRule actual = new org . apache . shardingsphere . core . rule . MasterSlaveRule ( new org . apache . shardingsphere . api . config . masterslave . MasterSlaveRuleConfiguration ( "master_slave" , "master_ds"... | org . junit . Assert . assertTrue ( actual . containDataSourceName ( "slave_ds" ) ) |
buildShouldCreateEmptyRegistryWithNullDefaultValue ( ) { whenNew ( org . codegist . crest . util . ComponentRegistry . class ) . withArguments ( new java . util . HashMap ( ) , mockCRestConfig , null ) . thenReturn ( mockRegistry ) ; org . codegist . crest . util . ComponentRegistry actual = toTest . build ( mockCRestC... | org . junit . Assert . assertSame ( mockRegistry , actual ) |
testInputUnmodified ( ) { mikera . matrixx . Matrix A = mikera . matrixx . Matrix . createRandom ( 4 , 4 ) ; mikera . matrixx . Matrix B = A . copy ( ) ; mikera . matrixx . decompose . impl . hessenberg . HessenbergSimilarDecomposition . decompose ( A ) ; "<AssertPlaceHolder>" ; } equals ( mikera . vectorz . AVector ) ... | org . junit . Assert . assertTrue ( A . equals ( B ) ) |
bufferOverflowOnWrite ( ) { boolean fail = false ; final java . nio . ByteBuffer buffer = java . nio . ByteBuffer . allocate ( 100 ) ; buffer . put ( "12345678901234567890" . getBytes ( "UTF-8" ) ) . flip ( ) ; try { sslChannel . write ( buffer ) ; } catch ( java . io . IOException e ) { fail = true ; } "<AssertPlaceHo... | org . junit . Assert . assertTrue ( fail ) |
testAddTableNoName ( ) { schema1 = new org . apache . tajo . catalog . Schema ( ) ; schema1 . addColumn ( org . apache . tajo . catalog . TestCatalog . FieldName1 , Type . BLOB ) ; schema1 . addColumn ( org . apache . tajo . catalog . TestCatalog . FieldName2 , Type . INT4 ) ; schema1 . addColumn ( org . apache . tajo ... | org . junit . Assert . assertFalse ( org . apache . tajo . catalog . TestCatalog . catalog . addTable ( desc ) ) |
testBuildWithDisabledDefaultConstraints ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . language . Language context = new org . lnu . is . domain . language . Language ( ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>Language<sp>e<sp>" ; org . lnu . is . pag... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
testPut ( ) { edu . ucla . sspace . util . CharMap < java . lang . String > m = new edu . ucla . sspace . util . CharMap < java . lang . String > ( ) ; m . put ( '1' , "1" ) ; java . lang . String s = m . get ( '1' ) ; "<AssertPlaceHolder>" ; } get ( int ) { edu . ucla . sspace . util . primitive . IntSet vals = map . ... | org . junit . Assert . assertEquals ( "1" , s ) |
testByHand ( ) { edu . jhu . pacaya . gm . model . globalfac . ConstituencyTreeFactor ctFact = new edu . jhu . pacaya . gm . model . globalfac . ConstituencyTreeFactor ( 3 , edu . jhu . pacaya . gm . model . Var . VarType . PREDICTED ) ; edu . jhu . pacaya . gm . model . FactorGraph fg = new edu . jhu . pacaya . gm . m... | org . junit . Assert . assertTrue ( ( ( johnLovesMarg . getValue ( SpanVar . TRUE ) ) < ( lovesMaryMarg . getValue ( SpanVar . TRUE ) ) ) ) |
testSetAllUseReadOperation ( ) { org . kaazing . mina . netty . socket . nio . DefaultNioSocketChannelIoSessionConfig config = new org . kaazing . mina . netty . socket . nio . DefaultNioSocketChannelIoSessionConfig ( ) ; config . init ( new org . kaazing . mina . netty . socket . nio . NioSocketChannelIoAcceptor ( con... | org . junit . Assert . assertEquals ( config . isUseReadOperation ( ) , acceptedConfig . isUseReadOperation ( ) ) |
testConfiguredProxy ( ) { proxySeleniumTrafficOnly = false ; httpProxyHost = "foo" ; java . lang . String pac = makeProxyPAC ( ) ; java . lang . String expected = "function<sp>FindProxyForURL(url,<sp>host)<sp>" + "{<sp>return<sp>'PROXY<sp>localhost:4444;<sp>PROXY<sp>foo';<sp>}" ; "<AssertPlaceHolder>" ; } makeProxyPAC ... | org . junit . Assert . assertEquals ( expected , pac ) |
testApplyWhere2 ( ) { org . nd4j . linalg . api . ndarray . INDArray array = org . nd4j . linalg . factory . Nd4j . create ( new float [ ] { 0.0F , 0.0F , 0.0F , 0.0F , 0.0F } ) ; org . nd4j . linalg . indexing . BooleanIndexing . applyWhere ( array , org . nd4j . linalg . indexing . conditions . Conditions . lessThan ... | org . junit . Assert . assertTrue ( org . nd4j . linalg . indexing . BooleanIndexing . and ( array , org . nd4j . linalg . indexing . conditions . Conditions . equals ( 1.0F ) ) ) |
testWithOResult ( ) { com . orientechnologies . orient . core . sql . executor . OResultInternal resultInternal = new com . orientechnologies . orient . core . sql . executor . OResultInternal ( ) ; resultInternal . setProperty ( "name" , "Foo" ) ; resultInternal . setProperty ( "surname" , "Bar" ) ; java . lang . Obje... | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( "Foo" , "Bar" ) , result ) |
testWFSFilterDelegate ( ) { org . codice . ddf . spatial . ogc . wfs . v1_0_0 . catalog . source . WfsFilterDelegate delegate = new org . codice . ddf . spatial . ogc . wfs . v1_0_0 . catalog . source . WfsFilterDelegate ( featureMetacardType , org . codice . ddf . spatial . ogc . wfs . v1_0_0 . catalog . source . WfsF... | org . junit . Assert . assertNotNull ( delegate ) |
testMove ( ) { actual . add ( connection . set ( "foo" , "bar" ) ) ; actual . add ( connection . move ( "foo" , 1 ) ) ; verifyResults ( java . util . Arrays . asList ( true , true ) ) ; org . springframework . data . redis . connection . lettuce . LettuceConnectionFactory factory2 = new org . springframework . data . r... | org . junit . Assert . assertEquals ( "bar" , conn2 . get ( "foo" ) ) |
testEncodeCanonicalNodeIds ( ) { com . google . common . io . ByteArrayDataOutput out = com . google . common . io . ByteStreams . newDataOutput ( ) ; java . util . List < org . locationtech . geogig . model . internal . NodeId > nodes = new java . util . ArrayList ( ) ; int size = 10 ; for ( int i = 0 ; i < size ; i +... | org . junit . Assert . assertEquals ( nodes , decoded ) |
testEvery09 ( ) { final org . stjs . javascript . Array < java . lang . Integer > arr = org . stjs . javascript . JSCollections . $array ( 1 , 2 , 3 , 4 , 5 ) ; org . stjs . javascript . ArrayEveryTest . EveryCB < java . lang . Integer > callbackfn = new org . stjs . javascript . ArrayEveryTest . EveryCB < java . lang ... | org . junit . Assert . assertTrue ( arr . every ( callbackfn ) ) |
testUser ( ) { org . apache . mina . codec . delimited . ByteBufferEncoder < org . apache . mina . avro . generated . User > encoder = new org . apache . mina . avro . codec . serialization . AvroMessageEncoder < org . apache . mina . avro . generated . User > ( ) ; org . apache . mina . avro . codec . serialization . ... | org . junit . Assert . assertEquals ( getObjects ( ) . get ( 0 ) , message ) |
testMatchCompatibleNoMatch ( ) { org . apache . olingo . odata2 . core . commons . ContentType m1 = org . apache . olingo . odata2 . core . commons . ContentType . create ( "aaa/bbb;x=z;a=b" ) ; org . apache . olingo . odata2 . core . commons . ContentType m2 = org . apache . olingo . odata2 . core . commons . ContentT... | org . junit . Assert . assertTrue ( ( match == null ) ) |
anys_json ( ) { org . apache . servicecomb . foundation . protobuf . internal . model . Root root = new org . apache . servicecomb . foundation . protobuf . internal . model . Root ( ) ; root . setAnys ( java . util . Arrays . asList ( "abc" , "123" ) ) ; scbRootBytes = rootSerializer . serialize ( root ) ; root = root... | org . junit . Assert . assertThat ( root . getAnys ( ) , org . hamcrest . Matchers . contains ( "abc" , "123" ) ) |
testToStringWifi2 ( ) { org . eclipse . kura . core . net . NetworkConfiguration config = new org . eclipse . kura . core . net . NetworkConfiguration ( ) ; org . eclipse . kura . core . net . WifiInterfaceConfigImpl interfaceConfig = new org . eclipse . kura . core . net . WifiInterfaceConfigImpl ( "if1" ) ; java . ut... | org . junit . Assert . assertEquals ( expected , config . toString ( ) ) |
shouldSetNewName ( ) { when ( httpClientMock . newRequest ( "http://123.456.789.123/json?cmd=name&name=MyRobo" ) ) . thenReturn ( requestMock ) ; when ( requestMock . method ( HttpMethod . GET ) ) . thenReturn ( requestMock ) ; when ( requestMock . timeout ( 30000L , TimeUnit . MILLISECONDS ) ) . thenReturn ( requestMo... | org . junit . Assert . assertEquals ( "MyRobo" , name . getName ( ) ) |
testWorkReportLineTest ( ) { "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( true ) |
testCountMatchingEvents ( ) { org . opennms . web . event . filter . EventCriteria criteria = new org . opennms . web . event . filter . EventCriteria ( ) ; int event = m_daoEventRepo . countMatchingEvents ( criteria ) ; "<AssertPlaceHolder>" ; } countMatchingEvents ( org . opennms . web . event . filter . EventCriteri... | org . junit . Assert . assertEquals ( 2 , event ) |
reasoningWithResourceValueComparison ( ) { try ( grakn . core . server . session . SessionImpl session = grakn . core . graql . reasoner . ReasoningIT . server . sessionWithNewKeyspace ( ) ) { loadFromFileAndCommit ( grakn . core . graql . reasoner . ReasoningIT . resourcePath , "testSet25.gql" , session ) ; try ( grak... | org . junit . Assert . assertEquals ( 10 , answers . size ( ) ) |
hasNextSucceeds ( ) { com . microsoft . azure . sdk . iot . service . devicetwin . RawTwinQuery rawTwinQuery = com . microsoft . azure . sdk . iot . service . devicetwin . RawTwinQuery . createFromConnectionString ( tests . unit . com . microsoft . azure . sdk . iot . service . devicetwin . RawTwinQueryTest . VALID_CON... | org . junit . Assert . assertTrue ( result ) |
testRandamGen ( ) { java . lang . String str = org . support . project . common . util . RandomUtil . randamGen ( 16 ) ; "<AssertPlaceHolder>" ; } length ( ) { return params . size ( ) ; } | org . junit . Assert . assertEquals ( 16 , str . length ( ) ) |
testClassIdFromNullMetadataClass ( ) { "<AssertPlaceHolder>" ; } create ( java . lang . Class ) { if ( metadataClass == null ) { return null ; } return org . springframework . roo . metadata . MetadataIdentificationUtils . create ( metadataClass . getName ( ) ) ; } | org . junit . Assert . assertNull ( org . springframework . roo . metadata . MetadataIdentificationUtils . create ( ( ( java . lang . Class < ? > ) ( null ) ) ) ) |
bufDigest ( ) { final com . yandex . yoctodb . util . MessageDigestOutputStreamWrapper w1 = new com . yandex . yoctodb . util . MessageDigestOutputStreamWrapper ( com . google . common . io . ByteStreams . nullOutputStream ( ) , com . yandex . yoctodb . util . MessageDigestOutputStreamWrapperTest . md ) ; final byte [ ... | org . junit . Assert . assertTrue ( ( ! ( java . util . Arrays . equals ( d1 , d2 ) ) ) ) |
testSetEndpoint ( ) { final com . amazonaws . AmazonWebServiceClientTest . AmazonTestClient client = new com . amazonaws . AmazonWebServiceClientTest . AmazonTestClient ( ) ; client . setEndpoint ( "http://www.test.com" ) ; "<AssertPlaceHolder>" ; } setEndpoint ( java . lang . String ) { if ( endpoint . endsWith ( Cons... | org . junit . Assert . assertEquals ( client . endpoint , new java . net . URI ( "http://www.test.com" ) ) |
testReadonlyAssignment ( ) { org . apache . cordova . PreferenceNode foo = new org . apache . cordova . PreferenceNode ( "fullscreen" , "false" , false ) ; foo . readonly = true ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( true , foo . readonly ) |
sendFileShouldSetSelectedFileIfSelectedFileExist ( ) { final javax . swing . JFileChooser fileChooser = mock ( javax . swing . JFileChooser . class ) ; when ( fileChooser . showOpenDialog ( null ) ) . thenReturn ( JFileChooser . CANCEL_OPTION ) ; when ( uiTools . createFileChooser ( anyString ( ) ) ) . thenReturn ( fil... | org . junit . Assert . assertTrue ( selectedFile . exists ( ) ) |
testNull ( ) { org . apache . druid . query . filter . Filter extractionFilter = new org . apache . druid . query . filter . SelectorDimFilter ( "FDHJSFFHDS" , "extractDimVal" , org . apache . druid . segment . filter . ExtractionDimFilterTest . DIM_EXTRACTION_FN ) . toFilter ( ) ; org . apache . druid . collections . ... | org . junit . Assert . assertEquals ( 0 , immutableBitmap . size ( ) ) |
test_defaultConstructor ( ) { com . webpagebytes . cms . template . FreeMarkerTemplateLoader templateLoader = new com . webpagebytes . cms . template . FreeMarkerTemplateLoader ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( ( templateLoader != null ) ) |
of_Period0 ( ) { org . javamoney . calc . common . PresentValueOfAnnuityDue val = org . javamoney . calc . common . PresentValueOfAnnuityDue . of ( org . javamoney . calc . common . RateAndPeriods . of ( 0.08 , 0 ) ) ; "<AssertPlaceHolder>" ; } of ( org . javamoney . calc . common . Rate , int ) { return new org . java... | org . junit . Assert . assertNotNull ( val ) |
testOldConfiguration ( ) { java . lang . String address = ( "https://localhost:" + ( test . port ) ) + "/xmlsig" ; org . apache . cxf . jaxrs . client . JAXRSClientFactoryBean bean = new org . apache . cxf . jaxrs . client . JAXRSClientFactoryBean ( ) ; bean . setAddress ( address ) ; org . apache . cxf . bus . spring ... | org . junit . Assert . assertEquals ( 126L , book . getId ( ) ) |
testLineStringListOfPoint2D ( ) { final java . lang . String json = "{<sp>'type':<sp>'LineString',<sp>'coordinates':<sp>[<sp>" + "<sp>[1,2],<sp>[3,4],<sp>[5,6]<sp>]<sp>}" ; final com . allanbank . mongodb . bson . Document jsonDoc = com . allanbank . mongodb . bson . json . Json . parse ( json ) ; final com . allanbank... | org . junit . Assert . assertEquals ( jsonDoc , geoDoc ) |
test_ ( ) { cfvbaibai . cardfantasy . test . func . SkillTestContext context = prepare ( 50 , 50 , "+" , "" , "-4" ) ; context . addToField ( 0 , 0 ) ; cfvbaibai . cardfantasy . engine . CardInfo c = context . addToField ( 1 , 1 ) . setBasicHP ( 2499 ) ; cfvbaibai . cardfantasy . engine . RuneInfo c = context . addToRu... | org . junit . Assert . assertTrue ( c . isDead ( ) ) |
testMap ( ) { org . syncope . client . to . WorkflowFormPropertyTO prop = new org . syncope . client . to . WorkflowFormPropertyTO ( ) ; prop . putEnumValue ( "key1" , "value1" ) ; prop . putEnumValue ( "key2" , "value2" ) ; org . codehaus . jackson . map . ObjectMapper mapper = new org . codehaus . jackson . map . Obj... | org . junit . Assert . assertEquals ( prop , unserializedProp ) |
testMismatchedArgumentCardinalityUnequivalent ( ) { final org . openbel . framework . common . model . Namespace hgnc = new org . openbel . framework . common . model . Namespace ( "HGNC" , "http://resource.belframework.org/belframework/1.0/namespace/hgnc-approved-symbols.belns" ) ; final org . openbel . framework . co... | org . junit . Assert . assertThat ( term1 . equals ( term2 ) , org . hamcrest . CoreMatchers . is ( false ) ) |
testGetDatabaseSize ( ) { classUnderTest . setDatabaseSize ( "aTestString" ) ; "<AssertPlaceHolder>" ; } getDatabaseSize ( ) { return this . _databaseSize ; } | org . junit . Assert . assertEquals ( "aTestString" , classUnderTest . getDatabaseSize ( ) ) |
testWhenNoUserSuppliedAndAlreadyLoggedIn ( ) { repo . setUser ( null ) ; info . setUser ( "anyUser" ) ; when ( accurev . info ( any ( java . io . File . class ) ) ) . thenReturn ( info ) ; org . apache . maven . scm . provider . accurev . command . login . AccuRevLoginCommand command = new org . apache . maven . scm . ... | org . junit . Assert . assertThat ( result . isSuccess ( ) , org . hamcrest . Matchers . is ( true ) ) |
testWorker2 ( ) { java . util . List < org . ourgrid . common . specification . worker . WorkerSpecification > workers = new java . util . ArrayList < org . ourgrid . common . specification . worker . WorkerSpecification > ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( ( 2 == ( workers . size ( ) ) ) ) |
testEquals ( ) { net . sf . json . JSONObject json = new net . sf . json . JSONObject ( ) ; json . put ( com . sonymobile . tools . gerrit . gerritevents . dto . GerritEventKeys . NUMBER , "2" ) ; json . put ( com . sonymobile . tools . gerrit . gerritevents . dto . GerritEventKeys . REVISION , "ad123456789" ) ; json .... | org . junit . Assert . assertTrue ( patchSet . equals ( patchSet2 ) ) |
testForeignNoId ( ) { java . lang . reflect . Field [ ] fields = com . j256 . ormlite . field . FieldTypeTest . ForeignNoId . class . getDeclaredFields ( ) ; "<AssertPlaceHolder>" ; java . lang . reflect . Field fooField = fields [ 0 ] ; com . j256 . ormlite . field . FieldType fieldType = com . j256 . ormlite . field ... | org . junit . Assert . assertTrue ( ( ( fields . length ) >= 1 ) ) |
isAuthenticationOpenedTrue ( ) { final java . lang . String linkName = "linkName" ; final tests . unit . com . microsoft . azure . sdk . iot . device . transport . amqps . AmqpsSessionManager amqpsSessionManager = new tests . unit . com . microsoft . azure . sdk . iot . device . transport . amqps . AmqpsSessionManager ... | org . junit . Assert . assertEquals ( true , isOpened ) |
testFetchByPrimaryKeyExisting ( ) { com . liferay . portal . workflow . kaleo . model . KaleoCondition newKaleoCondition = addKaleoCondition ( ) ; com . liferay . portal . workflow . kaleo . model . KaleoCondition existingKaleoCondition = _persistence . fetchByPrimaryKey ( newKaleoCondition . getPrimaryKey ( ) ) ; "<As... | org . junit . Assert . assertEquals ( existingKaleoCondition , newKaleoCondition ) |
testAuthentication ( ) { com . racquettrack . security . oauth . OAuth2AuthenticationToken fakeResult = new com . racquettrack . security . oauth . OAuth2AuthenticationToken ( mock ( org . springframework . security . core . userdetails . UserDetails . class ) , com . racquettrack . security . oauth . OAuth2Authenticat... | org . junit . Assert . assertEquals ( fakeResult , authentication ) |
testGemeenteVanInschrijvingGevuld ( ) { final nl . bzk . migratiebrp . conversie . model . lo3 . Lo3PersoonslijstBuilder builder = new nl . bzk . migratiebrp . conversie . model . lo3 . Lo3PersoonslijstBuilder ( ) ; final nl . bzk . migratiebrp . conversie . model . lo3 . categorie . Lo3VerblijfplaatsInhoud verblijfpla... | org . junit . Assert . assertTrue ( gevuld ) |
calculateThroughput_b ( ) { java . util . Date date = new java . util . Date ( ) ; java . util . List < com . att . aro . core . packetanalysis . pojo . Throughput > testResult = new java . util . ArrayList < com . att . aro . core . packetanalysis . pojo . Throughput > ( ) ; java . util . List < com . att . aro . core... | org . junit . Assert . assertEquals ( 2 , testResult . size ( ) ) |
deveGerarXMLDeAcordoComOPadraoEstabelecido ( ) { final com . fincatto . documentofiscal . nfe310 . classes . nota . NFNotaInfoItemImpostoICMS90 icms90 = new com . fincatto . documentofiscal . nfe310 . classes . nota . NFNotaInfoItemImpostoICMS90 ( ) ; icms90 . setSituacaoTributaria ( NFNotaInfoImpostoTributacaoICMS . O... | org . junit . Assert . assertEquals ( xmlEsperado , icms90 . toString ( ) ) |
testSetAtom ( ) { org . openscience . cdk . interfaces . IAtomContainer container = ( ( org . openscience . cdk . interfaces . IAtomContainer ) ( newChemObject ( ) ) ) ; org . openscience . cdk . interfaces . IAtom c1 = container . getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IAtom . class , "C... | org . junit . Assert . assertEquals ( c2 , container . getAtom ( 0 ) ) |
testPortDriversShouldContactCanBeSet ( ) { configuration . setPortDriversShouldContact ( 1234 ) ; "<AssertPlaceHolder>" ; } getPortDriversShouldContact ( ) { if ( ( org . openqa . selenium . server . RemoteControlConfiguration . USE_SAME_PORT ) == ( portDriversShouldContact ) ) { return port ; } return portDriversShoul... | org . junit . Assert . assertEquals ( 1234 , configuration . getPortDriversShouldContact ( ) ) |
write_four_chunks ( ) { final java . util . concurrent . atomic . AtomicInteger numWrites = new java . util . concurrent . atomic . AtomicInteger ( ) ; try ( final java . io . OutputStreamWriter osw = getOutputStreamWriter ( numWrites ) ) { try ( final org . apache . commons . io . output . ChunkedWriter chunked = new ... | org . junit . Assert . assertEquals ( 4 , numWrites . get ( ) ) |
testTrainC_ClassificationDataSet_ExecutorService ( ) { System . out . println ( "trainC" ) ; jsat . classifiers . linear . kernelized . DUOL instance = new jsat . classifiers . linear . kernelized . DUOL ( new jsat . distributions . kernels . RBFKernel ( 0.5 ) ) ; jsat . classifiers . ClassificationDataSet train = jsat... | org . junit . Assert . assertEquals ( 0 , cme . getErrorRate ( ) , 0.0 ) |
initTest ( ) { org . powermock . api . mockito . PowerMockito . mockStatic ( org . camunda . bpm . spring . boot . starter . webapp . filter . LazyInitRegistration . class ) ; org . camunda . bpm . spring . boot . starter . webapp . filter . LazyDelegateFilter < javax . servlet . Filter > delegateFilter = new org . cam... | org . junit . Assert . assertSame ( filterConfigMock , delegateFilter . filterConfig ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.