input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testReadInputStream ( ) { try ( java . io . InputStream source = new java . io . ByteArrayInputStream ( sourceBytes ) ) { "<AssertPlaceHolder>" ; } } read ( java . io . InputStream , int ) { if ( count == 0 ) { return new byte [ 0 ] ; } final java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStrea... | org . junit . Assert . assertEquals ( sourceBytes . length , net . yacy . kelondro . util . FileUtils . read ( source , ( ( sourceBytes . length ) + 10 ) ) . length ) |
testLiteralWithStrings ( ) { org . apache . commons . jexl3 . JexlExpression e = org . apache . commons . jexl3 . JEXL . createExpression ( "[<sp>'foo'<sp>,<sp>'bar'<sp>]" ) ; org . apache . commons . jexl3 . JexlContext jc = new org . apache . commons . jexl3 . MapContext ( ) ; java . lang . Object o = e . evaluate ( ... | org . junit . Assert . assertTrue ( java . util . Arrays . equals ( check , ( ( java . lang . Object [ ] ) ( o ) ) ) ) |
testBevatAlleenAnummerWijzigingenMeerWijzigingen ( ) { final nl . bzk . algemeenbrp . dal . domein . brp . entity . Persoon persoon = new nl . bzk . algemeenbrp . dal . domein . brp . entity . Persoon ( nl . bzk . algemeenbrp . dal . domein . brp . enums . SoortPersoon . INGESCHREVENE ) ; final nl . bzk . algemeenbrp .... | org . junit . Assert . assertFalse ( resultaat . bevatAlleenAnummerWijzigingen ( persoon ) ) |
testSynthesisCollectWithEmptyOracle ( ) { fr . inria . main . evolution . AstorMain main1 = new fr . inria . main . evolution . AstorMain ( ) ; fr . inria . main . CommandSummary cs = fr . inria . astor . test . repair . evaluation . regression . MathCommandsTests . getMath70Command ( ) ; cs . command . put ( "-flthres... | org . junit . Assert . assertEquals ( 1 , main1 . getEngine ( ) . getVariants ( ) . size ( ) ) |
testVersionPartialOverlapAcrossMinReverse ( ) { org . jboss . forge . furnace . versions . VersionRange versionRange1 = org . jboss . forge . furnace . versions . Versions . parseVersionRange ( "(10,20)" ) ; org . jboss . forge . furnace . versions . VersionRange versionRange2 = org . jboss . forge . furnace . versions... | org . junit . Assert . assertTrue ( overlap ) |
testByBatch ( ) { java . lang . String topic = "kafka.AvroTopic" ; java . lang . String group = "avroGroup" ; com . ctrip . hermes . producer . api . Producer producer = com . ctrip . hermes . producer . api . Producer . getInstance ( ) ; com . ctrip . hermes . consumer . engine . Engine engine = com . ctrip . hermes .... | org . junit . Assert . assertEquals ( expectedResult . size ( ) , actualResult . size ( ) ) |
whenAbsolutePathWithShorthandResolved_thenSuccess ( ) { java . io . File file = new java . io . File ( "baeldung/bar/baz/../bar-one.txt" ) ; java . lang . String expectedPath = ( org . baeldung . java . io . JavaFilePathUnitTest . isWindows ( ) ) ? ( org . baeldung . java . io . JavaFilePathUnitTest . userDir ) + "\\ba... | org . junit . Assert . assertEquals ( expectedPath , actualPath ) |
testSearch ( ) { com . ning . http . client . RequestBuilder builder = new com . ning . http . client . RequestBuilder ( "GET" ) ; java . lang . String uri = com . damnhandy . uri . template . UriTemplate . buildFromTemplate ( com . damnhandy . uri . template . examples . TestTwitterSearchApi . SEARCH_BASE ) . literal ... | org . junit . Assert . assertEquals ( "http://search.twitter.com/search.json?q=URI%20Templates&result_type=mixed&rpp=5&include_entities=true&result_type=mixed" , uri ) |
testAuthenticateWithInvalidCredentials ( ) { java . util . List < javax . jcr . Credentials > invalid = new java . util . ArrayList < javax . jcr . Credentials > ( ) ; invalid . add ( new javax . jcr . GuestCredentials ( ) ) ; invalid . add ( new javax . jcr . SimpleCredentials ( userId , new char [ 0 ] ) ) ; for ( jav... | org . junit . Assert . assertFalse ( authentication . authenticate ( creds ) ) |
testEmptyArrayCreation ( ) { final java . lang . String [ ] array = org . apache . commons . lang3 . ArrayUtils . < java . lang . String > toArray ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 0 , array . length ) |
testDeleteFile ( ) { org . pentaho . platform . dataaccess . datasource . wizard . csv . FileUtils fu = new org . pentaho . platform . dataaccess . datasource . wizard . csv . FileUtils ( ) ; java . lang . String testUniqueFileName = "testFileToDelete-" + ( java . lang . System . currentTimeMillis ( ) ) ; java . io . F... | org . junit . Assert . assertTrue ( ( ( files1 . length ) < ( files . length ) ) ) |
test ( ) { int rank = 3 ; for ( long postId = 0 ; postId < ( postCount ) ; postId ++ ) { com . vladmihalcea . book . hpjp . hibernate . query . recursive . complex . List < com . vladmihalcea . book . hpjp . hibernate . query . recursive . PostCommentScore > result = postCommentScores ( postId , rank ) ; "<AssertPlaceH... | org . junit . Assert . assertNotNull ( result ) |
testTarGzipImportCommand ( ) { command . targets = com . beust . jcommander . internal . Lists . newArrayList ( org . kitesdk . cli . commands . TestTarImportCommand . TAR_TEST_GZIP_FILE , org . kitesdk . cli . commands . TestTarImportCommand . datasetUri ) ; command . compressionType = "gzip" ; "<AssertPlaceHolder>" ;... | org . junit . Assert . assertEquals ( 0 , command . run ( ) ) |
testNotifyNormalStartupForKnownBounceProxy ( ) { setMockedHttpRequestHandlerResponse ( HttpStatus . SC_NO_CONTENT ) ; reporter . startStartupReporting ( ) ; int i = 50 ; while ( ( i > 0 ) && ( ! ( reporter . hasReportedStartup ( ) ) ) ) { i -- ; java . lang . Thread . sleep ( 100 ) ; } verify ( handler , org . mockito ... | org . junit . Assert . assertTrue ( reporter . hasReportedStartup ( ) ) |
lastVersion_oneVersion_returnVersion ( ) { javax . jcr . version . VersionIterator versionIterator = mock ( javax . jcr . version . VersionIterator . class , withSettings ( ) . extraInterfaces ( java . util . Iterator . class ) ) ; when ( versionIterator . hasNext ( ) ) . thenReturn ( true , false ) ; javax . jcr . ver... | org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . is ( last ) ) |
testGetLocaleWhenLocaleIsAvailable ( ) { com . liferay . dynamic . data . mapping . model . DDMForm ddmForm = new com . liferay . dynamic . data . mapping . model . DDMForm ( ) ; ddmForm . setDefaultLocale ( LocaleUtil . BRAZIL ) ; ddmForm . setAvailableLocales ( createAvailableLocales ( LocaleUtil . BRAZIL , LocaleUti... | org . junit . Assert . assertEquals ( LocaleUtil . US , locale ) |
testDuration ( ) { java . net . URI recordingFileUri = this . getClass ( ) . getClassLoader ( ) . getResource ( "test_recording.wav" ) . toURI ( ) ; java . io . File recordingFile = new java . io . File ( recordingFileUri ) ; double duration = org . restcomm . connect . commons . util . WavUtils . getAudioDuration ( re... | org . junit . Assert . assertEquals ( 12 , duration , 1.0 ) |
testGetAuditsForEntity ( ) { try ( com . salesforce . dva . argus . sdk . ArgusService argusService = new com . salesforce . dva . argus . sdk . ArgusService ( getMockedClient ( "/AuditServiceTest.json" ) ) ) { com . salesforce . dva . argus . sdk . AuditService auditService = argusService . getAuditService ( ) ; java ... | org . junit . Assert . assertEquals ( expected , result ) |
testGetLineUnix ( ) { java . lang . String input = "col1\tcol2\tcol3\ndata1\tdata2\tdata3\n" ; java . lang . String expected = "col1\tcol2\tcol3" ; java . lang . String output = org . pentaho . di . trans . steps . fileinput . text . TextFileInputUtils . getLine ( null , org . pentaho . di . trans . steps . fileinput .... | org . junit . Assert . assertEquals ( expected , output ) |
testNumberTypeCompare_inEmbed ( ) { java . lang . String query = "LBService[@resourceId<sp>in<sp>(\"192.168.3.1\")<sp>]{@resourceId}.capacities[@available<sp>><sp>50]{@used,@available}" ; com . ebay . cloud . cms . query . service . IQueryResult result = queryService . query ( query , cmsdbContext ) ; "<AssertPlaceHold... | org . junit . Assert . assertTrue ( ( ( result . getEntities ( ) . size ( ) ) == 1 ) ) |
testCauseOfTypeWithCycle ( ) { software . amazon . ion . IonException ie1 = new software . amazon . ion . IonException ( ) ; software . amazon . ion . IonException ie2 = new software . amazon . ion . IonException ( ie1 ) ; ie1 . initCause ( ie2 ) ; software . amazon . ion . IonException ion = new software . amazon . io... | org . junit . Assert . assertNull ( ion . causeOfType ( java . io . IOException . class ) ) |
bug55030 ( ) { org . apache . poi . hslf . usermodel . HSLFSlideShow ppt = org . apache . poi . hslf . usermodel . TestBugs . open ( "bug55030.ppt" ) ; java . lang . String expFamily = "隶书" ; org . apache . poi . hslf . usermodel . HSLFSlide sl = ppt . getSlides ( ) . get ( 0 ) ; for ( java . util . List < org . apache... | org . junit . Assert . assertEquals ( expFamily , actFamily ) |
testAdd2 ( ) { org . diirt . datasource . ReadRecipeBuilder builder = new org . diirt . datasource . ReadRecipeBuilder ( ) ; org . diirt . datasource . ValueCache valueCache1 = new org . diirt . datasource . ValueCacheImpl < java . lang . Object > ( java . lang . Object . class ) ; org . diirt . datasource . ValueCache... | org . junit . Assert . assertThat ( recipe . getChannelReadRecipes ( ) . size ( ) , equalTo ( 2 ) ) |
showTreeCommand ( ) { java . lang . String bundleTreeOutput = executeCommand ( "bundle:tree-show<sp>org.apache.karaf.management.server" ) ; System . out . println ( bundleTreeOutput ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertFalse ( bundleTreeOutput . isEmpty ( ) ) |
new2 ( ) { java . io . File file = new java . io . File ( "DOES_NOT_EXISTS" ) ; org . diirt . service . jdbc . JDBCServiceProvider factory = new org . diirt . service . jdbc . JDBCServiceProvider ( file ) ; java . util . Collection < org . diirt . service . Service > services = factory . createServices ( ) ; "<AssertPl... | org . junit . Assert . assertThat ( services . size ( ) , equalTo ( 0 ) ) |
testWasSuccessfulWhenBothWarningsAndErrorsAreRecorded ( ) { "<AssertPlaceHolder>" ; } wasSuccessful ( ) { runCodes ( ) ; return ( numErrors ) == 0 ; } | org . junit . Assert . assertThat ( report . wasSuccessful ( ) , org . hamcrest . Matchers . equalTo ( false ) ) |
testCreateFailConstructor ( ) { org . pf4j . PluginDescriptor pluginDescriptor = mock ( org . pf4j . PluginDescriptor . class ) ; when ( pluginDescriptor . getPluginClass ( ) ) . thenReturn ( org . pf4j . plugin . AnotherFailTestPlugin . class . getName ( ) ) ; org . pf4j . PluginWrapper pluginWrapper = mock ( org . pf... | org . junit . Assert . assertNull ( plugin ) |
testFieldWithExtIdNo_CustomObject ( ) { inputFieldName = "ParentObjectId__c" ; expectedFieldName = "ParentObjectId__c" ; java . lang . String fieldToNullName = org . pentaho . di . trans . steps . salesforceutils . SalesforceUtils . getFieldToNullName ( org . pentaho . di . trans . steps . salesforceutils . SalesforceU... | org . junit . Assert . assertEquals ( expectedFieldName , fieldToNullName ) |
getPatchedDocument ( ) { java . util . Map < java . lang . String , java . lang . Object > latestDoc = new java . util . HashMap ( ) ; latestDoc . put ( Constants . GUID , "guid" ) ; java . util . List < java . util . Map < java . lang . String , java . lang . Object > > comments = new java . util . ArrayList ( ) ; com... | org . junit . Assert . assertEquals ( actual , latest ) |
AsyncHeadBooleanRequest ( ) { final boolean result = createService ( com . azure . common . implementation . RestProxyTests . Service10 . class ) . headBooleanAsync ( ) . block ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( result ) |
testAlertEnqueue ( ) { com . salesforce . dva . argus . service . UserService userService = system . getServiceFactory ( ) . getUserService ( ) ; com . salesforce . dva . argus . service . AlertService alertService = system . getServiceFactory ( ) . getAlertService ( ) ; com . salesforce . dva . argus . service . MQSer... | org . junit . Assert . assertEquals ( actualAlertList . size ( ) , expectedList . size ( ) ) |
testGetScope_06 ( ) { org . eclipse . xtext . scoping . IScope scope = scopeProvider . getScope ( field . eResource ( ) , TypesPackage . Literals . JVM_CONSTRAINT_OWNER__CONSTRAINTS ) ; "<AssertPlaceHolder>" ; } getScope ( org . eclipse . emf . ecore . EObject , org . eclipse . emf . ecore . EReference ) { if ( referen... | org . junit . Assert . assertSame ( IScope . NULLSCOPE , scope ) |
set_boolean_enablesChaining ( ) { array . add ( false ) ; "<AssertPlaceHolder>" ; } set ( java . lang . String , com . eclipsesource . json . JsonValue ) { if ( name == null ) { throw new java . lang . NullPointerException ( "name<sp>is<sp>null" ) ; } if ( value == null ) { throw new java . lang . NullPointerException ... | org . junit . Assert . assertSame ( array , array . set ( 0 , true ) ) |
testDiToAvroLogicalTime ( ) { org . apache . avro . Schema expectedSchema = org . talend . daikon . avro . AvroUtils . _logicalTime ( ) ; org . apache . avro . Schema designSchema = org . apache . avro . SchemaBuilder . builder ( ) . record ( "Record" ) . fields ( ) . name ( "booleanField" ) . type ( ) . booleanType ( ... | org . junit . Assert . assertEquals ( expectedSchema , actualSchema ) |
max ( ) { "<AssertPlaceHolder>" ; System . out . println ( ( "2<sp>vs<sp>3<sp>,<sp>max:" + ( org . xm . similarity . util . MathUtil . max ( 2 , 3 ) ) ) ) ; } max ( int , int ) { return a > b ? a : b ; } | org . junit . Assert . assertTrue ( ( ( org . xm . similarity . util . MathUtil . max ( 2 , 3 ) ) > 2 ) ) |
testHungrySoberComplimentedKing ( ) { final com . iluwatar . servant . King king = new com . iluwatar . servant . King ( ) ; king . receiveCompliments ( ) ; king . changeMood ( ) ; "<AssertPlaceHolder>" ; } getMood ( ) { return isHappy ; } | org . junit . Assert . assertFalse ( king . getMood ( ) ) |
serializeNewEntityWithNumericNullId ( ) { org . springframework . flex . hibernate3 . domain . PersonNP person = new org . springframework . flex . hibernate3 . domain . PersonNP ( ) ; person . id = null ; person . name = "Bob" ; serialize ( person ) ; org . springframework . flex . hibernate3 . domain . PersonNP resul... | org . junit . Assert . assertEquals ( null , result . id ) |
testGetFeatureStoreAddFeatures ( ) { org . geotools . data . FeatureReader < org . opengis . feature . simple . SimpleFeatureType , org . opengis . feature . simple . SimpleFeature > reader = org . geotools . data . DataUtilities . reader ( new org . opengis . feature . simple . SimpleFeature [ ] { first . newFeature }... | org . junit . Assert . assertEquals ( ( ( first . features . length ) + 1 ) , road . getFeatures ( ) . size ( ) ) |
testGetEntriesCountInDifferentCompany ( ) { addEntry ( 0 , 0 ) ; int entriesCount = com . liferay . announcements . kernel . service . AnnouncementsEntryLocalServiceUtil . getEntriesCount ( _company2 . getCompanyId ( ) , 0 , 0 , false ) ; "<AssertPlaceHolder>" ; } getCompanyId ( ) { return _companyId ; } | org . junit . Assert . assertEquals ( 0 , entriesCount ) |
getMainWikiDescriptor ( ) { org . xwiki . wiki . internal . descriptor . DefaultWikiDescriptor descriptor = new org . xwiki . wiki . internal . descriptor . DefaultWikiDescriptor ( "xwiki" , "xwiki" ) ; when ( cache . getFromId ( "xwiki" ) ) . thenReturn ( descriptor ) ; "<AssertPlaceHolder>" ; } getMainWikiDescriptor ... | org . junit . Assert . assertEquals ( descriptor , this . mocker . getComponentUnderTest ( ) . getMainWikiDescriptor ( ) ) |
testNoArgs ( ) { org . eclipse . ceylon . common . tool . ToolModel < org . eclipse . ceylon . tools . classpath . CeylonClasspathTool > model = pluginLoader . loadToolModel ( "classpath" ) ; "<AssertPlaceHolder>" ; try { org . eclipse . ceylon . tools . classpath . CeylonClasspathTool tool = pluginFactory . bindArgume... | org . junit . Assert . assertNotNull ( model ) |
two_$this_contains_any_returns_false_when_all_expression_values_not_in_array ( ) { com . redhat . lightblue . query . QueryExpression expr = com . redhat . lightblue . eval . EvalTestContext . queryExpressionFromJson ( "{'array':'field6.$this.$this.nf5',<sp>'contains':'$any',<sp>'values':[1,2,3,4]}" ) ; com . redhat . ... | org . junit . Assert . assertFalse ( context . getResult ( ) ) |
testFormatByMethod ( ) { java . lang . String tpl = "${a2}-${a1}" ; java . util . Map < java . lang . String , java . lang . Object > args = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; cn . bc . template . util . FreeMarkerUtilsTest . T a1 = new cn . bc . template . util . FreeMarker... | org . junit . Assert . assertEquals ( "name" , cn . bc . core . util . FreeMarkerUtils . format ( tpl , args ) ) |
rasterizeToTemporaryResourceReturnsNullOnExceptions ( ) { org . xwiki . resource . temporary . TemporaryResourceReference tref = this . mocker . getComponentUnderTest ( ) . rasterizeToTemporaryResource ( org . xwiki . platform . svg . internal . BatikSVGRasterizerTest . INVALID_SVG , 0 , 0 ) ; "<AssertPlaceHolder>" ; }... | org . junit . Assert . assertNull ( tref ) |
isServerTypeValid_invalid_serverTypeNotMatching ( ) { org . oscm . app . ror . client . RORClient rorClient = mock ( org . oscm . app . ror . client . RORClient . class ) ; parameters . put ( PropertyHandler . VSERVER_TYPE , new org . oscm . app . v2_0 . data . Setting ( org . oscm . app . iaas . PropertyHandler . VSER... | org . junit . Assert . assertFalse ( isServerTypeValid ) |
testDeleteAllFolders ( ) { com . liferay . portal . kernel . model . Group group = com . liferay . portal . kernel . test . util . GroupTestUtil . addGroup ( ) ; com . liferay . journal . model . JournalFolder parentFolder = com . liferay . journal . test . util . JournalTestUtil . addFolder ( group . getGroupId ( ) , ... | org . junit . Assert . assertEquals ( folders . toString ( ) , 0 , folders . size ( ) ) |
testDoFilterInternalMetExceptie ( ) { final nl . bzk . brp . beheer . webapp . configuratie . LogFilter logFilter = new nl . bzk . brp . beheer . webapp . configuratie . LogFilter ( ) ; org . mockito . Mockito . when ( request . getHeader ( "Access-Control-Request-Method" ) ) . thenReturn ( "GET" ) ; org . mockito . Mo... | org . junit . Assert . assertEquals ( 3 , events . size ( ) ) |
testGetArrivalsAndDeparturesForStopInTimeRange01 ( ) { org . onebusaway . realtime . api . TimepointPredictionRecord tprA = new org . onebusaway . realtime . api . TimepointPredictionRecord ( ) ; tprA . setTimepointId ( mStopA . getId ( ) ) ; long tprATime = createPredictedTime ( time ( 13 , 30 ) ) ; tprA . setTimepoin... | org . junit . Assert . assertEquals ( tprB . getTimepointPredictedArrivalTime ( ) , predictedArrivalTime ) |
testReplaceBaseCallWithParameters ( ) { java . lang . String input = "result<sp>=<sp>this.base(<sp>arguments,<sp>23,<sp>'foo'<sp>);" ; org . eclipse . rap . clientbuilder . TokenList tokens = org . eclipse . rap . clientbuilder . TestUtil . parse ( input ) ; org . eclipse . rap . clientbuilder . QxCodeCleaner cleaner =... | org . junit . Assert . assertEquals ( expected , org . eclipse . rap . clientbuilder . JavaScriptPrinter . printTokens ( tokens ) ) |
testIsCurrent_Current ( ) { org . terasoluna . gfw . web . pagination . PaginationInfo info = new org . terasoluna . gfw . web . pagination . PaginationInfo ( page , pathTmpl , queryTmpl , 0 ) ; boolean result = info . isCurrent ( 5 ) ; "<AssertPlaceHolder>" ; } isCurrent ( int ) { return ( current ) == page ; } | org . junit . Assert . assertTrue ( result ) |
testGetSlot ( ) { d_pm . addSlot ( ) ; d_pm . getSlot ( 0 ) . setValue ( d_ade2 ) ; "<AssertPlaceHolder>" ; } getSlot ( int ) { return d_slots . get ( idx ) ; } | org . junit . Assert . assertEquals ( d_ade2 , d_pm . getSlot ( 0 ) . getValue ( ) ) |
assertOptimizeAlwaysFalseRangeConditions ( ) { org . apache . shardingsphere . core . parse . old . parser . context . condition . Condition condition1 = new org . apache . shardingsphere . core . parse . old . parser . context . condition . Condition ( new org . apache . shardingsphere . core . parse . old . parser . ... | org . junit . Assert . assertTrue ( shardingConditions . isAlwaysFalse ( ) ) |
buildConversationIdHeaderCreatingContainer ( ) { java . lang . String kieServerId = "KieServerId" ; org . kie . server . api . KieServerEnvironment . setServerId ( kieServerId ) ; org . kie . server . services . impl . KieContainerInstanceImpl containerInstanceImpl = new org . kie . server . services . impl . KieContai... | org . junit . Assert . assertNull ( conversationIdHeader ) |
test ( ) { jsprit . core . problem . VehicleRoutingProblem . Builder builder = VehicleRoutingProblem . Builder . newInstance ( ) ; new jsprit . core . problem . io . VrpXMLReader ( builder ) . read ( "src/test/resources/pdp.xml" ) ; jsprit . core . problem . VehicleRoutingProblem vrp = builder . build ( ) ; final jspri... | org . junit . Assert . assertTrue ( ( ! ( solutions . isEmpty ( ) ) ) ) |
should_return_value_of_expression_passed_in ( ) { java . util . Optional < java . lang . String > result = uk . co . benjiweber . expressions . NullSafe . nullSafe ( ( ) -> foo . foo ( ) . bar ( ) . baz ( ) ) ; "<AssertPlaceHolder>" ; } baz ( ) { return "baz" ; } | org . junit . Assert . assertEquals ( "baz" , result . get ( ) ) |
testIsLocalJobExecution ( ) { final javax . management . DynamicMBean mockEndpointInfo = mockery . mock ( javax . management . DynamicMBean . class ) ; final com . ibm . websphere . kernel . server . ServerInfoMBean mockServerInfo = mockery . mock ( com . ibm . websphere . kernel . server . ServerInfoMBean . class ) ; ... | org . junit . Assert . assertTrue ( batchLocationService . isLocalJobExecution ( mockWSJobExecution ) ) |
testSingleElement ( ) { org . antlr . v4 . runtime . misc . IntervalSet s = org . antlr . v4 . runtime . misc . IntervalSet . of ( 99 ) ; java . lang . String expecting = "99" ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( a ) + ".." ) + ( b ) ; } | org . junit . Assert . assertEquals ( s . toString ( ) , expecting ) |
when_pdroute_futureMaxLoatAtAct2ShouldBe10 ( ) { stateManager . informInsertionStarts ( java . util . Arrays . asList ( pickup_delivery_route ) , java . util . Collections . < com . graphhopper . jsprit . core . algorithm . state . Job > emptyList ( ) ) ; com . graphhopper . jsprit . core . algorithm . state . Capacity... | org . junit . Assert . assertEquals ( 10 , atAct2 . get ( 0 ) ) |
testParseNegativeBoth ( ) { java . lang . String source = ( ( ( "-1" + ( getDecimalCharacter ( ) ) ) + "232323232323<sp>-<sp>1" ) + ( getDecimalCharacter ( ) ) ) + "434343434343i" ; org . apache . commons . numbers . complex . Complex expected = org . apache . commons . numbers . complex . Complex . ofCartesian ( ( - 1... | org . junit . Assert . assertEquals ( expected , actual ) |
testIdentity ( ) { io . ebeaninternal . api . SpiEbeanServer server = spiEbeanServer ( ) ; io . ebean . config . dbplatform . IdType idType = server . getDatabasePlatform ( ) . getDbIdentity ( ) . getIdType ( ) ; if ( ! ( IdType . IDENTITY . equals ( idType ) ) ) { return ; } try ( io . ebean . Transaction tx = server ... | org . junit . Assert . assertNotNull ( al . getId ( ) ) |
testEmptyBindInputs ( ) { java . util . List < io . cloudslang . lang . entities . bindings . Input > inputs = java . util . Collections . emptyList ( ) ; java . util . Map < java . lang . String , io . cloudslang . lang . entities . bindings . values . Value > result = bindInputs ( inputs ) ; "<AssertPlaceHolder>" ; }... | org . junit . Assert . assertTrue ( result . isEmpty ( ) ) |
testIfVersionReturnedByInfoPackageMatchesFrameworkVersion_shouldWork ( ) { java . lang . String versionOfBundleReturnedOnPage = getVersionReturnedByWebpage ( ) ; java . lang . String versionOfBundleItself = getBundleVersion ( ) ; "<AssertPlaceHolder>" ; } getBundleVersion ( ) { org . osgi . framework . Bundle [ ] bundl... | org . junit . Assert . assertThat ( versionOfBundleReturnedOnPage , org . hamcrest . CoreMatchers . equalTo ( versionOfBundleItself ) ) |
testKindWasNogNietGeborenOpDatumOverlijden ( ) { final java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > overtreders = brby0909 . voerRegelUit ( maakHuidigePersoon ( false , 20100101 ) , maakNieuwePersoon ( 20090101 ) , null , null ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size (... | org . junit . Assert . assertEquals ( 0 , overtreders . size ( ) ) |
hashIndexTable_remove_doesNotChangePrecedingElements ( ) { com . restfb . json . JsonObject . HashIndexTable indexTable = new com . restfb . json . JsonObject . HashIndexTable ( ) ; indexTable . add ( "foo" , 23 ) ; indexTable . add ( "bar" , 42 ) ; indexTable . remove ( 42 ) ; "<AssertPlaceHolder>" ; } get ( java . la... | org . junit . Assert . assertEquals ( 23 , indexTable . get ( "foo" ) ) |
testSecureSourceWhileChannelInactive ( ) { final java . net . InetSocketAddress remoteAddress = new java . net . InetSocketAddress ( "192.168.1.22" , 2727 ) ; final io . netty . channel . Channel channel = org . mockito . Mockito . mock ( io . netty . channel . Channel . class ) ; final io . netty . channel . ChannelFu... | org . junit . Assert . assertTrue ( secure ) |
testSchemeWithNoStuff3 ( ) { com . ning . atlas . spi . Uri < ? > uri = com . ning . atlas . spi . Uri . valueOf ( "rds" , com . google . common . collect . ImmutableMap . < java . lang . String , java . util . Collection < java . lang . String > > of ( "hello" , java . util . Arrays . asList ( "world" ) ) ) ; com . ni... | org . junit . Assert . assertThat ( dup . getScheme ( ) , org . hamcrest . CoreMatchers . equalTo ( "rds" ) ) |
testGo ( ) { java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; java . io . PrintStream ps = new java . io . PrintStream ( baos ) ; new org . drools . example . api . namedkiesessionfromfile . NamedKieSessionFromFileExample ( ) . go ( ps ) ; ps . close ( ) ; java . lang . String actual... | org . junit . Assert . assertEquals ( expected , actual ) |
testSFBug585811 ( ) { java . lang . String smiles = "CC(C(C8CCC(CC8)=O)C3C4C(CC5(CCC(C9=CC(C=CN%10)=C%10C=C9)CCCC5)C4)C2CCC1CCC7(CCC7)C6(CC6)C1C2C3)=O" ; org . openscience . cdk . interfaces . IAtomContainer mol = org . openscience . cdk . smiles . SmilesParserTest . sp . parseSmiles ( smiles ) ; "<AssertPlaceHolder>" ... | org . junit . Assert . assertTrue ( ( ( mol . getAtomCount ( ) ) > 0 ) ) |
testDefaultValue ( ) { field . setValue ( "sample" ) ; view . initialize ( field , child ) ; "<AssertPlaceHolder>" ; } getText ( ) { java . lang . CharSequence text = getEditTextView ( ) . getText ( ) ; return text == null ? null : text . toString ( ) ; } | org . junit . Assert . assertThat ( view . getText ( ) , org . hamcrest . CoreMatchers . equalTo ( "sample" ) ) |
whenAddingTwoVehiclesWithSameTypeIdStartAndEndLocationAndWorkingShift_getAvailableVehicleShouldReturnOnlyOneOfThem ( ) { jsprit . core . problem . vehicle . VehicleTypeImpl type = VehicleTypeImpl . Builder . newInstance ( "standard" ) . build ( ) ; jsprit . core . problem . vehicle . Vehicle v1 = VehicleImpl . Builder ... | org . junit . Assert . assertEquals ( 1 , vehicles . size ( ) ) |
charge_invoice ( ) { org . oscm . psp . data . ChargingData chargingData = createChargingData ( ) ; org . oscm . psp . data . RequestData requestData = createRequestData ( org . oscm . paymentservice . bean . PaymentServiceProviderBeanTest . INVOICE ) ; org . oscm . payproc . stubs . PostMethodStub . setStubReturnValue... | org . junit . Assert . assertNotNull ( chargingResult ) |
testDisaster ( ) { com . cloudera . science . matching . VertexData d1 = new com . cloudera . science . matching . VertexData ( "1" , true , com . google . common . collect . ImmutableMap . of ( "3" , 3 ) ) ; com . cloudera . science . matching . VertexData d2 = new com . cloudera . science . matching . VertexData ( "2... | org . junit . Assert . assertTrue ( ( ( out . get ( "1" ) . getMatchId ( ) . equals ( "" ) ) || ( out . get ( "2" ) . getMatchId ( ) . equals ( "" ) ) ) ) |
testPreorderList ( ) { "<AssertPlaceHolder>" ; } preorderList ( ) { return com . google . common . collect . Lists . newArrayList ( preorderIterator ( ) ) ; } | org . junit . Assert . assertThat ( a . preorderList ( ) , org . hamcrest . CoreMatchers . is ( com . google . common . collect . Lists . newArrayList ( a , b , c , f , d , e ) ) ) |
shouldAllowSubclassesToReferenceParentElement ( ) { com . redhat . darcy . ui . AbstractViewElement viewElement = new com . redhat . darcy . ui . AbstractViewElement ( com . redhat . darcy . ui . By . id ( "parent" ) ) { } ; "<AssertPlaceHolder>" ; } id ( java . lang . String ) { return new com . redhat . darcy . ui . ... | org . junit . Assert . assertNotNull ( viewElement . parent ) |
matchDirectPath ( ) { ch . rasc . wampspring . method . DestinationPatternsMessageCondition condition = ch . rasc . wampspring . method . DestinationPatternsMessageConditionTest . condition ( "/foo" ) ; ch . rasc . wampspring . method . DestinationPatternsMessageCondition match = condition . getMatchingCondition ( ch .... | org . junit . Assert . assertNotNull ( match ) |
deveObterVersaoComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . evento . cancelamento . NFRetornoCancelamento cancelamento = new com . fincatto . documentofiscal . nfe310 . classes . evento . cancelamento . NFRetornoCancelamento ( ) ; final java . lang . String versao = "3.10" ; cancelame... | org . junit . Assert . assertEquals ( "3.10" , cancelamento . getVersao ( ) ) |
translateCatalogException ( ) { final org . sentilo . web . catalog . exception . CatalogException ex = new org . sentilo . web . catalog . exception . CatalogException ( errorMessageKey ) ; try { interceptor . doTranslationAction ( ex ) ; } catch ( final org . sentilo . web . catalog . exception . CatalogException e )... | org . junit . Assert . assertEquals ( ex , e ) |
shouldReturnAbsentForSearchingOnEmptyString ( ) { edu . stanford . bmir . protege . web . shared . search . EntityNameMatcher matcher = new edu . stanford . bmir . protege . web . shared . search . EntityNameMatcher ( "a" ) ; java . util . Optional < edu . stanford . bmir . protege . web . shared . search . EntityNameM... | org . junit . Assert . assertEquals ( false , result . isPresent ( ) ) |
testRemoveSPARQLprefix ( ) { java . util . Map < java . lang . String , java . lang . String > map = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; map . put ( "rdfs" , "<http://www.w3.org/2000/01/rdf-schema#>" ) ; map . put ( "xsd" , "<http://www.w3.org/2000/01/rdf-schema#>" ) ; map . ... | org . junit . Assert . assertEquals ( false , mymap . containsKey ( "ex" ) ) |
testCreateWithExistingProfile ( ) { org . jboss . forge . addon . maven . profiles . ProfileImpl profile = new org . jboss . forge . addon . maven . profiles . ProfileImpl ( ) ; profile . setId ( "testprofile" ) ; org . jboss . forge . addon . maven . profiles . ProfileBuilder profileBuilder = org . jboss . forge . add... | org . junit . Assert . assertThat ( profileBuilder . getId ( ) , org . hamcrest . CoreMatchers . is ( profile . getId ( ) ) ) |
shouldSupportMultipleBootstrapServers ( ) { final java . util . List < java . lang . String > expectedBootstrapServers = java . util . Arrays . asList ( "broker1:9092" , "broker2:9092" ) ; final java . lang . String bootstrapServersString = org . apache . kafka . common . utils . Utils . join ( expectedBootstrapServers... | org . junit . Assert . assertEquals ( expectedBootstrapServers , actualBootstrapServers ) |
testConcavePolygon ( ) { org . openspaces . spatial . shapes . Polygon concavePolygon = org . openspaces . spatial . ShapeFactory . polygon ( org . openspaces . spatial . ShapeFactory . point ( 5 , 5 ) , org . openspaces . spatial . ShapeFactory . point ( 5 , 0 ) , org . openspaces . spatial . ShapeFactory . point ( 2.... | org . junit . Assert . assertNotNull ( spatial4jPolygon ) |
testExclude ( ) { com . vividsolutions . jts . geom . Envelope env = ( ( com . vividsolutions . jts . geom . Envelope ) ( Filter . EXCLUDE . accept ( visitor , null ) ) ) ; "<AssertPlaceHolder>" ; } isNull ( ) { return true ; } | org . junit . Assert . assertTrue ( env . isNull ( ) ) |
returnsCorrectPercentage ( ) { pipe . actions . gui . ZoomManager zoomUI = new pipe . actions . gui . ZoomUI ( 1 , pipe . views . ZoomUITest . ZOOM_INCREMENT , pipe . views . ZoomUITest . MAX_ZOOM , pipe . views . ZoomUITest . MIN_ZOOM , null ) ; "<AssertPlaceHolder>" ; } getPercentageZoom ( ) { return ( ( int ) ( ( zo... | org . junit . Assert . assertEquals ( 100 , zoomUI . getPercentageZoom ( ) ) |
optional_int_getAsInt ( ) { java . util . OptionalInt optionalInt = java . util . OptionalInt . of ( 90 ) ; "<AssertPlaceHolder>" ; } getAsInt ( ) { return 10 ; } | org . junit . Assert . assertEquals ( 90 , optionalInt . getAsInt ( ) , 0 ) |
testGetParametersWithDefaultEntityAndDIsabledStatus ( ) { unit . setActive ( false ) ; org . lnu . is . domain . person . education . PersonEducation entity = new org . lnu . is . domain . person . education . PersonEducation ( ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . ... | org . junit . Assert . assertEquals ( expected , actual ) |
createsClientWithCustomConnectionName ( ) { com . github . msemys . esjc . EventStore result = com . github . msemys . esjc . EventStoreBuilder . newBuilder ( ) . connectionName ( "test" ) . singleNodeAddress ( "localhost" , 1009 ) . build ( ) ; "<AssertPlaceHolder>" ; } settings ( ) { return settings ; } | org . junit . Assert . assertEquals ( "test" , result . settings ( ) . connectionName ) |
testAppendNullByteArrayBuffer ( ) { final org . apache . hc . core5 . util . CharArrayBuffer buffer = new org . apache . hc . core5 . util . CharArrayBuffer ( 8 ) ; buffer . append ( ( ( org . apache . hc . core5 . util . ByteArrayBuffer ) ( null ) ) , 0 , 0 ) ; "<AssertPlaceHolder>" ; } toString ( ) { final java . lan... | org . junit . Assert . assertEquals ( "" , buffer . toString ( ) ) |
runTestReflection5 ( ) { soot . jimple . infoflow . results . InfoflowResults res = analyzeAPKFile ( "Reflection/Reflection5.apk" , null , enableReflectionCallback ) ; "<AssertPlaceHolder>" ; } size ( ) { return ( this . results ) == null ? 0 : this . results . size ( ) ; } | org . junit . Assert . assertEquals ( 1 , res . size ( ) ) |
returnsResultAfterSupplier ( ) { new org . awaitility . classes . Asynch ( fakeRepository ) . perform ( ) ; int value = org . awaitility . Awaitility . await ( ) . until ( new java . util . concurrent . Callable < java . lang . Integer > ( ) { public org . awaitility . Integer call ( ) throws org . awaitility . Excepti... | org . junit . Assert . assertEquals ( 1 , value ) |
dockerOnceRetention1 ( ) { final com . github . kostyasha . yad . DockerSlaveTemplate template = new com . github . kostyasha . yad . DockerSlaveTemplate ( "id" ) ; template . setRetentionStrategy ( new com . github . kostyasha . yad . strategy . DockerOnceRetentionStrategy ( 3 ) ) ; "<AssertPlaceHolder>" ; } notAllowe... | org . junit . Assert . assertThat ( com . github . kostyasha . yad . DockerProvisioningStrategy . notAllowedStrategy ( template ) , org . hamcrest . Matchers . is ( false ) ) |
givenFooService_whenCallOptionsForAllow_thenReceiveValueOfAllowHeader ( ) { final java . util . Set < org . springframework . http . HttpMethod > optionsForAllow = restTemplate . optionsForAllow ( org . baeldung . client . RestTemplateBasicLiveTest . fooResourceUrl ) ; final org . springframework . http . HttpMethod [ ... | org . junit . Assert . assertTrue ( optionsForAllow . containsAll ( java . util . Arrays . asList ( supportedMethods ) ) ) |
setFiles ( ) { java . util . TreeSet < java . lang . String > files = new java . util . TreeSet < java . lang . String > ( ) ; files . add ( "file1.file" ) ; files . add ( "file2.file" ) ; instance . setFiles ( files ) ; "<AssertPlaceHolder>" ; } getFiles ( ) { org . apache . lucene . index . IndexReader ireader = null... | org . junit . Assert . assertEquals ( 2 , instance . getFiles ( ) . size ( ) ) |
testNoContentResponse ( ) { final org . apache . hc . core5 . http . protocol . HttpCoreContext context = org . apache . hc . core5 . http . protocol . HttpCoreContext . create ( ) ; final org . apache . hc . core5 . http . ClassicHttpRequest request = new org . apache . hc . core5 . http . message . BasicClassicHttpRe... | org . junit . Assert . assertSame ( request , context . getRequest ( ) ) |
testUid ( ) { java . nio . file . Path file = java . nio . file . Files . createFile ( root . resolve ( "file" ) ) ; java . lang . Integer uid = ( ( java . lang . Integer ) ( java . nio . file . Files . getAttribute ( file , "unix:uid" ) ) ) ; "<AssertPlaceHolder>" ; } resolve ( com . github . sbridges . ephemeralfs . ... | org . junit . Assert . assertTrue ( ( uid > 0 ) ) |
testExportWithTime ( ) { org . geotools . geometry . jts . ReferencedEnvelope latLonBox = new org . geotools . geometry . jts . ReferencedEnvelope ( 12 , 13 , ( - 30 ) , ( - 31 ) , org . geotools . referencing . crs . DefaultGeographicCRS . WGS84 ) ; org . esa . beam . framework . datamodel . ProductData . UTC startTim... | org . junit . Assert . assertEquals ( expected , builder . toString ( ) ) |
getPropertyDisplayNameWhenDisplayNameIsNotSetShouldReturnTechnicalKey ( ) { java . lang . String displayName = null ; java . lang . String technicalKey = "technicalKey" ; resourceEditProperty = new ch . puzzle . itc . mobiliar . builders . ResourceEditPropertyBuilder ( ) . withDisplayName ( displayName ) . withTechnica... | org . junit . Assert . assertEquals ( technicalKey , propertyDisplayName ) |
avoid_checking_for_null_with_guava_optional ( ) { com . google . common . base . Optional < com . levelup . java . guava . OptionalExample . PullRequest > pr = getPullRequestUsingGuavaOptional ( ) ; if ( pr . isPresent ( ) ) { com . levelup . java . guava . OptionalExample . PullRequest pullRequest = pr . get ( ) ; com... | org . junit . Assert . assertFalse ( pr . isPresent ( ) ) |
testPRBindingOnNonexistingWatchedAttribute ( ) { final java . lang . String str = "package<sp>org.drools.test;\n" + ( ( ( ( ( ( ( ( ( ( "\n" + "import<sp>org.drools.compiler.integrationtests.PropertyReactivityTest.Klass4;\n" ) + "\n" ) + "global<sp>java.util.List<sp>list;\n" ) + "\n" ) + "rule<sp>\"Get<sp>Person<sp>nam... | org . junit . Assert . assertTrue ( knowledgeBuilder . hasErrors ( ) ) |
should_vote_answer_down ( ) { int firstAnswerVoteCount = questionPage . firstAnswerVoteCount ( ) ; int countAfter = questionPage . voteFirstAnswer ( VoteType . DOWN ) . firstAnswerVoteCount ( ) ; "<AssertPlaceHolder>" ; } firstAnswerVoteCount ( ) { java . lang . String text = firstAnswer ( ) . findElement ( org . openq... | org . junit . Assert . assertEquals ( ( firstAnswerVoteCount - 1 ) , countAfter ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.