input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testReadAndWrite ( ) { java . io . File path = new java . io . File ( org . apache . hadoop . io . nativeio . TestSharedFileDescriptorFactory . TEST_BASE , "testReadAndWrite" ) ; path . mkdirs ( ) ; org . apache . hadoop . io . nativeio . SharedFileDescriptorFactory factory = org . apache . hadoop . io . nativeio . Sha... | org . junit . Assert . assertEquals ( 101 , inStream . read ( ) ) |
testEraseWithOffset ( ) { de . persosim . simulator . cardobjects . ElementaryFile file = new de . persosim . simulator . cardobjects . ElementaryFile ( new de . persosim . simulator . cardobjects . FileIdentifier ( 0 ) , new de . persosim . simulator . cardobjects . ShortFileIdentifier ( 1 ) , new byte [ ] { 1 , 2 , 3... | org . junit . Assert . assertArrayEquals ( new byte [ ] { 1 , 2 , 0 , 0 } , file . getContent ( ) ) |
testGetEstimation ( ) { final org . apache . hadoop . yarn . server . resourcemanager . reservation . RLESparseResourceAllocation skylineList2 = new org . apache . hadoop . yarn . server . resourcemanager . reservation . RLESparseResourceAllocation ( resourceOverTime , new org . apache . hadoop . yarn . util . resource... | org . junit . Assert . assertEquals ( skylineList2 . getCapacityAtTime ( i ) , estimation . getCapacityAtTime ( i ) ) |
fullRange ( ) { for ( int i = 1 ; i <= 3999 ; i ++ ) { java . lang . String numeral = NumberSystem . ROMAN . toNumeral ( i ) ; "<AssertPlaceHolder>" ; } } toInteger ( java . lang . String ) { return this . toInteger ( numeral , Leniency . SMART ) ; } | org . junit . Assert . assertThat ( NumberSystem . ROMAN . toInteger ( numeral ) , org . hamcrest . CoreMatchers . is ( i ) ) |
testGetNamespaces ( ) { final java . util . Map < java . lang . String , java . lang . String > namespaces = new java . util . HashMap ( ) ; namespaces . put ( "ldp" , "http://www.w3.org/ns/ldp#" ) ; registry . setNamespaces ( namespaces ) ; "<AssertPlaceHolder>" ; } getNamespaces ( ) { if ( ( namespaces ) == null ) { ... | org . junit . Assert . assertEquals ( "http://www.w3.org/ns/ldp#" , registry . getNamespaces ( ) . get ( "ldp" ) ) |
testSetAsUp ( ) { link13 . setFailureState ( true ) ; srgL13 . setAsUp ( ) ; "<AssertPlaceHolder>" ; } isDown ( ) { return layer . cache_multicastTreesDown . contains ( this ) ; } | org . junit . Assert . assertTrue ( ( ! ( link13 . isDown ( ) ) ) ) |
testMatchExactlyClassErr ( ) { queriesString = "type=node&enabled=true&status=established&path=node_id=node01,port_id=port01" ; target = new org . o3project . odenos . core . component . network . flow . query . BasicFlowQuery ( queriesString ) ; target . parse ( ) ; org . o3project . odenos . core . component . networ... | org . junit . Assert . assertThat ( target . matchExactly ( flow ) , org . hamcrest . CoreMatchers . is ( false ) ) |
testSerialization2 ( ) { org . jfree . data . statistics . DefaultStatisticalCategoryDataset d1 = new org . jfree . data . statistics . DefaultStatisticalCategoryDataset ( ) ; d1 . add ( 1.2 , 3.4 , "Row<sp>1" , "Column<sp>1" ) ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; jav... | org . junit . Assert . assertEquals ( d1 , d2 ) |
test ( ) { org . tests . inheritance . OrganizationTreeNode treeNode = new org . tests . inheritance . OrganizationTreeNode ( ) ; treeNode . setName ( "tree" ) ; org . tests . inheritance . OrganizationUnit node = new org . tests . inheritance . OrganizationUnit ( ) ; node . setTitle ( "node" ) ; treeNode . setOrganiza... | org . junit . Assert . assertEquals ( node , treeNode . getOrganizationNode ( ) ) |
testCopyToBuilder ( ) { org . onosproject . incubator . net . l2monitoring . cfm . MaintenanceDomain mdCopy = org . onosproject . incubator . net . l2monitoring . cfm . DefaultMaintenanceDomain . builder ( md1 ) . build ( ) ; "<AssertPlaceHolder>" ; } build ( ) { return new org . onosproject . drivers . lisp . extensio... | org . junit . Assert . assertEquals ( md1 , mdCopy ) |
inputParameters ( ) { java . lang . Object inputParameters = new java . lang . Object ( ) ; context . setInputParameters ( inputParameters ) ; "<AssertPlaceHolder>" ; } getInputParameters ( ) { return ( ( T ) ( inputParameters ) ) ; } | org . junit . Assert . assertSame ( inputParameters , context . getInputParameters ( ) ) |
validateEmptyFields ( ) { mFirstField . setText ( "" ) ; mSecondField . setText ( "" ) ; com . throrinstudio . android . common . libs . validator . validate . OrTwoRequiredValidate orTwoRequiredValidate = new com . throrinstudio . android . common . libs . validator . validate . OrTwoRequiredValidate ( mFirstField , m... | org . junit . Assert . assertFalse ( orTwoRequiredValidate . isValid ( ) ) |
assertNextForSkipAll ( ) { org . apache . shardingsphere . core . parse . old . parser . context . limit . Limit limit = new org . apache . shardingsphere . core . parse . old . parser . context . limit . Limit ( ) ; limit . setOffset ( new org . apache . shardingsphere . core . parse . old . parser . context . limit .... | org . junit . Assert . assertFalse ( actual . next ( ) ) |
testContext ( ) { org . locationtech . geogig . repository . Context context = mock ( org . locationtech . geogig . repository . Context . class ) ; org . locationtech . geogig . repository . AbstractGeoGigOp < java . lang . String > testOp = new org . locationtech . geogig . repository . AbstractGeoGigOp < java . lang... | org . junit . Assert . assertEquals ( context , testOp . context ( ) ) |
testGetEmptyRestrictions ( ) { javax . jcr . Value [ ] vs = createEntry ( java . util . Collections . < org . apache . jackrabbit . oak . spi . security . authorization . restriction . Restriction > emptySet ( ) ) . getRestrictions ( AccessControlConstants . REP_GLOB ) ; "<AssertPlaceHolder>" ; } getRestrictions ( java... | org . junit . Assert . assertNull ( vs ) |
deleteUserinfoById ( ) { boolean b = studentDBService . deleteUserinfoById ( 0 ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertThat ( b , is ( true ) ) |
testSystemVariableAsDefaultValue ( ) { methodWatcher . executeUpdate ( "alter<sp>table<sp>t1<sp>add<sp>column<sp>e1<sp>varchar(30)<sp>not<sp>null<sp>default<sp>USER" ) ; sql = format ( "13<sp>|<sp>3<sp>|<sp>3<sp>|999<sp>|Alice<sp>|\n" 3 , useSparkString ) ; expected = "A1<sp>|B1<sp>|C1<sp>|D1<sp>|<sp>E1<sp>|\n" + ( ( (... | org . junit . Assert . assertEquals ( expected , TestUtils . FormattedResult . ResultFactory . toString ( rs ) ) |
isValidTrue ( ) { com . braintreegateway . util . NodeWrapper wrapper = mock ( com . braintreegateway . util . NodeWrapper . class ) ; java . util . Calendar disbursementDate = com . braintreegateway . testhelpers . CalendarTestUtils . date ( "2013-04-10" ) ; when ( wrapper . findDate ( "disbursement-date" ) ) . thenRe... | org . junit . Assert . assertTrue ( detail . isValid ( ) ) |
testRegTestGenesisBlock ( ) { org . bitcoinj . core . Block genesis = org . libdohj . params . LitecoinRegTestParamsTest . params . getGenesisBlock ( ) ; "<AssertPlaceHolder>" ; } getGenesisBlock ( ) { synchronized ( org . libdohj . params . LitecoinRegTestParams . class ) { if ( ( org . libdohj . params . LitecoinRegT... | org . junit . Assert . assertEquals ( "530827f38f93b43ed12af0b3ad25a288dc02ed74d6d7857862df51fc56c416f9" , genesis . getHashAsString ( ) ) |
testDeleteHost ( ) { java . util . List < com . intel . mtwilson . as . data . TblTaLog > taLogs = new java . util . ArrayList < com . intel . mtwilson . as . data . TblTaLog > ( ) ; taLogs . add ( new com . intel . mtwilson . as . data . TblTaLog ( 1 ) ) ; taLogs . add ( new com . intel . mtwilson . as . data . TblTaL... | org . junit . Assert . assertTrue ( response . equalsIgnoreCase ( "true" ) ) |
testGetSourceSetter ( ) { org . apache . tiles . ognl . PropertyAccessorDelegateFactory < java . lang . Integer > factory = createMock ( org . apache . tiles . ognl . PropertyAccessorDelegateFactory . class ) ; ognl . PropertyAccessor mockAccessor = createMock ( ognl . PropertyAccessor . class ) ; ognl . OgnlContext co... | org . junit . Assert . assertEquals ( "method" , accessor . getSourceSetter ( context , 1 , "property" ) ) |
transBlobFile_3 ( ) { java . lang . String str = "Hello<sp>World" ; { org . apache . jena . dboe . transaction . txn . journal . Journal journal = org . apache . jena . dboe . transaction . txn . journal . Journal . create ( org . apache . jena . dboe . base . file . Location . create ( org . apache . jena . dboe . tra... | org . junit . Assert . assertEquals ( str , s ) |
removeHostNameFromURL_withPort ( ) { java . lang . String url = "http://site.com:80/page" ; java . lang . String urlWithoutHost = "http://:80/page" ; "<AssertPlaceHolder>" ; } removeHostNameFromURL ( java . lang . String ) { try { int doubleSlash = url . indexOf ( "//" ) ; int firstSingleSlash = url . indexOf ( "/" , (... | org . junit . Assert . assertEquals ( urlWithoutHost , handler . removeHostNameFromURL ( url ) ) |
testPNG ( ) { java . lang . String dir = "src/test/resources/png/img%d.png" ; java . lang . String raw = "src/test/resources/png/img%d.raw" ; org . jcodec . codecs . png . PNGDecoder pngDec = new org . jcodec . codecs . png . PNGDecoder ( ) ; for ( int i = 0 ; i <= 6 ; i ++ ) { java . io . File f = new java . io . File... | org . junit . Assert . assertArrayEquals ( ( "" + i ) , array , dec . getPlaneData ( 0 ) ) |
multipleEmptyConeSearch ( ) { org . purl . wf4ever . astrotaverna . vorepo . VORepository repo = new org . purl . wf4ever . astrotaverna . vorepo . VORepository ( ) ; java . util . List < net . ivoa . xml . voresource . v1 . Service > resources = repo . resourceSearch ( net . ivoa . xml . conesearch . v1 . ConeSearch .... | org . junit . Assert . assertTrue ( resources . isEmpty ( ) ) |
getCidTest ( ) { cloud . artik . model . MessageOut messageOut = new cloud . artik . model . MessageOut ( ) ; "<AssertPlaceHolder>" ; } getCid ( ) { return cid ; } | org . junit . Assert . assertNull ( messageOut . getCid ( ) ) |
testGetString ( ) { final org . pentaho . metadata . model . concept . Concept concept = mock ( org . pentaho . metadata . model . concept . Concept . class ) ; final java . lang . String id = "id" ; final java . lang . String result = "result" ; when ( concept . getProperty ( eq ( id ) ) ) . thenReturn ( result ) ; fi... | org . junit . Assert . assertEquals ( result , string ) |
testFindProductAvailableToSellQuantityProduct5AccSHOP10 ( ) { final java . util . List < org . yes . cart . domain . entity . Warehouse > shop10wh = warehouseService . getByShopId ( 10L , false ) ; java . util . Map < java . lang . String , java . math . BigDecimal > skusWarehouse = skuWarehouseService . getProductAvai... | org . junit . Assert . assertEquals ( 0 , skusWarehouse . size ( ) ) |
reverseMap_A$Function1 ( ) { com . m3 . scalaflavor4j . Nil < java . lang . String > nil = com . m3 . scalaflavor4j . Nil . < java . lang . String > apply ( ) ; com . m3 . scalaflavor4j . Seq < java . lang . Integer > actual = nil . reverseMap ( new com . m3 . scalaflavor4j . F1 < java . lang . String , java . lang . I... | org . junit . Assert . assertThat ( actual . isEmpty ( ) , org . hamcrest . CoreMatchers . is ( true ) ) |
test_createdTimestamp_OffsetDateTime ( ) { io . ebeaninternal . server . deploy . meta . DeployBeanProperty prop = new io . ebeaninternal . server . deploy . meta . DeployBeanProperty ( null , java . time . OffsetDateTime . class , null , null ) ; io . ebeaninternal . server . deploy . generatedproperty . GeneratedProp... | org . junit . Assert . assertTrue ( ( value instanceof java . time . OffsetDateTime ) ) |
testGetConnection1 ( ) { java . net . HttpURLConnection c = ( ( java . net . HttpURLConnection ) ( com . cedarsoftware . util . UrlUtilities . getConnection ( "http://www.yahoo.com" , true , false , false ) ) ) ; "<AssertPlaceHolder>" ; c . connect ( ) ; com . cedarsoftware . util . UrlUtilities . disconnect ( c ) ; } ... | org . junit . Assert . assertNotNull ( c ) |
shouldBuildVersionFromNormalVersion ( ) { com . github . zafarkhaja . semver . Version . Builder builder = new com . github . zafarkhaja . semver . Version . Builder ( "1.0.0" ) ; "<AssertPlaceHolder>" ; } valueOf ( java . lang . String ) { return com . github . zafarkhaja . semver . VersionParser . parseValidSemVer ( ... | org . junit . Assert . assertEquals ( com . github . zafarkhaja . semver . Version . valueOf ( "1.0.0" ) , builder . build ( ) ) |
testToURI ( ) { java . net . URI expected = new java . net . URI ( instance . toString ( ) ) ; java . net . URI actual = instance . toURI ( ) ; "<AssertPlaceHolder>" ; } toURI ( ) { try { return new java . net . URI ( toString ( ) ) ; } catch ( java . net . URISyntaxException e ) { throw new java . lang . IllegalArgume... | org . junit . Assert . assertEquals ( expected , actual ) |
shouldUnproxifyCDIProxies ( ) { br . com . caelum . vraptor . proxy . AnyProxiableBean bean = unproxifyIfPossible ( proxiable ) ; "<AssertPlaceHolder>" ; } isCDIProxy ( java . lang . Class ) { return org . jboss . weld . bean . proxy . ProxyObject . class . isAssignableFrom ( type ) ; } | org . junit . Assert . assertFalse ( isCDIProxy ( bean . getClass ( ) ) ) |
testIsErrorSession ( ) { com . sparkplatform . api . SparkSession session = new com . sparkplatform . api . SparkSession ( ) ; session . setError ( "error" ) ; "<AssertPlaceHolder>" ; } hasError ( ) { return ( getError ( ) ) != null ; } | org . junit . Assert . assertTrue ( session . hasError ( ) ) |
d_loadQueryRestrictionStrategyAsGreaterTest ( ) { org . geosdi . geoplatform . connector . server . request . v110 . query . repository . QueryRestrictionStrategy < org . geosdi . geoplatform . xml . filter . v110 . ComparisonOpsType > greaterStrategy = org . geosdi . geoplatform . connector . wfs . services . WFSQuery... | org . junit . Assert . assertNotNull ( greaterStrategy ) |
testInjectionPointWithTypesAndQualifiersOnly ( ) { @ org . jboss . weld . tests . extensions . injectionPointWithTypesAndQualifiersOnly . SuppressWarnings ( "unchecked" ) javax . enterprise . inject . spi . Bean < org . jboss . weld . tests . extensions . injectionPointWithTypesAndQualifiersOnly . DummyBean > bean = ( ... | org . junit . Assert . assertEquals ( 5 , ( ( org . jboss . weld . tests . extensions . injectionPointWithTypesAndQualifiersOnly . DummyBean ) ( o ) ) . getSomeValue ( ) ) |
testCanIRI2 ( ) { java . lang . String query = "PREFIX<sp>:<sp><http://ontop.inf.unibz.it/test/wellbore#><sp>Select<sp>DISTINCT<sp>?x<sp>WHERE{\n" + ( "?x<sp>a<sp>:Wellbore<sp>.\n" + "}\n" ) ; java . util . ArrayList < java . lang . String > results = runTests ( query ) ; "<AssertPlaceHolder>" ; } size ( ) { return ont... | org . junit . Assert . assertEquals ( 5 , results . size ( ) ) |
whenSettingPriorities_itShouldBeSetCorrectly ( ) { com . graphhopper . jsprit . core . problem . job . Delivery s = Delivery . Builder . newInstance ( "s" ) . setLocation ( com . graphhopper . jsprit . core . problem . Location . newInstance ( "loc" ) ) . setPriority ( 3 ) . build ( ) ; "<AssertPlaceHolder>" ; } getPri... | org . junit . Assert . assertEquals ( 3 , s . getPriority ( ) ) |
testBuildTableNameNonRootServicePathDataModelByServicePathOldEncoding ( ) { System . out . println ( ( ( ( getTestTraceHead ( "[NGSIPostgreSQLSink.buildTableName]" ) ) + "--------<sp>When<sp>a<sp>non<sp>root<sp>service-path<sp>is<sp>notified/defaulted<sp>and<sp>data_model<sp>is<sp>" ) + "'dm-by-service-path'<sp>the<sp>... | org . junit . Assert . assertEquals ( expecetedTableName , builtTableName ) |
should_return_this ( ) { org . fest . assertions . api . FileAssert returned = assertions . hasContentEqualTo ( actual , charSet ) ; "<AssertPlaceHolder>" ; } hasContentEqualTo ( java . io . File , java . nio . charset . Charset ) { files . assertEqualContent ( description , actual , expected , charset ) ; return this ... | org . junit . Assert . assertSame ( assertions , returned ) |
testEquals ( ) { io . protostuff . compiler . it . java_bean_primitives . PrimitiveFields x = new io . protostuff . compiler . it . java_bean_primitives . PrimitiveFields ( 2 , 3L ) ; io . protostuff . compiler . it . java_bean_primitives . PrimitiveFields y = new io . protostuff . compiler . it . java_bean_primitives ... | org . junit . Assert . assertEquals ( x , y ) |
testNamespaceCaseInsensitive ( ) { java . lang . String child = "" + ( new java . util . Random ( ) . nextInt ( 100000000 ) ) ; com . google . firebase . database . DatabaseReference ref1 = com . google . firebase . database . FirebaseDatabase . getInstance ( com . google . firebase . database . integration . DataTestI... | org . junit . Assert . assertEquals ( "testdata" , snap . getValue ( ) ) |
testBuilderKModuleHasSnapshotDependency ( ) { org . guvnor . m2repo . backend . server . M2ServletContextListener context = new org . guvnor . m2repo . backend . server . M2ServletContextListener ( ) ; org . guvnor . common . services . project . model . GAV gav = new org . guvnor . common . services . project . model ... | org . junit . Assert . assertTrue ( results . getMessages ( ) . isEmpty ( ) ) |
testFindAll ( ) { me . lb . model . system . User u1 = new me . lb . model . system . User ( "test1" , "test" ) ; me . lb . model . system . User u2 = new me . lb . model . system . User ( "test2" , "test" ) ; userDao . save ( u1 ) ; userDao . save ( u2 ) ; "<AssertPlaceHolder>" ; } findAll ( ) { return dao . findAll (... | org . junit . Assert . assertEquals ( 2 , userDao . findAll ( ) . size ( ) ) |
cloneAsVersionTest ( ) { final org . opendaylight . controller . cluster . access . commands . ModifyTransactionRequest clone = org . opendaylight . controller . cluster . access . commands . ModifyTransactionRequestEmptyTest . OBJECT . cloneAsVersion ( ABIVersion . BORON ) ; "<AssertPlaceHolder>" ; } cloneAsVersion ( ... | org . junit . Assert . assertEquals ( org . opendaylight . controller . cluster . access . commands . ModifyTransactionRequestEmptyTest . OBJECT , clone ) |
convert100MBValue ( ) { java . lang . String newSize = org . eclipse . che . ide . util . Bytes . toHumanSize ( "100MB" ) ; "<AssertPlaceHolder>" ; } toHumanSize ( java . lang . String ) { return org . eclipse . che . ide . util . Bytes . toHumanSize ( org . eclipse . che . ide . util . Bytes . fromHumanSize ( humanSiz... | org . junit . Assert . assertEquals ( "100MB" , newSize ) |
nested ( ) { final org . apache . drill . exec . memory . Accountant parent = new org . apache . drill . exec . memory . Accountant ( null , 0 , Long . MAX_VALUE ) ; ensureAccurateReservations ( parent ) ; "<AssertPlaceHolder>" ; } getAllocatedMemory ( ) { return locallyHeldMemory . get ( ) ; } | org . junit . Assert . assertEquals ( 0 , parent . getAllocatedMemory ( ) ) |
should_not_call_discordant_pair_for_supplementary_alignments ( ) { htsjdk . samtools . SAMRecord r = DP ( 0 , 1 , "10M" , true , 1 , 10 , "10M" , false ) [ 0 ] ; r . setSupplementaryAlignmentFlag ( true ) ; com . google . common . collect . ImmutableList < au . edu . wehi . idsv . DirectedEvidence > list = com . google... | org . junit . Assert . assertEquals ( 0 , list . size ( ) ) |
mapSource ( ) { java . util . Map < java . lang . String , java . lang . String > properties = java . util . Collections . singletonMap ( "foo" , "bar" ) ; com . pholser . util . properties . InvokingToStringOnBoundProxiesTest . Schema bound = binder . bind ( properties ) ; java . lang . String asString = bound . toStr... | org . junit . Assert . assertThat ( asString , containsString ( properties . toString ( ) ) ) |
testEditLogFailOverFromCorrupt ( ) { java . io . File f1 = new java . io . File ( ( ( org . apache . hadoop . hdfs . server . namenode . TestEditLog . TEST_DIR ) + "/failover0" ) ) ; java . io . File f2 = new java . io . File ( ( ( org . apache . hadoop . hdfs . server . namenode . TestEditLog . TEST_DIR ) + "/failover... | org . junit . Assert . assertEquals ( 1 , files . length ) |
shouldCheckLockHeldFromFromLockDao ( ) { com . mongodb . MongoClient mongoClient = mock ( com . mongodb . MongoClient . class ) ; com . mongodb . client . MongoDatabase db = new com . github . fakemongo . Fongo ( com . github . mongobee . dao . ChangeEntryDaoTest . TEST_SERVER ) . getDatabase ( com . github . mongobee ... | org . junit . Assert . assertTrue ( lockHeld ) |
noUuidOnCert ( ) { mockCert ( "OU=something" ) ; when ( this . consumerCurator . findByUuid ( anyString ( ) ) ) . thenReturn ( new org . candlepin . model . Consumer ( "machine_name" , "test<sp>user" , null , null ) ) ; "<AssertPlaceHolder>" ; } getPrincipal ( org . jboss . resteasy . spi . HttpRequest ) { try { java .... | org . junit . Assert . assertNull ( this . auth . getPrincipal ( httpRequest ) ) |
WHEN_batch_size_is_configured_to_be_null_THEN_that_configuration_is_ignored ( ) { com . bigvisible . kanbansimulator . Simulator stimulator = new com . bigvisible . kanbansimulator . SimulatorEngine ( ) ; stimulator . setNumberOfIterationsToRun ( 2 ) ; stimulator . addParameter ( startingAt ( 1 ) . setBatchSize ( 10 ) ... | org . junit . Assert . assertEquals ( 10 , secondIteration . getBatchSize ( ) ) |
testDeleteReadOnly ( ) { setStackStatus ( StatusEnum . READ_ONLY , org . sagebionetworks . repo . web . StackStatusInterceptorTest . MSG_FORMAT ) ; "<AssertPlaceHolder>" ; servletTestHelper . deleteEntity ( dispatchServlet , org . sagebionetworks . repo . model . Project . class , sampleProject . getId ( ) , adminUserI... | org . junit . Assert . assertEquals ( StatusEnum . READ_ONLY , stackStatusDao . getCurrentStatus ( ) ) |
setFetchCount ( ) { timeline . setFetchCount ( book . twju . chapter_2 . Listing_4_ImplicitSetup_TimelineTest . NEW_FETCH_COUNT ) ; "<AssertPlaceHolder>" ; } getFetchCount ( ) { return fetchCount ; } | org . junit . Assert . assertEquals ( book . twju . chapter_2 . Listing_4_ImplicitSetup_TimelineTest . NEW_FETCH_COUNT , timeline . getFetchCount ( ) ) |
test_4 ( ) { final org . erlide . core . builder . CompilerOptions prefs = new org . erlide . core . builder . CompilerOptions ( ) ; prefs . setListOption ( CompilerOptions . DEFINE , new org . eclipse . xtext . xbase . lib . Pair ( "Macro" , "[value,1]" ) ) ; final java . lang . String actual = prefs . export ( ) . to... | org . junit . Assert . assertEquals ( expect , actual ) |
testDeweyVersionToNewRun ( ) { com . github . fhuss . kafka . streams . cep . nfa . DeweyVersion version = new com . github . fhuss . kafka . streams . cep . nfa . DeweyVersion ( 1 ) . addRun ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { final java . lang . StringBuilder sb = new java . lang . StringBuilder ( "StockEv... | org . junit . Assert . assertEquals ( version . toString ( ) , "2" ) |
testNotRemovedById ( ) { T object = createSampleObjectWithNullId ( ) ; "<AssertPlaceHolder>" ; } remove ( T extends com . onplan . domain . persistent . PersistentObject ) { com . onplan . dao . TestingAbstractDao . checkNotNull ( object ) ; return removeById ( object . getId ( ) ) ; } | org . junit . Assert . assertFalse ( dao . remove ( object ) ) |
parseMvnUrlWithDefaultDomainAndAarType ( ) { java . net . URI seen = com . facebook . buck . file . downloader . impl . MavenUrlDecoder . toHttpUrl ( java . util . Optional . of ( "http://foo.bar" ) , new java . net . URI ( "mvn:org.jdeferred:jdeferred-android-aar:aar:1.2.4" ) ) ; java . net . URI expected = new java .... | org . junit . Assert . assertEquals ( expected , seen ) |
test5entries ( ) { final com . adobe . acs . commons . httpcache . store . jcr . impl . visitor . mock . RootNodeMockFactory . Settings settings = new com . adobe . acs . commons . httpcache . store . jcr . impl . visitor . mock . RootNodeMockFactory . Settings ( ) ; settings . setEntryNodeCount ( 5 ) ; final javax . j... | org . junit . Assert . assertEquals ( 5 , cache . size ( ) ) |
selectExecutorsOnlyOneWorkerAvailable ( ) { java . util . Map < alluxio . wire . WorkerInfo , alluxio . job . util . SerializableVoid > result = selectExecutorsTestHelper ( com . google . common . collect . Lists . < alluxio . wire . BlockLocation > newArrayList ( ) , 1 , com . google . common . collect . Lists . newAr... | org . junit . Assert . assertEquals ( expected , result ) |
testGetByBarcodeListEmpty ( ) { "<AssertPlaceHolder>" ; } getByBarcodeList ( java . util . Collection ) { if ( barcodeList . isEmpty ( ) ) { return java . util . Collections . emptyList ( ) ; } org . hibernate . Criteria criteria = currentSession ( ) . createCriteria ( uk . ac . bbsrc . tgac . miso . core . data . impl... | org . junit . Assert . assertEquals ( 0 , dao . getByBarcodeList ( new java . util . ArrayList < java . lang . String > ( ) ) . size ( ) ) |
saveUdas_ConcurrentChangeOfDefinition ( ) { voDef . setVersion ( ( - 1 ) ) ; try { ua . saveUdas ( java . util . Arrays . asList ( voUda ) , supplier ) ; } finally { "<AssertPlaceHolder>" ; } } getUdaValue ( ) { return uda . getUdaValue ( ) ; } | org . junit . Assert . assertFalse ( uda . getUdaValue ( ) . equals ( voUda . getUdaValue ( ) ) ) |
testStructAccessor ( ) { java . util . List < java . util . List < java . lang . Object > > rows = new java . util . ArrayList ( ) ; for ( java . lang . Object o : columnInputBundle . inputValues ) { rows . add ( java . util . Collections . singletonList ( o ) ) ; } try ( org . apache . calcite . avatica . util . Curso... | org . junit . Assert . assertArrayEquals ( expectedStructAttributes , actualStructAttributes ) |
testCount ( ) { java . lang . Double [ ] nums = new org . support . project . common . statistic . Double [ ] { 1.0 , 2.0 , 3.5 , 4.0 , 5.5 , 6.0 } ; java . lang . Integer total = org . support . project . common . statistic . Statistics . count ( nums ) ; System . out . println ( ( ( ( org . support . project . common... | org . junit . Assert . assertEquals ( new java . lang . Integer ( 6 ) , total ) |
getLast ( ) { "<AssertPlaceHolder>" ; } newSetWith ( int , int , int ) { return org . eclipse . collections . impl . set . strategy . immutable . ImmutableUnifiedSetWithHashingStrategy . newSetWith ( org . eclipse . collections . impl . set . strategy . immutable . ImmutableUnifiedSetWithHashingStrategyTest . HASHING_S... | org . junit . Assert . assertNotNull ( this . newSetWith ( 1 , 2 , 3 ) . getLast ( ) ) |
testMyname ( ) { com . jfireframework . context . JfireContext jfireContext = new com . jfireframework . context . JfireContextImpl ( "com.jfireframework.context.test.function.aop" ) ; com . jfireframework . context . test . function . aop . Person person = jfireContext . getBean ( com . jfireframework . context . test... | org . junit . Assert . assertEquals ( "" , person . myName ( "" ) ) |
redAndBlackNotEqual ( ) { nl . jqno . equalsverifier . testhelpers . types . PointContainer red = pointContainerAccessor . getRedObject ( TypeTag . NULL ) ; nl . jqno . equalsverifier . testhelpers . types . PointContainer black = pointContainerAccessor . getBlackObject ( TypeTag . NULL ) ; "<AssertPlaceHolder>" ; } eq... | org . junit . Assert . assertFalse ( red . equals ( black ) ) |
whenCallingForNewInstanceOfBuilder_itShouldReturnBuilderCorrectly ( ) { jsprit . core . problem . job . Service . Builder builder = Service . Builder . newInstance ( "s" ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( builder ) |
setPartitionValueTest ( ) { com . splicemachine . orc . block . ShortColumnBlock shortColumnBlock = new com . splicemachine . orc . block . ShortColumnBlock ( null , org . apache . spark . sql . types . DataTypes . ShortType ) ; shortColumnBlock . setPartitionValue ( "5" , 1000 ) ; short value = 5 ; for ( int i = 0 ; i... | org . junit . Assert . assertEquals ( value , shortColumnBlock . getTestObject ( i ) ) |
testNoResult ( ) { com . couchbase . jdbc . JDBCTestUtils . setConnection ( null ) ; org . json . simple . JSONObject obj = new org . json . simple . JSONObject ( ) ; java . util . HashMap < java . lang . String , java . lang . Object > map = new java . util . HashMap < java . lang . String , java . lang . Object > ( )... | org . junit . Assert . assertEquals ( expectedArray , actualArray ) |
isNullOrEmpty_called_with_empty ( ) { java . lang . String value = "" ; java . lang . Boolean expResult = true ; java . lang . Boolean result = com . microsoft . azure . sdk . iot . provisioning . service . Tools . isNullOrEmpty ( value ) ; "<AssertPlaceHolder>" ; } isNullOrEmpty ( java . lang . String ) { java . lang ... | org . junit . Assert . assertEquals ( expResult , result ) |
validate_shouldNotThrowNPEWhenUserIsNull ( ) { org . springframework . validation . Errors errors = new org . springframework . validation . BindException ( new org . openmrs . User ( ) , "user" ) ; validator . validate ( null , errors ) ; "<AssertPlaceHolder>" ; } validate ( java . lang . Object , org . springframewor... | org . junit . Assert . assertTrue ( true ) |
testCaching ( ) { org . ojai . FieldPath fp1 = org . ojai . FieldPath . parseFrom ( "a.b.c[4]" ) ; org . ojai . FieldPath fp2 = org . ojai . FieldPath . parseFrom ( "a.b.c[4]" ) ; "<AssertPlaceHolder>" ; } parseFrom ( java . lang . String ) { if ( fieldPath == null ) { throw new java . lang . NullPointerException ( "Ca... | org . junit . Assert . assertSame ( fp1 , fp2 ) |
testGetReceiverTypeOfTopLevelConstructorIsNull ( ) { compile ( com . google . common . base . Joiner . on ( '\n' ) . join ( "class<sp>Foo<sp>{" , "<sp>Foo<sp>()<sp>{<sp>}" , "}" ) ) ; javax . lang . model . element . ExecutableElement element = findDefaultConstructor ( elements . getTypeElement ( "Foo" ) ) ; javax . la... | org . junit . Assert . assertNull ( receiverType ) |
switchIndexesTest ( ) { final fr . gouv . vitam . logbook . operations . client . LogbookOperationsClient client = fr . gouv . vitam . logbook . operations . client . LogbookOperationsClientFactory . getInstance ( ) . getClient ( ) ; "<AssertPlaceHolder>" ; } switchIndexes ( fr . gouv . vitam . common . database . para... | org . junit . Assert . assertNotNull ( client . switchIndexes ( new fr . gouv . vitam . common . database . parameter . SwitchIndexParameters ( ) ) ) |
testNewInstanceForcingType ( ) { org . easymock . Capture < ? extends java . lang . Number > capture = newCapture ( ) ; org . easymock . tests . IMethods mock = createMock ( org . easymock . tests . IMethods . class ) ; expect ( mock . oneArg ( capture ( capture ) ) ) . andStubReturn ( "1" ) ; replay ( mock ) ; mock . ... | org . junit . Assert . assertEquals ( 1L , capture . getValue ( ) ) |
shouldFindByCityAndName ( ) { java . lang . String name = "Bath<sp>Travelodge" ; org . springframework . springfaces . traveladvisor . domain . Hotel hotel = this . hotelRepository . findByCityAndName ( this . bath , name ) ; "<AssertPlaceHolder>" ; } getName ( ) { return this . name ; } | org . junit . Assert . assertThat ( hotel . getName ( ) , org . hamcrest . CoreMatchers . is ( name ) ) |
testRemoveClassWithSpaces ( ) { com . vaadin . flow . dom . ClassList cl = com . vaadin . flow . dom . ElementFactory . createDiv ( ) . getClassList ( ) ; cl . add ( "foo" ) ; cl . add ( "bar" ) ; cl . remove ( "foo<sp>bar" ) ; "<AssertPlaceHolder>" ; } size ( ) { return pendingInvocations . length ( ) ; } | org . junit . Assert . assertEquals ( 2 , cl . size ( ) ) |
oraclePageSqlTest ( ) { cn . hutool . db . Page page = new cn . hutool . db . Page ( 1 , 10 ) ; cn . hutool . db . Entity where = cn . hutool . db . Entity . create ( "PMCPERFORMANCEINFO" ) . set ( "yearPI" , "2017" ) ; final cn . hutool . db . sql . Query query = new cn . hutool . db . sql . Query ( cn . hutool . db .... | org . junit . Assert . assertEquals ( ok , builder . toString ( ) ) |
list ( ) { s . open ( "/" ) ; s . click ( org . openqa . selenium . By . linkText ( "CMS" ) ) ; "<AssertPlaceHolder>" ; } getTitle ( ) { return title ; } | org . junit . Assert . assertEquals ( "CMS" , s . getTitle ( ) ) |
testNewClassPathResource ( ) { org . kie . internal . builder . KnowledgeBuilder kbuilder = org . kie . internal . builder . KnowledgeBuilderFactory . newKnowledgeBuilder ( ) ; kbuilder . add ( org . kie . internal . io . ResourceFactory . newClassPathResource ( "test_I18nPerson_utf8_forTestNewClassPathResource.drl" , ... | org . junit . Assert . assertTrue ( list . contains ( "" ) ) |
testJavaDeriver ( ) { org . artificer . integration . java . artifactbuilder . MavenPomArtifactBuilder builder = new org . artificer . integration . java . artifactbuilder . MavenPomArtifactBuilder ( ) ; org . oasis_open . docs . s_ramp . ns . s_ramp_v1 . ExtendedDocument artifact = new org . oasis_open . docs . s_ramp... | org . junit . Assert . assertNotNull ( artifact . getProperty ( ) ) |
testSplit_3 ( ) { java . util . Set < java . util . List < java . lang . Integer > > matchers = new java . util . HashSet ( java . util . Arrays . asList ( java . util . Arrays . asList ( 67 , 112 , 96 ) , java . util . Arrays . asList ( 74 , 112 , 76 ) ) ) ; org . apache . fontbox . ttf . gsub . GlyphArraySplitter tes... | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( java . util . Arrays . asList ( 94 ) , java . util . Arrays . asList ( 67 , 112 , 96 ) , java . util . Arrays . asList ( 112 , 91 , 103 ) ) , tokens ) |
relatedActivitiesShouldBeAssigned ( ) { context . getAssociatedActivities ( ) . add ( mock ( com . graphhopper . jsprit . core . problem . solution . route . activity . TourActivity . class ) ) ; context . getAssociatedActivities ( ) . add ( mock ( com . graphhopper . jsprit . core . problem . solution . route . activi... | org . junit . Assert . assertEquals ( 2 , context . getAssociatedActivities ( ) . size ( ) ) |
testRunScheduledProcessor ( ) { com . olacabs . fabric . compute . ProcessorTestBenchTest . Counter counter = new com . olacabs . fabric . compute . ProcessorTestBenchTest . Counter ( ) ; java . util . List < com . olacabs . fabric . model . event . EventSet > events = new com . olacabs . fabric . compute . ProcessorTe... | org . junit . Assert . assertEquals ( 1 , totalCount ) |
testWithBadMessage ( ) { org . apache . metron . profiler . spark . function . MessageRouterFunction function = new org . apache . metron . profiler . spark . function . MessageRouterFunction ( profile ( ) , getGlobals ( ) ) ; java . util . Iterator < org . apache . metron . profiler . MessageRoute > iter = function . ... | org . junit . Assert . assertEquals ( 0 , routes . size ( ) ) |
testIsErrorEnabled ( ) { expect ( mock . isErrorEnabled ( ) ) . andReturn ( true ) ; replay ( mock ) ; final fr . gouv . vitam . common . logging . VitamLogger logger = fr . gouv . vitam . common . logging . VitamLoggerFactory . getInstance ( "mock" ) ; "<AssertPlaceHolder>" ; verify ( mock ) ; } isErrorEnabled ( ) { r... | org . junit . Assert . assertTrue ( logger . isErrorEnabled ( ) ) |
testCrea ( ) { mx . edu . um . mateo . general . model . Usuario usuario = obtieneUsuario ( ) ; mx . edu . um . mateo . contabilidad . facturas . model . Contrarecibo contrarecibo = new mx . edu . um . mateo . contabilidad . facturas . model . Contrarecibo ( ) ; contrarecibo . setFechaPago ( new java . util . Date ( ) ... | org . junit . Assert . assertNotNull ( contrarecibo . getId ( ) ) |
testUpdateBillingUnitForBillingNumber ( ) { oscar . entities . Billingmaster b = new oscar . entities . Billingmaster ( ) ; b . setBillingUnit ( "AS" ) ; b . setBillingNo ( 999 ) ; dao . save ( b ) ; int i = dao . updateBillingUnitForBillingNumber ( "BU" , 999 ) ; "<AssertPlaceHolder>" ; } updateBillingUnitForBillingNu... | org . junit . Assert . assertTrue ( ( i == 1 ) ) |
testLoadSourceRepForUrlRefresh ( ) { final java . lang . String URL_FROM_CLUSTER = "urlFromCluster" ; org . pentaho . metastore . api . IMetaStore mockMetaStore = mock ( org . pentaho . metastore . api . IMetaStore . class ) ; org . pentaho . big . data . api . cluster . NamedCluster mockNamedCluster = mock ( org . pen... | org . junit . Assert . assertEquals ( URL_FROM_CLUSTER , hadoopFileOutputMeta . loadSourceRep ( mockRep , null , mockMetaStore ) ) |
testPhysicalAccountsForCurrentlyConsumed ( ) { consumer . setFact ( org . candlepin . policy . js . quantity . QuantityRulesTest . SOCKET_FACT , "4" ) ; pool . getProduct ( ) . setAttribute ( org . candlepin . policy . js . quantity . QuantityRulesTest . SOCKET_ATTRIBUTE , "1" ) ; org . candlepin . model . Entitlement ... | org . junit . Assert . assertEquals ( new java . lang . Long ( 2 ) , suggested . getSuggested ( ) ) |
shouldNotEqualGivenSubClass ( ) { uk . co . webamoeba . mockito . collections . util . LinkedSortedSet < java . lang . Object > set = new uk . co . webamoeba . mockito . collections . util . LinkedSortedSet < java . lang . Object > ( ) ; uk . co . webamoeba . mockito . collections . util . LinkedSortedSet < ? > subClas... | org . junit . Assert . assertFalse ( equals ) |
shouldReturnTrueIfNotZero ( ) { boolean value = evaluator . evaluateBoolean ( "id" , new org . apache . ibatis . domain . blog . Author ( 1 , "cbegin" , null , "cbegin@apache.org" , "N/A" , org . apache . ibatis . domain . blog . Section . NEWS ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( true , value ) |
hasMethod_shouldFail ( ) { boolean result = com . spotify . apollo . test . unit . RouteMatchers . hasUri ( "PUT" ) . matches ( com . spotify . apollo . test . unit . RouteMatchersTest . TEST_ROUTE ) ; "<AssertPlaceHolder>" ; } hasUri ( java . lang . String ) { return new com . spotify . apollo . test . unit . RouteMat... | org . junit . Assert . assertFalse ( result ) |
testGetNodeGettingNotExistingNode ( ) { target = org . mockito . Mockito . spy ( new org . o3project . odenos . core . component . network . topology . Topology ( "101" , nodes , links ) ) ; org . o3project . odenos . core . component . network . topology . Node result = target . getNode ( "node3_id123" ) ; "<AssertPla... | org . junit . Assert . assertNull ( result ) |
testNewQueryId ( ) { org . apache . tajo . QueryId qid1 = org . apache . tajo . LocalTajoTestingUtility . newQueryId ( ) ; org . apache . tajo . QueryId qid2 = org . apache . tajo . LocalTajoTestingUtility . newQueryId ( ) ; "<AssertPlaceHolder>" ; } compareTo ( org . apache . tajo . QueryId ) { int result = id . compa... | org . junit . Assert . assertTrue ( ( ( qid1 . compareTo ( qid2 ) ) < 0 ) ) |
testGqlQueryPagination ( ) { java . util . List < com . google . datastore . v1 . RunQueryResponse > responses = buildResponsesForQueryPagination ( ) ; for ( int i = 0 ; i < ( responses . size ( ) ) ; i ++ ) { org . easymock . EasyMock . expect ( rpcMock . runQuery ( org . easymock . EasyMock . anyObject ( com . google... | org . junit . Assert . assertEquals ( count , 5 ) |
testRewritePomWithImportedDependencyManagementInReactor ( ) { java . util . List < org . apache . maven . project . MavenProject > reactorProjects = createReactorProjects ( "imported-dependency-management-in-reactor" ) ; org . apache . maven . shared . release . config . ReleaseDescriptorBuilder builder = createMappedC... | org . junit . Assert . assertTrue ( comparePomFiles ( reactorProjects ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.