input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
canIgnoreThrowables ( ) { final java . lang . AssertionError exception = new java . lang . AssertionError ( ) ; when ( mockClock . laterBy ( 0L ) ) . thenReturn ( 2L ) ; when ( mockCondition . apply ( mockDriver ) ) . thenThrow ( exception ) ; when ( mockClock . isNowBefore ( 2L ) ) . thenReturn ( false ) ; org . openq... | org . junit . Assert . assertSame ( exception , expected . getCause ( ) ) |
testCollectionPropertyToTableModelRows ( ) { System . out . println ( "collectionPropertyToTableModelRows" ) ; java . lang . String propname = "prop" ; org . apache . jmeter . gui . util . PowerTableModel modelSrc = getTestModel ( ) ; org . apache . jmeter . testelement . property . CollectionProperty propExp = kg . ap... | org . junit . Assert . assertEquals ( propExp . toString ( ) , propRes . toString ( ) ) |
buildServerContext ( ) { com . xjeffrose . xio . tls . TlsConfig tlsConfig = com . xjeffrose . xio . tls . TlsConfig . builderFrom ( com . typesafe . config . ConfigFactory . load ( "tls-reference.conf" ) ) . build ( ) ; io . netty . handler . ssl . SslContext context = com . xjeffrose . xio . tls . SslContextFactory .... | org . junit . Assert . assertNotNull ( context ) |
testEqualsSelf ( ) { org . jfree . data . time . TimePeriodValue tpv = new org . jfree . data . time . TimePeriodValue ( new org . jfree . data . time . Day ( ) , 55.75 ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == o ) { return true ; } if ( ! ( o instanceof org . jfree . base . modul... | org . junit . Assert . assertTrue ( tpv . equals ( tpv ) ) |
testCorrecteDatumOnbekend ( ) { nl . bzk . brp . bijhouding . bericht . model . GeboorteElement geboorte = new nl . bzk . brp . bijhouding . bericht . model . GeboorteElement ( attributes , new nl . bzk . brp . bijhouding . bericht . model . DatumElement ( 20160002 ) , null , null , nl . bzk . brp . bijhouding . berich... | org . junit . Assert . assertEquals ( 0 , geboorte . valideer ( ) . size ( ) ) |
testSetSegmentQualPos ( ) { org . pb . x12 . Cf cf = new org . pb . x12 . Cf ( "1000A" , "NM1" ) ; java . lang . String [ ] quals = new java . lang . String [ ] { "41" } ; cf . setSegmentQuals ( quals ) ; cf . setSegmentQualPos ( 1 ) ; "<AssertPlaceHolder>" ; } getSegmentQualPos ( ) { return segmentQualPos ; } | org . junit . Assert . assertEquals ( new java . lang . Integer ( 1 ) , cf . getSegmentQualPos ( ) ) |
testRelativeClassName ( ) { java . lang . String expected = "com.jakewharton.test.ui.SomeClass" ; java . lang . String actual = com . actionbarsherlock . internal . ActionBarSherlockCompat . cleanActivityName ( "com.jakewharton.test" , ".ui.SomeClass" ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertThat ( expected , org . hamcrest . CoreMatchers . equalTo ( actual ) ) |
shouldReportInitialStateAsOnlineIfPopulationCompletedSuccessfully ( ) { provider = newProvider ( ) ; org . neo4j . kernel . api . index . IndexPopulator populator = provider . getPopulator ( descriptor ( ) , samplingConfig ( ) ) ; populator . create ( ) ; populator . close ( true ) ; org . neo4j . internal . kernel . a... | org . junit . Assert . assertEquals ( InternalIndexState . ONLINE , state ) |
noSuchStoreAllQuery ( ) { com . github . ftrossbach . kiqr . client . service . SpecificBlockingKiqrClient < java . lang . String , java . lang . Long > client = new com . github . ftrossbach . kiqr . client . service . rest . SpecificBlockingRestKiqrClientImpl ( "localhost" , 44321 , "idontexist" , java . lang . Strin... | org . junit . Assert . assertTrue ( result . isEmpty ( ) ) |
loadWithInexistingUserOwner ( ) { org . phenotips . data . permissions . EntityPermissionsManager permissions = this . mocker . getInstance ( org . phenotips . data . permissions . EntityPermissionsManager . class ) ; org . phenotips . data . permissions . EntityAccess access = mock ( org . phenotips . data . permissio... | org . junit . Assert . assertNull ( result ) |
test_CreateTestOperation ( ) { com . hazelcast . simulator . worker . operations . CreateTestOperation op = new com . hazelcast . simulator . worker . operations . CreateTestOperation ( new com . hazelcast . simulator . common . TestCase ( "foo" ) ) ; processor . process ( op , sourceAddress , promise ) ; verify ( test... | org . junit . Assert . assertTrue ( promise . hasAnswer ( ) ) |
testChinese ( ) { byte [ ] bufferDe = org . apache . hyracks . util . string . UTF8StringUtil . writeStringToBytes ( "" ) ; byte [ ] bufferLi = org . apache . hyracks . util . string . UTF8StringUtil . writeStringToBytes ( "" ) ; int ret = org . apache . hyracks . util . string . UTF8StringUtil . compareTo ( bufferDe ,... | org . junit . Assert . assertTrue ( ( ret != 0 ) ) |
test7 ( ) { nopol_examples . nopol_example_2 . NopolExample ex = new nopol_examples . nopol_example_2 . NopolExample ( ) ; "<AssertPlaceHolder>" ; } getMax ( int , int ) { if ( ( b - a ) < 0 ) { return b ; } return a ; } | org . junit . Assert . assertEquals ( ( - 2 ) , ex . getMax ( ( - 4 ) , ( - 2 ) ) ) |
nullNodeList ( ) { com . navercorp . pinpoint . web . vo . Range range = new com . navercorp . pinpoint . web . vo . Range ( 0 , ( 60 * 1000 ) ) ; com . navercorp . pinpoint . web . applicationmap . nodes . NodeList nodeList = null ; com . navercorp . pinpoint . web . applicationmap . rawdata . LinkDataDuplexMap linkDa... | org . junit . Assert . assertNull ( nodeList ) |
testGetAllBids_Basic ( ) { org . peidevs . waro . function . impl . Round round = new org . peidevs . waro . function . impl . Round ( ) ; int numCards = 12 ; int maxCard = numCards ; org . peidevs . waro . function . impl . List < org . peidevs . waro . function . impl . Player > players = new org . peidevs . waro . f... | org . junit . Assert . assertEquals ( 3 , result . size ( ) ) |
testExtCaps111WithFullSettings ( ) { final org . geoserver . config . ServiceInfo serviceInfo = getGeoServer ( ) . getService ( org . geoserver . wcs . WCSInfo . class ) ; final org . geoserver . catalog . MetadataMap metadata = serviceInfo . getMetadata ( ) ; org . geoserver . inspire . InspireTestSupport . clearInspi... | org . junit . Assert . assertTrue ( ( ( nodeList . getLength ( ) ) == 0 ) ) |
twoEqualsImagesAreActuallyEqual ( ) { bogdan . imagefilters . effect . bitmap . SimpleBitmap equalImage = new bogdan . imagefilters . effect . bitmap . SimpleBitmap ( bogdan . imagefilters . effect . bitmap . SimpleBitmapTest . originalImageFilename ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( !... | org . junit . Assert . assertTrue ( bogdan . imagefilters . effect . bitmap . SimpleBitmapTest . bitmap . equals ( equalImage ) ) |
testPosZero ( ) { java . lang . String numA = "27384627835298756289327365" ; java . lang . String numB = "0" ; java . lang . String res = "27384627835298756289327365" ; java . math . BigInteger aNumber = new java . math . BigInteger ( numA ) ; java . math . BigInteger bNumber = new java . math . BigInteger ( numB ) ; j... | org . junit . Assert . assertTrue ( res . equals ( result . toString ( ) ) ) |
replaceWithNull ( ) { com . bjoernkw . mailtrigger . mailer . PlaceholderProcessor placeholderProcessor = new com . bjoernkw . mailtrigger . mailer . PlaceholderProcessor ( ) ; java . lang . String beginning = "Test" ; java . lang . String placeholder = "REPLACEMENT" ; java . lang . String parsedText = placeholderProce... | org . junit . Assert . assertEquals ( beginning , parsedText ) |
appConf ( ) { java . lang . String conf = ( ( java . lang . String ) ( noLivyConf . livyConfMap . get ( "name" ) ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( "test" , conf ) |
testSaml1TokenHOKConfig ( ) { 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" ) ) |
testHtml ( ) { com . xti . jenkins . plugin . awslambda . upload . LambdaUploadVariables variables = new com . xti . jenkins . plugin . awslambda . upload . LambdaUploadVariables ( false , "accessKeyId" , hudson . util . Secret . fromString ( "secretKey" ) , "nodejs" 1 , "ziplocation" , "nodejs" 2 , "nodejs" 0 , "handl... | org . junit . Assert . assertEquals ( before , after ) |
testField ( ) { com . savoirtech . logging . slf4j . json . logger . JsonLogger result = this . logger . field ( "x-field-key-x" , "x-field-value-x" ) ; "<AssertPlaceHolder>" ; } field ( java . lang . String , java . util . function . Supplier ) { try { if ( value == null ) { jsonObject . add ( key , null ) ; } else { ... | org . junit . Assert . assertSame ( result , this . logger ) |
testAdd2 ( ) { v . add ( 0 , org . apache . tools . ant . util . VectorSetTest . O ) ; v . add ( 1 , org . apache . tools . ant . util . VectorSetTest . O ) ; "<AssertPlaceHolder>" ; } size ( ) { if ( isReference ( ) ) { return getRef ( ) . size ( ) ; } dieOnCircularReference ( ) ; return streamArchives ( ) . mapToInt ... | org . junit . Assert . assertEquals ( 1 , v . size ( ) ) |
testExecuteWithExceptionAndGetJobEntityWithSecurityException ( ) { org . activiti . engine . impl . interceptor . CommandConfig config = mock ( org . activiti . engine . impl . interceptor . CommandConfig . class ) ; org . activiti . engine . impl . persistence . entity . JobEntity jobEntity = mock ( org . activiti . e... | org . junit . Assert . assertEquals ( org . finra . herd . service . activiti . SecurityException . class . getName ( ) , e . getMessage ( ) ) |
copyInputStreamValidOutputStream ( ) { java . io . ByteArrayOutputStream outputStream = new org . apache . maven . shared . utils . io . IOUtilTest . DontCloseByteArrayOutputStream ( ) ; byte [ ] input = new byte [ ] { 1 , 2 , 3 , 4 , 5 , 6 } ; org . apache . maven . shared . utils . io . IOUtil . copy ( new org . apac... | org . junit . Assert . assertThat ( outputStream . toByteArray ( ) , org . hamcrest . CoreMatchers . is ( input ) ) |
testCreate ( ) { java . util . List < com . yahoo . platform . yui . compressor . JavaScriptToken > tokens = new java . util . ArrayList ( ) ; tokens . add ( new com . yahoo . platform . yui . compressor . JavaScriptToken ( org . mozilla . javascript . Token . STRING , "Test" ) ) ; tokens . add ( new com . yahoo . plat... | org . junit . Assert . assertEquals ( 2 , tokenList . size ( ) ) |
testGetLocation ( ) { final java . net . URL location = source . getLocation ( ) ; "<AssertPlaceHolder>" ; } getLocation ( ) { return this . url ; } | org . junit . Assert . assertEquals ( this . location , location ) |
testNoConflictIfSameDiff ( ) { org . locationtech . jts . geom . Geometry oldGeom = new org . locationtech . jts . io . WKTReader ( ) . read ( "MULTILINESTRING<sp>((40<sp>40,<sp>20<sp>45,<sp>45<sp>30,<sp>40<sp>40),(20<sp>35,<sp>45<sp>10,<sp>30<sp>5,<sp>10<sp>30,<sp>20<sp>35))" ) ; org . locationtech . jts . geom . Geom... | org . junit . Assert . assertFalse ( diff . conflicts ( diff2 ) ) |
testConnectionAfterSendingRequest ( ) { initPorts ( ) ; exportServices ( server ( ) . getServer ( ) , DifferentServices . CALCULATOR_SERVICE ) ; @ com . devexperts . rmi . test . SuppressWarnings ( "unchecked" ) com . devexperts . rmi . test . RMIRequest < java . lang . Double > sum = clientPort . createRequest ( Diffe... | org . junit . Assert . assertEquals ( sum . getBlocking ( ) , ( ( java . lang . Double ) ( 12.1321 + 352.561 ) ) ) |
testWithWrongAttachment ( ) { eu . europa . esig . dss . DSSDocument doc = new eu . europa . esig . dss . FileDocument ( "src/test/resources/validation/sig_bundle.signed_detached.xml" ) ; eu . europa . esig . dss . validation . SignedDocumentValidator validator = eu . europa . esig . dss . validation . SignedDocumentVa... | org . junit . Assert . assertNotNull ( reports ) |
getNameWithoutVersion ( ) { java . lang . String nameWithoutVersion = "myNewCoolComponent" ; java . lang . String name = org . eclipse . winery . common . version . VersionUtils . getNameWithoutVersion ( getComponentName ( nameWithoutVersion , "2" , 2 , 1 ) ) ; "<AssertPlaceHolder>" ; } getComponentName ( java . lang .... | org . junit . Assert . assertEquals ( nameWithoutVersion , name ) |
testOudVoorbeeld1 ( ) { final java . util . List < nl . bzk . migratiebrp . conversie . model . lo3 . Lo3Stapel < nl . bzk . migratiebrp . conversie . model . lo3 . autorisatie . Lo3AfnemersindicatieInhoud > > afnemersIndicatieStapels = new java . util . ArrayList ( ) ; afnemersIndicatieStapels . add ( nl . bzk . migra... | org . junit . Assert . assertEquals ( 3 , resultaat . getAfnemersindicaties ( ) . size ( ) ) |
testProviderClass ( ) { org . jboss . resteasy . spi . ResteasyProviderFactory factory = new org . jboss . resteasy . core . providerfactory . ResteasyProviderFactoryImpl ( ) ; factory . register ( org . jboss . resteasy . test . providers . HeaderDelegateTest . TestHeaderDelegate . class ) ; javax . ws . rs . ext . Ru... | org . junit . Assert . assertTrue ( ( delegate instanceof org . jboss . resteasy . test . providers . HeaderDelegateTest . TestHeaderDelegate ) ) |
testUpdateAllocations ( ) { client . createExperiment ( "exp" ) . addTreatment ( "control" ) . apply ( ) ; client . updateAllocations ( "exp" ) . allocate ( "control" , 100 ) . apply ( ) ; "<AssertPlaceHolder>" ; } getAllocations ( java . lang . String ) { return resource ( io . rtr . alchemy . client . AlchemyClient .... | org . junit . Assert . assertEquals ( 1 , client . getAllocations ( "exp" ) . size ( ) ) |
testZeroSizedIteration ( ) { org . eclipse . january . dataset . IntegerDataset ind = org . eclipse . january . dataset . DatasetFactory . zeros ( org . eclipse . january . dataset . IntegerDataset . class , 0 ) ; org . eclipse . january . dataset . IntegerIterator it = new org . eclipse . january . dataset . IntegerIt... | org . junit . Assert . assertFalse ( it . hasNext ( ) ) |
getMessageFromReceiverLinkCallsAuth ( ) { 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 . AmqpsSessio... | org . junit . Assert . assertEquals ( mockAmqpsMessage , amqpsMessage ) |
importsViaMBean ( ) { javax . management . remote . JMXConnector connector = null ; try { connector = this . getJMXConnector ( ) ; javax . management . MBeanServerConnection connection = connector . getMBeanServerConnection ( ) ; javax . management . ObjectName name = new javax . management . ObjectName ( "org.apache.k... | org . junit . Assert . assertTrue ( ( ( imports . size ( ) ) > 0 ) ) |
shouldReplaceOnConsistentWithOnSameVbucketLargerSeqno ( ) { com . couchbase . client . core . message . kv . MutationToken token1 = new com . couchbase . client . core . message . kv . MutationToken ( 1 , 1234 , 1000 , "bucket1" ) ; com . couchbase . client . core . message . kv . MutationToken token2 = new com . couch... | org . junit . Assert . assertEquals ( expected , result ) |
testUsesConfig ( ) { com . spotify . apollo . core . Service service = com . spotify . apollo . core . ServiceImpl . builder ( "test" ) . build ( ) ; com . typesafe . config . Config config = com . typesafe . config . ConfigFactory . empty ( ) . withValue ( "this.key" , com . typesafe . config . ConfigValueFactory . fr... | org . junit . Assert . assertThat ( instance . getConfig ( ) . getString ( "this.key" ) , org . hamcrest . Matchers . is ( "value<sp>for<sp>this.key" ) ) |
test ( ) { org . pentaho . commons . util . repository . CreateFolderRequest request = new org . pentaho . commons . util . repository . CreateFolderRequest ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( request ) |
testText_null ( ) { hyperlink . setText ( null ) ; "<AssertPlaceHolder>" ; } getText ( ) { checkWidget ( ) ; return getText ( 0 ) ; } | org . junit . Assert . assertEquals ( "" , hyperlink . getText ( ) ) |
shouldBeTrueWhenTrueOrFalse ( ) { final org . pitest . functional . predicate . Or < java . lang . Object > testee = or ( ( i ) -> true , org . pitest . functional . predicate . False . instance ( ) ) ; "<AssertPlaceHolder>" ; } test ( java . lang . String ) { return this . includedClassPathElement . contains ( a ) ; } | org . junit . Assert . assertTrue ( testee . test ( null ) ) |
testAddDeleteSequenceEmptyNumberArray ( ) { org . neo4j . kernel . impl . store . DynamicArrayStore store = createDynamicArrayStore ( ) ; byte [ ] emptyToWrite = createBytes ( 0 ) ; long blockId = create ( store , emptyToWrite ) ; store . getRecords ( blockId , org . neo4j . kernel . impl . store . NORMAL ) ; byte [ ] ... | org . junit . Assert . assertEquals ( 0 , bytes . length ) |
pay_notify ( ) { com . alibaba . fastjson . JSONObject notify = new com . alibaba . fastjson . JSONObject ( ) ; notify . put ( "amount" , "0b5b42d30f015b46316eff00000004" 3 ) ; notify . put ( "0b5b42d30f015b46316eff00000004" 0 , "0b5b42d30f015b46316eff00000004" 6 ) ; notify . put ( "123" 1 , "0b5b42d30f015b46316eff0000... | org . junit . Assert . assertTrue ( ( ( voucher . code ) == 0 ) ) |
testFindByPrimaryKeyExisting ( ) { com . liferay . message . boards . model . MBStatsUser newMBStatsUser = addMBStatsUser ( ) ; com . liferay . message . boards . model . MBStatsUser existingMBStatsUser = _persistence . findByPrimaryKey ( newMBStatsUser . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ... | org . junit . Assert . assertEquals ( existingMBStatsUser , newMBStatsUser ) |
testNodeList ( ) { try ( com . syncleus . ferma . tx . Tx tx = tx ( ) ) { com . gentics . mesh . core . rest . schema . SchemaModel folderSchema = schemaContainer ( "folder" ) . getLatestVersion ( ) . getSchema ( ) ; com . gentics . mesh . core . rest . schema . SchemaModel contentSchema = schemaContainer ( "content" )... | org . junit . Assert . assertNotNull ( deserializedList ) |
validateEmpty ( ) { "<AssertPlaceHolder>" ; } validator ( ) { return null ; } | org . junit . Assert . assertFalse ( mapping . validator ( ) . validate ( "" ) ) |
testGetFileNames_withoutCompletedFiles_forSingle ( ) { dialog = new org . eclipse . swt . widgets . FileDialog_Test . TestFileDialog ( shell , org . eclipse . swt . SWT . SINGLE ) ; dialog . open ( callback ) ; completedFileNames = new java . lang . String [ 0 ] ; getOKButton ( ) . notifyListeners ( SWT . Selection , n... | org . junit . Assert . assertArrayEquals ( new java . lang . String [ 0 ] , fileNames ) |
shouldReturnFieldDefinitionForThreeLevelsDeepPath ( ) { com . qcadoo . model . api . DataDefinition firstBtDataDef = mock ( com . qcadoo . model . api . DataDefinition . class ) ; mockBelongsToField ( "firstBelongsTo" , dataDefinition , firstBtDataDef ) ; com . qcadoo . model . api . DataDefinition secondBtDataDef = mo... | org . junit . Assert . assertEquals ( fieldDefinition , res ) |
testLookupStruct ( ) { org . eclipse . tracecompass . ctf . core . event . types . StructDefinition result = fixture . lookupStruct ( org . eclipse . tracecompass . ctf . core . tests . types . VariantDefinitionTest . ENUM_6 ) ; "<AssertPlaceHolder>" ; } lookupStruct ( java . lang . String ) { return fStructs . get ( n... | org . junit . Assert . assertNull ( result ) |
testExceptionStripping ( ) { final org . apache . flink . util . FlinkException expectedException = new org . apache . flink . util . FlinkException ( "test<sp>exception" ) ; final java . lang . Throwable strippedException = org . apache . flink . util . ExceptionUtils . stripException ( new java . lang . RuntimeExcept... | org . junit . Assert . assertThat ( strippedException , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . equalTo ( expectedException ) ) ) |
deploymentTest ( ) { javax . sql . DataSource ds = ( ( javax . sql . DataSource ) ( ctx . lookup ( "java:jboss/datasources/securityDs" ) ) ) ; java . sql . Connection con = null ; try { con = ds . getConnection ( ) ; "<AssertPlaceHolder>" ; } finally { if ( con != null ) { con . close ( ) ; } } } getConnection ( ) { if... | org . junit . Assert . assertNotNull ( con ) |
testOnInventoryClickOtherHolderStillAllowed ( ) { when ( island . isAllowed ( org . mockito . Mockito . any ( ) , org . mockito . Mockito . any ( ) ) ) . thenReturn ( false ) ; org . bukkit . inventory . InventoryView view = mock ( org . bukkit . inventory . InventoryView . class ) ; when ( view . getPlayer ( ) ) . the... | org . junit . Assert . assertFalse ( e . isCancelled ( ) ) |
testGetStringValue ( ) { org . wikidata . wdtk . datamodel . helpers . StringValue o1 = org . wikidata . wdtk . datamodel . helpers . Datamodel . makeStringValue ( "foo" ) ; org . wikidata . wdtk . datamodel . helpers . StringValue o2 = factory . getStringValue ( "foo" ) ; "<AssertPlaceHolder>" ; } getStringValue ( jav... | org . junit . Assert . assertEquals ( o1 , o2 ) |
getUser ( ) { com . github . cypher . sdk . User u1 = client . getUser ( "test" ) ; client . getUser ( "some" ) ; com . github . cypher . sdk . User u2 = client . getUser ( "test" ) ; "<AssertPlaceHolder>" ; } getUser ( java . lang . String ) { return userRepository . get ( id ) ; } | org . junit . Assert . assertSame ( u1 , u2 ) |
testEqualsSameObject ( ) { org . bff . javampd . output . MPDOutput item = new org . bff . javampd . output . MPDOutput ( 1 ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == object ) { return true ; } if ( ( object == null ) || ( ( object . getClass ( ) ) != ( this . getClass ( ) ) ) ) { ... | org . junit . Assert . assertTrue ( item . equals ( item ) ) |
testSFBug1014344_1 ( ) { java . lang . String filename_cml = "data/cml/bug1014344-1.cml" ; java . lang . String filename_mol = "data/mdl/bug1014344-1.mol" ; java . io . InputStream ins1 = this . getClass ( ) . getClassLoader ( ) . getResourceAsStream ( filename_cml ) ; java . io . InputStream ins2 = this . getClass ( )... | org . junit . Assert . assertEquals ( moleculeSmile1 , moleculeSmile2 ) |
testAlphaRangeBelowZero ( ) { try { new org . apache . commons . math4 . random . StableRandomGenerator ( rg , ( - 1.0 ) , 0.0 ) ; org . junit . Assert . fail ( "Expected<sp>OutOfRangeException" ) ; } catch ( org . apache . commons . math4 . exception . OutOfRangeException e ) { "<AssertPlaceHolder>" ; } } getArgument ... | org . junit . Assert . assertEquals ( ( - 1.0 ) , e . getArgument ( ) ) |
testConstructorFromRegistry ( ) { org . dayatang . ioc . tapestry . factory . TapestryInstanceProvider provider2 = new org . dayatang . ioc . tapestry . factory . TapestryInstanceProvider ( createRegistry ( org . dayatang . ioc . tapestry . factory . TapestryModule . class ) ) ; org . dayatang . ioc . test . Service1 s... | org . junit . Assert . assertEquals ( "MyService1" , service . name ( ) ) |
removeCollaboratorWithMissingObject ( ) { when ( this . entityDoc . getXObject ( org . phenotips . data . permissions . internal . DefaultEntityAccessManagerTest . COLLABORATOR_CLASS , org . phenotips . data . permissions . internal . DefaultEntityAccessManagerTest . COLLABORATOR_LABEL , org . phenotips . data . permis... | org . junit . Assert . assertFalse ( this . component . removeCollaborator ( this . entity , collaborator ) ) |
testMul ( ) { org . nd4j . linalg . api . ops . executioner . OpExecutioner opExecutioner = org . nd4j . linalg . factory . Nd4j . getExecutioner ( ) ; org . nd4j . linalg . api . ndarray . INDArray x = org . nd4j . linalg . factory . Nd4j . ones ( 5 ) ; org . nd4j . linalg . api . ndarray . INDArray xDup = x . dup ( )... | org . junit . Assert . assertEquals ( solution , x ) |
shouldHaveNextFromCache ( ) { final org . apache . kafka . streams . state . internals . MergedSortedCacheWindowStoreKeyValueIterator mergeIterator = createIterator ( java . util . Collections . emptyIterator ( ) , cacheKvs ) ; "<AssertPlaceHolder>" ; } hasNext ( ) { return false ; } | org . junit . Assert . assertTrue ( mergeIterator . hasNext ( ) ) |
testStatelessLocalFromRemote ( javax . naming . InitialContext ) { org . jboss . as . test . multinode . remotecall . StatefulRemote bean = ( ( org . jboss . as . test . multinode . remotecall . StatefulRemote ) ( ctx . lookup ( ( ( ( "java:module/" + ( org . jboss . as . test . multinode . remotecall . StatefulBean . ... | org . junit . Assert . assertNotNull ( bean ) |
checkpointInfo ( ) { com . google . common . collect . ImmutableMap < java . lang . String , java . lang . String > props = com . google . common . collect . ImmutableMap . of ( "one" , "1" , "two" , "2" , "three" , "2" ) ; java . lang . String cp = store . checkpoint ( Long . MAX_VALUE , props ) ; "<AssertPlaceHolder>... | org . junit . Assert . assertEquals ( props , store . checkpointInfo ( cp ) ) |
shouldMutateASingleVariableSolutionWithSameLowerAndUpperBoundsReturnTheBoundValue ( ) { @ org . uma . jmetal . operator . impl . mutation . SuppressWarnings ( "unchecked" ) org . uma . jmetal . util . pseudorandom . RandomGenerator < java . lang . Double > randomGenerator = mock ( org . uma . jmetal . util . pseudorand... | org . junit . Assert . assertEquals ( 1 , ( ( long ) ( solution . getVariableValue ( 0 ) ) ) ) |
testMultithreadMultiPartition ( ) { com . jolbox . bonecp . CommonTestUtils . logTestInfo ( "Test<sp>multiple<sp>threads<sp>hitting<sp>a<sp>multiple<sp>partitions<sp>concurrently" ) ; config . setAcquireIncrement ( 5 ) ; config . setMinConnectionsPerPartition ( 10 ) ; config . setMaxConnectionsPerPartition ( 25 ) ; con... | org . junit . Assert . assertEquals ( 0 , dsb . getTotalLeased ( ) ) |
test ( ) { "<AssertPlaceHolder>" ; org . springframework . jms . core . JmsTemplate template = testContext . getBean ( org . springframework . jms . core . JmsTemplate . class ) ; javax . jms . Destination archiefQueue = testContext . getBean ( "archiefQueue" , javax . jms . Destination . class ) ; for ( int i = 0 ; i ... | org . junit . Assert . assertNotNull ( nl . bzk . migratiebrp . tools . brp . routering . Main . getContext ( ) ) |
testGetType ( ) { org . apache . ambari . view . UnsupportedPropertyException exception = new org . apache . ambari . view . UnsupportedPropertyException ( "type" , java . util . Collections . singleton ( "p1" ) ) ; "<AssertPlaceHolder>" ; } getType ( ) { return TargetType . ALERT_SCRIPT . name ( ) ; } | org . junit . Assert . assertEquals ( "type" , exception . getType ( ) ) |
testSetArray ( ) { final org . scijava . util . FloatArray array = new org . scijava . util . FloatArray ( ) ; final float [ ] raw = new float [ ] { 1 , 2 , 3 , 5 , 8 , 13 , 21 } ; array . setArray ( raw ) ; "<AssertPlaceHolder>" ; } getArray ( ) { return array ; } | org . junit . Assert . assertSame ( raw , array . getArray ( ) ) |
simple3Layers ( ) { final org . kie . workbench . common . stunner . core . graph . processing . layout . sugiyama . LayeredGraph graph = new org . kie . workbench . common . stunner . core . graph . processing . layout . sugiyama . LayeredGraph ( ) ; graph . addEdge ( "A" , "B" ) ; graph . addEdge ( "A" , "C" ) ; grap... | org . junit . Assert . assertEquals ( 3 , result . size ( ) ) |
validateCharacterSerialization ( ) { byte [ ] payload = org . apache . directmemory . serialization . StandardSerializerTest . serializer . serialize ( 'z' ) ; char res = org . apache . directmemory . serialization . StandardSerializerTest . serializer . deserialize ( payload , org . apache . directmemory . serializati... | org . junit . Assert . assertEquals ( 'z' , res ) |
testFunctionWithRestMetadata ( ) { java . lang . String script = "remote<sp>User<sp>function<sp>getUser(numeric<sp>userid<sp>restargsource=\"Path\")<sp>httpmethod=\"GET\"<sp>restpath=\"{userid}\"<sp>{}" ; cfml . CFSCRIPTParser . ScriptBlockContext scriptStatement = parseScript ( script ) ; if ( ( fCfmlParser . getMessa... | org . junit . Assert . assertNotNull ( scriptStatement ) |
test_StatusTextListener_hoverMouseOverLink ( ) { java . util . concurrent . atomic . AtomicBoolean statusChanged = new java . util . concurrent . atomic . AtomicBoolean ( false ) ; int size = 500 ; org . eclipse . swt . chromium . Browser browser = new org . eclipse . swt . chromium . Browser ( shell , org . eclipse . ... | org . junit . Assert . assertTrue ( msg , passed ) |
test8 ( ) { symbolic_examples . symbolic_example_3 . NopolExample ex = new symbolic_examples . symbolic_example_3 . NopolExample ( ) ; "<AssertPlaceHolder>" ; } isOddNumber ( int ) { int tmp = ( a - 1 ) % 2 ; if ( tmp != 0 ) { return true ; } return false ; } | org . junit . Assert . assertTrue ( ( ! ( ex . isOddNumber ( ( 100 / 2 ) ) ) ) ) |
tree_iter_2_02 ( ) { int [ ] keys = new int [ ] { 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 } ; org . apache . jena . dboe . index . RangeIndex rIndex = makeRangeIndex ( 2 ) ; org . apache . jena . dboe . index . test . IndexTestLib . add ( rIndex , keys ) ; java . util . List < java . lang . Integer > x = toIntList ( rInd... | org . junit . Assert . assertEquals ( expected , x ) |
getTagsAsCommaSeparatedString_shouldReturnEmptyString_null ( ) { java . lang . String result = p . getTagsAsCommaSeparatedString ( null ) ; "<AssertPlaceHolder>" ; } getTagsAsCommaSeparatedString ( java . util . List ) { java . lang . StringBuilder result = new java . lang . StringBuilder ( ) ; if ( propertyTags != nul... | org . junit . Assert . assertEquals ( "" , result ) |
testDoCommandWithoutWaitingWithResultAlreadyThereWithPI ( ) { configuration = new org . openqa . selenium . server . RemoteControlConfiguration ( ) ; configuration . setTimeoutInSeconds ( org . openqa . selenium . server . CommandQueueUnitTest . defaultTimeout ) ; configuration . setProxyInjectionModeArg ( true ) ; cq ... | org . junit . Assert . assertEquals ( org . openqa . selenium . server . CommandQueueUnitTest . testResult , cq . peekAtResult ( ) ) |
findAny ( ) { java . lang . String uri = org . lightcouch . tests . DocumentsCRUDTest . dbClient . getBaseUri ( ) . toString ( ) ; com . google . gson . JsonObject jsonObject = org . lightcouch . tests . DocumentsCRUDTest . dbClient . findAny ( com . google . gson . JsonObject . class , uri ) ; "<AssertPlaceHolder>" ; ... | org . junit . Assert . assertNotNull ( jsonObject ) |
deveGerarXMLDeAcordoComOPadraoEstabelecido ( ) { final com . fincatto . documentofiscal . nfe310 . classes . nota . NFNotaInfoItemImpostoICMSSN201 icms201 = new com . fincatto . documentofiscal . nfe310 . classes . nota . NFNotaInfoItemImpostoICMSSN201 ( ) ; icms201 . setModalidadeBCICMSST ( NFNotaInfoItemModalidadeBCI... | org . junit . Assert . assertEquals ( xmlEsperado , icms201 . toString ( ) ) |
shouldGetIdentifierTypeFromName ( ) { for ( final uk . gov . gchq . gaffer . data . element . IdentifierType idType : uk . gov . gchq . gaffer . data . element . IdentifierType . values ( ) ) { "<AssertPlaceHolder>" ; } } fromName ( java . lang . String ) { return uk . gov . gchq . gaffer . data . element . IdentifierT... | org . junit . Assert . assertEquals ( idType , uk . gov . gchq . gaffer . data . element . IdentifierType . fromName ( idType . name ( ) ) ) |
doesNotHaveResultOnEmptyResults ( ) { org . jenkinsci . plugins . postbuildscript . model . PostBuildItem postBuildItem = new org . jenkinsci . plugins . postbuildscript . model . PostBuildItem ( java . util . Collections . emptySet ( ) ) ; "<AssertPlaceHolder>" ; } hasResult ( ) { return ! ( results . isEmpty ( ) ) ; ... | org . junit . Assert . assertThat ( postBuildItem . hasResult ( ) , org . hamcrest . CoreMatchers . is ( false ) ) |
testRunListenableFutureWithCallback ( ) { bbejeck . guava . futures . ListenableFuture < java . lang . String > futureTask = executorService . submit ( new bbejeck . guava . futures . ListenableFuturesTest . Task ( ) ) ; futureTask . addListener ( new java . lang . Runnable ( ) { @ bbejeck . guava . futures . Override ... | org . junit . Assert . assertThat ( callbackRan , org . hamcrest . CoreMatchers . is ( true ) ) |
sumLong ( ) { com . gs . collections . api . set . ImmutableSet < java . lang . Integer > objects = this . newSetWith ( 1 , 2 , 3 ) ; long actual = objects . sumOfLong ( Integer :: longValue ) ; "<AssertPlaceHolder>" ; } sumOfLong ( com . gs . collections . api . block . function . primitive . LongFunction ) { return 0... | org . junit . Assert . assertEquals ( 6 , actual ) |
sequenceWithCopyContextMap ( ) { mdcAdapter . put ( "k0" , "v0" ) ; java . util . Map < java . lang . String , java . lang . String > map0 = mdcAdapter . copyOnThreadLocal . get ( ) ; mdcAdapter . getCopyOfContextMap ( ) ; mdcAdapter . put ( "k1" , "v1" ) ; "<AssertPlaceHolder>" ; } get ( ) { E r = null ; if ( ( numEle... | org . junit . Assert . assertSame ( map0 , mdcAdapter . copyOnThreadLocal . get ( ) ) |
testChildDenied ( ) { org . uberfire . security . authz . Permission p1 = new org . uberfire . security . impl . authz . DotNamedPermission ( "resource.read" , true ) ; org . uberfire . security . authz . Permission p2 = new org . uberfire . security . impl . authz . DotNamedPermission ( "resource.read.id1" , false ) ;... | org . junit . Assert . assertFalse ( p1 . implies ( p2 ) ) |
testgetFileAsStringSuccess ( ) { java . lang . String string = com . onelogin . saml2 . util . Util . getFileAsString ( "config/config.certfile.properties" ) ; "<AssertPlaceHolder>" ; } getFileAsString ( java . lang . String ) { java . io . InputStream is = com . onelogin . saml2 . util . Util . class . getResourceAsSt... | org . junit . Assert . assertNotNull ( string ) |
test_bs_init_writable ( ) { org . jerlang . type . Binary expected = new org . jerlang . type . Binary ( new int [ ] { 97 , 98 , 99 } ) ; org . jerlang . type . List params = org . jerlang . type . List . nil ; org . jerlang . type . Term result = org . jerlang . erts . Erlang . apply ( org . jerlang . type . Atom . of... | org . junit . Assert . assertEquals ( expected , result ) |
testWatchUnwatchMultiExec ( ) { java . lang . String wkey = "watch-key" ; redis1 . watch ( wkey ) ; redis1 . set ( wkey , "1" ) ; redis1 . unwatch ( ) ; io . craft . atom . redis . api . RedisTransaction t = redis1 . multi ( ) ; t . set ( key , value ) ; redis1 . exec ( t ) ; java . lang . String v = redis1 . get ( key... | org . junit . Assert . assertEquals ( value , v ) |
getGraphTransactions ( ) { org . gradoop . flink . model . impl . layouts . transactional . tuples . GraphTransaction tx0 = new org . gradoop . flink . model . impl . layouts . transactional . tuples . GraphTransaction ( org . gradoop . flink . model . impl . layouts . gve . GVELayoutTest . g0 , com . google . common .... | org . junit . Assert . assertEquals ( tx0 , from ( singletonList ( org . gradoop . flink . model . impl . layouts . gve . GVELayoutTest . g0 ) , asList ( org . gradoop . flink . model . impl . layouts . gve . GVELayoutTest . v0 , org . gradoop . flink . model . impl . layouts . gve . GVELayoutTest . v1 ) , singletonLis... |
geeftOutputBestand ( ) { final java . nio . file . Path output = fileHandler . geefOutputFile ( "not-1-expected.xml" ) ; "<AssertPlaceHolder>" ; } toFile ( ) { return null ; } | org . junit . Assert . assertFalse ( output . toFile ( ) . exists ( ) ) |
test_toEpochSecond_19700101_minusOneNano ( ) { java . time . OffsetDateTime dt = java . time . OffsetDateTime . of ( java . time . LocalDate . of ( 1969 , 12 , 31 ) , java . time . LocalTime . of ( 23 , 59 , 59 , 999999999 ) , ZoneOffset . UTC ) ; "<AssertPlaceHolder>" ; } toEpochSecond ( ) { return dateTime . toEpochS... | org . junit . Assert . assertEquals ( dt . toEpochSecond ( ) , ( - 1 ) ) |
whenSearchingWithFilterQuery_thenAllMatchingItemsShouldAvialble ( ) { com . baeldung . solr . fulltext . search . service . ItemSearchServiceLiveTest . itemSearchService . index ( "hm0001" , "hm0003" 0 , "Home<sp>Appliances" , 100.0F ) ; com . baeldung . solr . fulltext . search . service . ItemSearchServiceLiveTest . ... | org . junit . Assert . assertEquals ( 2 , items . size ( ) ) |
shouldGetAccount ( ) { when ( accountServiceMock . get ( 1 ) ) . thenReturn ( immutableAccountMock ) ; com . jayway . service . ImmutableAccount account = bankController . get ( 1 ) ; "<AssertPlaceHolder>" ; } get ( java . lang . Integer ) { com . jayway . repository . AccountEntity account = getAccountEntity ( account... | org . junit . Assert . assertThat ( account , org . hamcrest . CoreMatchers . is ( immutableAccountMock ) ) |
getHandle_no_uri ( ) { ezvcard . property . Impp impp = new ezvcard . property . Impp ( ( ( java . lang . String ) ( null ) ) ) ; "<AssertPlaceHolder>" ; } getHandle ( ) { if ( ( uri ) == null ) { return null ; } return uri . getSchemeSpecificPart ( ) ; } | org . junit . Assert . assertNull ( impp . getHandle ( ) ) |
testPrimitiveArray ( ) { org . evosuite . EvoSuite evosuite = new org . evosuite . EvoSuite ( ) ; java . lang . String targetClass = com . examples . with . different . packagename . assertion . ArrayPrimitiveWrapper . class . getCanonicalName ( ) ; org . evosuite . Properties . TARGET_CLASS = targetClass ; org . evosu... | org . junit . Assert . assertFalse ( hasSameAssertion ) |
testInit ( ) { java . lang . String [ ] args = org . gstreamer . Gst . init ( "InitTest" , new java . lang . String [ ] { "--gst-plugin-spew" } ) ; "<AssertPlaceHolder>" ; org . gstreamer . Gst . deinit ( ) ; } init ( java . lang . String , java . lang . String [ ] ) { if ( ( org . gstreamer . Gst . initCount . getAndI... | org . junit . Assert . assertTrue ( ( ( args . length ) == 0 ) ) |
setPath ( io . vertx . core . http . HttpServerRequest ) { io . vertx . ext . web . impl . HttpServerRequestWrapper wrapper = new io . vertx . ext . web . impl . HttpServerRequestWrapper ( request ) ; io . vertx . ext . web . impl . HttpServerRequestUtils . setPath ( wrapper , "abc" ) ; "<AssertPlaceHolder>" ; } setPat... | org . junit . Assert . assertEquals ( "abc" , wrapper . path ( ) ) |
testStreamingAdded ( ) { final org . apache . oozie . fluentjob . api . action . Streaming streaming = new org . apache . oozie . fluentjob . api . action . StreamingBuilder ( ) . withMapper ( "mapper.sh" ) . withReducer ( "reducer.sh" ) . build ( ) ; final org . apache . oozie . fluentjob . api . action . MapReduceAct... | org . junit . Assert . assertEquals ( streaming , mrAction . getStreaming ( ) ) |
shouldGetProductionEnv ( ) { when ( java . lang . System . getProperty ( "pagseguro.environment" ) ) . thenReturn ( "production" ) ; br . com . uol . pagseguro . api . PagSeguroEnv expectedEnv = br . com . uol . pagseguro . api . PagSeguroEnv . PRODUCTION ; br . com . uol . pagseguro . api . PagSeguroEnv env = provider... | org . junit . Assert . assertEquals ( expectedEnv , env ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.