input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
test3 ( ) { java . lang . Boolean result = new java_programs . DEPTH_FIRST_SEARCH ( ) . depth_first_search ( nodef , nodee ) ; java . lang . String resultStr = "" ; if ( result ) { resultStr = "Path<sp>found!" ; } else { resultStr = "Path<sp>not<sp>found!" ; } "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( "Path<sp>not<sp>found!" , resultStr ) |
secondMetaElementWithContentTypeContainsCharsetParameter ( ) { java . lang . String html = "<html><head>" + ( ( "<meta<sp>http-equiv=\"Content-Type\"<sp>content=\"text/html\">" + "<meta<sp>http-equiv=\"Content-Type\"<sp>content=\"text/html;<sp>charset=euc-kr\">" ) + "</head><body></body></html>" ) ; org . jsoup . nodes... | org . junit . Assert . assertEquals ( "" , doc . body ( ) . text ( ) ) |
test26 ( ) { symbolic_examples . symbolic_example_7 . NopolExample ex = new symbolic_examples . symbolic_example_7 . NopolExample ( ) ; "<AssertPlaceHolder>" ; } isPrime ( int ) { if ( a < 0 ) { return false ; } int intermediaire = a % 2 ; if ( intermediaire == 0 ) return false ; int sqrtMiddle = ( ( int ) ( ( java . l... | org . junit . Assert . assertFalse ( ex . isPrime ( 4 ) ) |
validateSqlScriptInputsValid ( ) { final java . util . List < java . lang . String > validationList = validateSqlScriptInputs ( "1" , io . cloudslang . content . database . utils . MSSQL_DB_TYPE , "username" , "Password" , "someInstance" , "123" , "database" , io . cloudslang . content . database . utils . AUTH_SQL , "... | org . junit . Assert . assertThat ( validationList , org . hamcrest . CoreMatchers . is ( java . util . Collections . < java . lang . String > emptyList ( ) ) ) |
testTryFinally ( ) { org . jboss . additional . testsuite . jdkall . past . eap_6_4_x . management . cli . TryCatchFinallyTestCase . cliOut . reset ( ) ; final org . jboss . as . cli . CommandContext ctx = org . jboss . as . test . integration . management . util . CLITestUtil . getCommandContext ( org . jboss . additi... | org . junit . Assert . assertEquals ( "finally" , getValue ( ) ) |
mixedCapacityLimited ( ) { com . iota . iri . network . TransactionRequester txReq = new com . iota . iri . network . TransactionRequester ( com . iota . iri . network . TransactionRequesterTest . tangle , com . iota . iri . network . TransactionRequesterTest . snapshotProvider ) ; int capacity = TransactionRequester .... | org . junit . Assert . assertEquals ( ( capacity + ( capacity * 2 ) ) , txReq . numberOfTransactionsToRequest ( ) ) |
testGetPropertyPath ( ) { org . talend . components . api . component . PropertyPathConnector pathConnector = new org . talend . components . api . component . PropertyPathConnector ( "foo" , "foo.bar" ) ; "<AssertPlaceHolder>" ; } getPropertyPath ( ) { return propertyPath ; } | org . junit . Assert . assertEquals ( pathConnector . getPropertyPath ( ) , "foo.bar" ) |
nonTrivialTypePutAndGetTest ( ) { final org . nohope . cassandra . mapservice . CMapNonTrivialTypeIT . Dwarf gloin = new org . nohope . cassandra . mapservice . CMapNonTrivialTypeIT . Dwarf ( "Gloin" , "Groin" ) ; final org . nohope . cassandra . mapservice . ValueTuple valueToPut = org . nohope . cassandra . mapservic... | org . junit . Assert . assertEquals ( returnValue . get ( org . nohope . cassandra . mapservice . CMapNonTrivialTypeIT . DWARF_COL ) , gloin ) |
synchronizeClusterSchemas_should_not_sync_unshared ( ) { final java . lang . String clusterSchemaName = "ClusterSchema" ; org . pentaho . di . trans . TransMeta transformarion1 = createTransMeta ( ) ; org . pentaho . di . cluster . ClusterSchema clusterSchema1 = org . pentaho . di . ui . spoon . SharedObjectSyncUtilTes... | org . junit . Assert . assertThat ( clusterSchema1 . isDynamic ( ) , org . hamcrest . CoreMatchers . equalTo ( false ) ) |
testRemoteAsyncInvocationByValueFromEjbInjcation ( ) { org . jboss . as . test . integration . ejb . remote . async . StatelessRemoteBean . reset ( ) ; java . lang . String [ ] array = new java . lang . String [ ] { "hello" } ; org . jboss . as . test . integration . ejb . remote . async . StatelessRunningBean remote =... | org . junit . Assert . assertEquals ( "hello" , array [ 0 ] ) |
testNewWizardShortCuts ( ) { java . lang . String [ ] newWizardShortcutIds = org . eclipse . ui . PlatformUI . getWorkbench ( ) . getActiveWorkbenchWindow ( ) . getActivePage ( ) . getNewWizardShortcuts ( ) ; java . lang . String [ ] expectedIds = new java . lang . String [ ] { org . eclipse . corrosion . wizards . new... | org . junit . Assert . assertArrayEquals ( expectedIds , newWizardShortcutIds ) |
testGetSetName ( ) { java . lang . String expectedName = "expectedName" ; com . microsoft . windowsazure . services . media . models . ContentKeyInfo contentKeyInfo = new com . microsoft . windowsazure . services . media . models . ContentKeyInfo ( null , new com . microsoft . windowsazure . services . media . implemen... | org . junit . Assert . assertEquals ( expectedName , actualName ) |
testSingleDirectory1 ( ) { eu . infomas . annotation . FileIterator iter = new eu . infomas . annotation . FileIterator ( new java . io . File ( "./src/test/java/eu/infomas/annotation" ) ) ; "<AssertPlaceHolder>" ; } countFiles ( eu . infomas . annotation . FileIterator ) { int counter = 0 ; while ( ( iter . next ( ) )... | org . junit . Assert . assertEquals ( 7 , countFiles ( iter ) ) |
testInitCache ( ) { org . apache . abdera . protocol . client . AbderaClient client = new org . apache . abdera . protocol . client . AbderaClient ( ) ; "<AssertPlaceHolder>" ; } getCache ( ) { return cache ; } | org . junit . Assert . assertNotNull ( client . getCache ( ) ) |
testEqualsForEqualPackagesWithVersionRange ( ) { java . lang . String packageName = "package.name" ; java . lang . String version = "[1.0.0,<sp>1.6.3)" ; org . apache . aries . application . modelling . ImportedPackage package1 = instantiatePackage ( packageName , version ) ; org . apache . aries . application . modell... | org . junit . Assert . assertEquals ( package1 , package2 ) |
testGetBlock ( ) { org . inchain . store . BlockStore blockStore = storeProvider . getBlock ( org . inchain . utils . Hex . decode ( "23971206eec0ac170be2a9371867442b15cd422729c5265e3c580c2c51b36ea7" ) ) ; "<AssertPlaceHolder>" ; } decode ( java . lang . String ) { byte [ ] bts = new byte [ ( hexString . length ( ) ) /... | org . junit . Assert . assertNotNull ( blockStore ) |
testInjectFinalClass ( ) { final java . lang . String request = "hello" ; final java . lang . String response = "goodBye" ; when ( finalClass . getLocalHostname ( request ) ) . thenReturn ( response ) ; java . lang . String responseMethod = claseConStatic . method1 ( request ) ; System . out . println ( ( "response<sp>... | org . junit . Assert . assertEquals ( responseMethod , response ) |
auth_parse_no_info_2 ( ) { org . apache . jena . rdf . model . Resource r = org . apache . jena . fuseki . main . access . TestAuthorized . model . createResource ( "http://example/none" ) ; org . apache . jena . fuseki . auth . AuthPolicy auth = org . apache . jena . fuseki . build . FusekiBuilder . allowedUsers ( r )... | org . junit . Assert . assertNull ( auth ) |
testPutCacheItem ( ) { org . codehaus . httpcache4j . HTTPResponse response = new org . codehaus . httpcache4j . HTTPResponse ( org . codehaus . httpcache4j . Status . OK , new org . codehaus . httpcache4j . Headers ( ) ) ; response = storage . insert ( org . codehaus . httpcache4j . cache . CacheStorageAbstractTest . ... | org . junit . Assert . assertEquals ( 1 , storage . size ( ) ) |
testTruncateToSizeTextSmallerThanMax ( ) { int size = _randomSize ( ) ; java . lang . String text = ( ( com . liferay . portal . kernel . test . util . RandomTestUtil . randomString ( ( ( size / 2 ) - 1 ) ) ) + ( com . liferay . petra . string . StringPool . SPACE ) ) + ( com . liferay . portal . kernel . test . util .... | org . junit . Assert . assertEquals ( text , com . liferay . asset . auto . tagger . google . cloud . natural . language . internal . util . GCloudNaturalLanguageUtil . truncateToSize ( text , size ) ) |
testGetServiceWithSimpleRegistrationTwice ( ) { try ( com . liferay . registry . collections . ServiceTrackerMap < java . lang . String , java . util . List < com . liferay . registry . internal . TrackedOne > > serviceTrackerMap = createServiceTrackerMap ( ) ) { registerService ( new com . liferay . registry . interna... | org . junit . Assert . assertEquals ( services . toString ( ) , 2 , services . size ( ) ) |
newInstanceMetadataMirrorReplicationModeOverridesDisabledSnapshots ( ) { when ( tableReplication . getReplicationMode ( ) ) . thenReturn ( ReplicationMode . METADATA_MIRROR ) ; when ( sourceCatalog . isDisableSnapshots ( ) ) . thenReturn ( false ) ; com . hotels . bdp . circustrain . core . source . SourceFactory sourc... | org . junit . Assert . assertTrue ( source . isSnapshotsDisabled ( ) ) |
testSimpleThread ( ) { final xapi . fu . Mutable < java . lang . Boolean > success = new xapi . fu . Mutable ( ) ; java . util . concurrent . Semaphore wait = new java . util . concurrent . Semaphore ( 1 , true ) ; wait . acquire ( ) ; java . util . concurrent . Semaphore finish = new java . util . concurrent . Semapho... | org . junit . Assert . assertTrue ( success . out1 ( ) ) |
testRoundTripConnectionStatusRequest ( ) { final java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; final org . apache . nifi . cluster . protocol . message . NodeConnectionStatusRequestMessage msg = new org . apache . nifi . cluster . protocol . message . NodeConnectionStatusRequestMe... | org . junit . Assert . assertTrue ( ( unmarshalled instanceof org . apache . nifi . cluster . protocol . message . NodeConnectionStatusRequestMessage ) ) |
testSetOptionalMatchNoRewrite ( ) { java . lang . String grammar = "grammar<sp>T;\n" + ( ( ( ( "options<sp>{output=AST;}\n" + "a" 1 ) + "ID<sp>:<sp>\'a\'..\'z\'+<sp>;\n" ) + "INT<sp>:<sp>\'0\'..\'9\'+;\n" ) + "a" 0 ) ; java . lang . String treeGrammar = "tree<sp>grammar<sp>TP;\n" + ( "options<sp>{output=AST;<sp>ASTLabe... | org . junit . Assert . assertEquals ( "a" 4 , found ) |
doTest ( ) { final org . apache . tinkerpop . gremlin . process . traversal . TraversalStrategies strategies = new org . apache . tinkerpop . gremlin . process . traversal . util . DefaultTraversalStrategies ( ) ; strategies . addStrategies ( org . apache . tinkerpop . gremlin . process . traversal . strategy . optimiz... | org . junit . Assert . assertEquals ( this . optimized , this . original ) |
testGetDataCategory ( ) { final org . cytoscape . io . DataCategory category = source . getDataCategory ( ) ; "<AssertPlaceHolder>" ; } getDataCategory ( ) { return this . category ; } | org . junit . Assert . assertEquals ( this . category , category ) |
isBillingDataButtonDisabled_FromDateIsNull ( ) { java . util . Date date = new java . util . Date ( java . lang . System . currentTimeMillis ( ) ) ; bean . setFromDate ( null ) ; bean . setToDate ( date ) ; boolean result = bean . isBillingDataButtonDisabled ( ) ; "<AssertPlaceHolder>" ; } isBillingDataButtonDisabled (... | org . junit . Assert . assertTrue ( result ) |
testMinorCompaction ( ) { org . apache . hadoop . hbase . TableName tn = helper . createTableWithRegions ( 1 ) ; org . apache . hadoop . hbase . quotas . QuotaSettings settings = org . apache . hadoop . hbase . quotas . QuotaSettingsFactory . limitTableSpace ( tn , SpaceQuotaHelperForTests . ONE_GIGABYTE , SpaceViolati... | org . junit . Assert . assertEquals ( numBatches , numFiles ) |
EsIndexdeleteByQueryException ( ) { com . fujitsu . dc . common . es . EsIndex index = com . fujitsu . dc . common . es . impl . v1_2 . EsRetryTest . esClient . idxAdmin ( "index_for_test" ) ; index . create ( ) ; com . fujitsu . dc . common . es . EsType type = com . fujitsu . dc . common . es . impl . v1_2 . EsRetryT... | org . junit . Assert . assertNotNull ( type ) |
when_attribute_value_expression_evaluates_to_null_then_evaluateAttribute_should_return_attribute_value ( ) { java . util . Map < java . lang . String , java . lang . Object > attributes = com . google . common . collect . Maps . newTreeMap ( ) ; java . lang . Object value = new java . lang . Object ( ) ; attributes . p... | org . junit . Assert . assertEquals ( value , evaluated ) |
saveOrder_shouldFailIfConceptInPreviousOrderDoesNotMatchThatOfTheRevisedOrder ( ) { org . openmrs . Order previousOrder = orderService . getOrder ( 7 ) ; org . openmrs . Order order = previousOrder . cloneForRevision ( ) ; order . setDateActivated ( new java . util . Date ( ) ) ; order . setOrderer ( providerService . ... | org . junit . Assert . assertFalse ( previousOrder . getConcept ( ) . equals ( newConcept ) ) |
testLigandBonds ( ) { org . biojava . nbio . structure . Structure s = org . biojava . nbio . structure . StructureIO . getStructure ( "1kh9" ) ; org . biojava . nbio . structure . Atom phosphateP = s . getChain ( "I" ) . getAtomGroup ( 0 ) . getAtom ( "P" ) ; org . biojava . nbio . structure . Atom phosphateO = s . ge... | org . junit . Assert . assertTrue ( areBonded ( phosphateP , phosphateO ) ) |
testCreateBuffer ( ) { io . netty . channel . embedded . EmbeddedChannel channel = org . apache . activemq . artemis . tests . unit . core . remoting . impl . netty . NettyConnectionTest . createChannel ( ) ; org . apache . activemq . artemis . core . remoting . impl . netty . NettyConnection conn = new org . apache . ... | org . junit . Assert . assertEquals ( size , buff . capacity ( ) ) |
testConvertToRuleActionIn ( ) { org . hawkular . apm . api . model . config . instrumentation . jvm . InstrumentProducer im = new org . hawkular . apm . api . model . config . instrumentation . jvm . InstrumentProducer ( ) ; im . setEndpointTypeExpression ( "\"MyEndpoint\"" ) ; im . setUriExpression ( "\"MyUri\"" ) ; i... | org . junit . Assert . assertEquals ( expected , transformed ) |
testOntvangst ( ) { cleanQueue ( nl . bzk . migratiebrp . voisc . runtime . VOISC_ONTVANGST_QUEUE ) ; sendToMailbox ( "0599010" , "3000200" , "MSG000000001" , null , "BERICHTINHOUD" ) ; final javax . jms . Message message = expectMessage ( nl . bzk . migratiebrp . voisc . runtime . VOISC_ONTVANGST_QUEUE ) ; "<AssertPla... | org . junit . Assert . assertEquals ( "BERICHTINHOUD" , getContent ( message ) ) |
testCompletenessOfSpecifiedInputPortBindings ( ) { org . apache . taverna . scufl2 . api . profiles . ProcessorBinding pb = new org . apache . taverna . scufl2 . api . profiles . ProcessorBinding ( ) ; org . apache . taverna . scufl2 . validation . correctness . CorrectnessValidator cv = new org . apache . taverna . sc... | org . junit . Assert . assertFalse ( problem ) |
valueNullTest ( ) { org . marc . everest . datatypes . ANY value = observationHelper ( org . oscarehr . e2e . model . export . template . ResultComponentModelTest . nullLabComponent ) . getValue ( ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; } | org . junit . Assert . assertNull ( value ) |
shouldVerifyCode ( ) { java . lang . String totpKey = "ASLO43KDF2J" ; fr . xephi . authme . data . auth . PlayerAuth auth = fr . xephi . authme . data . auth . PlayerAuth . builder ( ) . name ( "Maya" ) . totpKey ( totpKey ) . build ( ) ; java . lang . String inputCode = "408435" ; given ( totpAuthenticator . checkCode... | org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . equalTo ( true ) ) |
testHuidigeSituatieLeeg ( ) { java . util . List < nl . bzk . brp . model . validatie . Melding > meldingen = bral9003 . executeer ( null , null , new nl . bzk . brp . model . attribuuttype . Datum ( 20150101 ) , null ) ; org . mockito . Mockito . verify ( persoonOpschortingHistorieRepository , org . mockito . Mockito ... | org . junit . Assert . assertEquals ( 0 , meldingen . size ( ) ) |
typedObjectFromFloatAndDecimal ( ) { com . pardot . rhombus . cobject . CField field = new com . pardot . rhombus . cobject . CField ( "test" , "decimal" ) ; java . lang . Float jsonValue = 1234.56F ; java . math . BigDecimal expected = java . math . BigDecimal . valueOf ( jsonValue ) ; java . lang . Object result = co... | org . junit . Assert . assertEquals ( expected , result ) |
testCase32 ( ) { org . evosuite . testcase . DefaultTestCase tc = buildTestCase32 ( ) ; java . util . List < org . evosuite . symbolic . BranchCondition > branch_conditions = executeTest ( tc ) ; "<AssertPlaceHolder>" ; } size ( ) { return theTest . size ( ) ; } | org . junit . Assert . assertEquals ( 0 , branch_conditions . size ( ) ) |
testMoveBelow ( ) { org . eclipse . swt . widgets . Control child1 = new org . eclipse . swt . widgets . Label ( shell , org . eclipse . swt . SWT . NONE ) ; org . eclipse . swt . widgets . Control child2 = new org . eclipse . swt . widgets . Label ( shell , org . eclipse . swt . SWT . NONE ) ; child1 . moveBelow ( chi... | org . junit . Assert . assertArrayEquals ( new org . eclipse . swt . widgets . Control [ ] { child2 , child1 } , shell . getChildren ( ) ) |
shouldIgnoreClassesWithNoProcedures ( ) { java . util . List < org . neo4j . kernel . api . proc . CallableProcedure > procedures = compile ( org . neo4j . kernel . impl . proc . ReflectiveProcedureTest . PrivateConstructorButNoProcedures . class ) ; "<AssertPlaceHolder>" ; } size ( ) { return map . size ( ) ; } | org . junit . Assert . assertEquals ( 0 , procedures . size ( ) ) |
testRandShapeAndMinMax ( ) { org . nd4j . linalg . api . ndarray . INDArray ret = org . nd4j . linalg . factory . Nd4j . rand ( new int [ ] { 4 , 2 } , ( - 0.125F ) , 0.125F , org . nd4j . linalg . factory . Nd4j . getRandomFactory ( ) . getNewRandomInstance ( 123 ) ) ; org . nd4j . linalg . api . ndarray . INDArray re... | org . junit . Assert . assertEquals ( ret , ret2 ) |
testFormat ( ) { testFormatting ( org . esa . beam . util . converters . JtsGeometryConverterTest . factory . createPoint ( new com . vividsolutions . jts . geom . Coordinate ( 12.456789 , 1.0E-8 ) ) ) ; final com . vividsolutions . jts . geom . Coordinate [ ] coordinates = new com . vividsolutions . jts . geom . Coord... | org . junit . Assert . assertEquals ( "" , org . esa . beam . util . converters . JtsGeometryConverterTest . converter . format ( null ) ) |
isLastUpTo ( ) { int level = 3 ; "<AssertPlaceHolder>" ; historySplit [ 2 ] . isLastUpTo ( level ) ; } | org . junit . Assert . assertTrue ( ( ( historySplit [ 2 ] . size ( ) ) == 2 ) ) |
replaceInTemplatePartWeShouldGetRightString ( ) { java . lang . String template = "Hello,<sp>${name},<sp>How<sp>are<sp>you<sp>${subject}" ; ru . szhernovoy . generator . Template templ = new ru . szhernovoy . generator . SimpleGenerator ( ) ; java . util . Map < java . lang . String , java . lang . String > map = new j... | org . junit . Assert . assertThat ( check , org . hamcrest . core . Is . is ( result ) ) |
getWhenReEnableBySystemStringGivenDefaultsThenReturnsEmptyString ( ) { final com . nirima . jenkins . plugins . docker . DockerDisabledTest . TestClass i = new com . nirima . jenkins . plugins . docker . DockerDisabledTest . TestClass ( ) ; final java . lang . String actual = i . getWhenReEnableBySystemString ( ) ; "<A... | org . junit . Assert . assertEquals ( "" , actual ) |
testCleanDatabase ( ) { java . util . List < org . nhindirect . config . store . Domain > domains = domainDao . searchDomain ( null , null ) ; if ( domains != null ) for ( org . nhindirect . config . store . Domain dom : domains ) domainDao . delete ( dom . getDomainName ( ) ) ; domains = domainDao . searchDomain ( nul... | org . junit . Assert . assertEquals ( 0 , domains . size ( ) ) |
twoConstructorsNoCharlieNoDelta ( ) { org . springframework . issues . Alpha alpha = createAndRefreshApplicationContext ( "two-constructors" ) ; "<AssertPlaceHolder>" ; } getBravo ( ) { return bravo ; } | org . junit . Assert . assertNotNull ( alpha . getBravo ( ) ) |
testPortCreationInProducer ( ) { checkPortsCreator ( new eu . dnetlib . iis . common . java . jsonworkflownodes . PortsCreator ( ) { @ eu . dnetlib . iis . common . java . jsonworkflownodes . Override public java . util . Map < java . lang . String , eu . dnetlib . iis . common . java . porttype . PortType > getPorts (... | org . junit . Assert . assertEquals ( 0 , producer . getInputPorts ( ) . size ( ) ) |
stateMachineTraits060Test ( ) { cruise . umple . compiler . UmpleModel model = getModelByFilename ( "trait_test_data_0018.ump" ) ; boolean result = false ; try { model . run ( ) ; } catch ( java . lang . Exception e ) { result = e . getMessage ( ) . contains ( "236" ) ; } finally { "<AssertPlaceHolder>" ; cruise . umpl... | org . junit . Assert . assertTrue ( result ) |
test_Filter10 ( ) { java . lang . String expected = "cbabc" ; java . lang . String actual ; org . osgi . framework . Bundle bundle = installBundle ( org . eclipse . equinox . http . servlet . tests . TEST_BUNDLE_1 ) ; try { bundle . start ( ) ; actual = requestAdvisor . request ( "TestFilter10/cbabc" ) ; } finally { un... | org . junit . Assert . assertEquals ( expected , actual ) |
testLargeGroupListNodeWithoutTableSize ( ) { java . lang . String scratchpadSchemaName = "oldSchema" 1 ; org . verdictdb . core . querying . TempIdCreatorInScratchpadSchema idCreator = new org . verdictdb . core . querying . TempIdCreatorInScratchpadSchema ( scratchpadSchemaName ) ; java . lang . String schemaName = "o... | org . junit . Assert . assertEquals ( expected , actual ) |
testOnPostbackDefaultsToTrue ( ) { com . ocpsoft . pretty . faces . config . mapping . UrlMapping mapping = config . getMappingById ( "0" ) ; "<AssertPlaceHolder>" ; } isOnPostback ( ) { return onPostback ; } | org . junit . Assert . assertEquals ( true , mapping . isOnPostback ( ) ) |
testFindByPrimaryKeyExisting ( ) { com . liferay . portal . kernel . model . Company newCompany = addCompany ( ) ; com . liferay . portal . kernel . model . Company existingCompany = _persistence . findByPrimaryKey ( newCompany . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId... | org . junit . Assert . assertEquals ( existingCompany , newCompany ) |
zipPlusFiveParses ( ) { java . util . List < java . util . List < java . lang . String > > pages = gov . nysenate . openleg . processor . hearing . PublicHearingTestHelper . getPagesFromFileName ( "09-17-13<sp>Carlucci_Mental<sp>Health_Ogdensburg_FINAL.txt" ) ; java . lang . String expected = "Ogdensburg<sp>City<sp>Hal... | org . junit . Assert . assertThat ( actual , org . hamcrest . Matchers . is ( expected ) ) |
testBuildSoqlQueryComplexRelationship ( ) { java . lang . String expected = "\"SELECT<sp>Id,<sp>Name,<sp>(SELECT<sp>Quantity,<sp>ListPrice,<sp>PricebookEntry.UnitPrice,<sp>PricebookEntry.Name<sp>FROM<sp>OpportunityLineItems)<sp>FROM<sp>Opportunity\"" ; org . apache . avro . Schema schema = org . apache . avro . SchemaB... | org . junit . Assert . assertEquals ( expected , queryFromBuilder ) |
testProbabilitySamplerSink ( ) { System . out . println ( "Probability<sp>sampler" ) ; long historyLen = 300 ; com . cloudera . flume . reporter . history . ScheduledHistoryReporter < com . cloudera . flume . reporter . aggregator . CounterSink > hist = new com . cloudera . flume . reporter . history . ScheduledHistory... | org . junit . Assert . assertEquals ( ans [ i ] , count ) |
test ( ) { org . zkoss . zats . mimic . DesktopAgent desktop = connect ( ) ; desktop . query ( "#addPersonBtn" ) . click ( ) ; desktop . query ( "#delPerson_0" ) . click ( ) ; desktop . query ( "#addUrlBtn" ) . click ( ) ; desktop . query ( "#delUrl_0" ) . click ( ) ; org . zkoss . zats . mimic . ComponentAgent widget ... | org . junit . Assert . assertFalse ( ( widget != null ) ) |
testWarmup ( ) { debug = false ; java . io . InputStream inputStream = runAndRenderReport ( "MegaSize.rptdesign" , "xlsx" ) ; "<AssertPlaceHolder>" ; try { } finally { inputStream . close ( ) ; } } runAndRenderReport ( java . lang . String , java . lang . String ) { return runAndRenderReportCustomTask ( filename , outp... | org . junit . Assert . assertNotNull ( inputStream ) |
testSecuredOrgUnitsWithPermission ( ) { when ( authorizationManager . authorize ( any ( org . uberfire . security . Resource . class ) , any ( org . jboss . errai . security . shared . api . identity . User . class ) ) ) . thenReturn ( true ) ; java . util . Collection < org . guvnor . structure . organizationalunit . ... | org . junit . Assert . assertEquals ( 1 , orgUnits . size ( ) ) |
getIndexOfCommandParameter ( ) { retryCommandSpy . originalArgs = java . util . Arrays . asList ( "retry" , "-d" , "tmp" , "--command" ) ; "<AssertPlaceHolder>" ; } getIndexOfCommandParameter ( ) { int indexOf = originalArgs . indexOf ( com . box . l10n . mojito . cli . command . RetryCommand . COMMAND_SHORT ) ; if ( i... | org . junit . Assert . assertEquals ( 3 , retryCommandSpy . getIndexOfCommandParameter ( ) ) |
testDurationIsPositivValue ( ) { io . github . tcdl . msb . config . MsbConfig msbConf = new io . github . tcdl . msb . config . MsbConfig ( com . typesafe . config . ConfigFactory . load ( ) ) ; io . github . tcdl . msb . api . message . MetaMessage metaMessage = new io . github . tcdl . msb . api . message . MetaMess... | org . junit . Assert . assertTrue ( ( ( metaMessage . getDurationMs ( ) ) > 0 ) ) |
testMaximumTimeMillisecondsDefault ( ) { final com . allanbank . mongodb . bson . Document query = Find . ALL ; final com . allanbank . mongodb . bson . Document update = com . allanbank . mongodb . bson . builder . BuilderFactory . start ( ) . addInteger ( "foo" , 3 ) . build ( ) ; final com . allanbank . mongodb . bu... | org . junit . Assert . assertThat ( command . getMaximumTimeMilliseconds ( ) , org . hamcrest . Matchers . is ( 0L ) ) |
search_match_partial_email_address ( ) { databaseHelper . addObject ( net . ripe . db . whois . common . rpsl . RpslObject . parse ( ( "mntner:<sp>OWNER-MNT\n" + "source:<sp>RIPE" ) ) ) ; databaseHelper . addObject ( net . ripe . db . whois . common . rpsl . RpslObject . parse ( ( "organisation:<sp>ORG-TOS1-TEST\n" + (... | org . junit . Assert . assertThat ( numFound ( query ( "org-name:<sp>ORG-TOS1-TEST\n" 0 ) ) , org . hamcrest . Matchers . is ( 1L ) ) |
constructorSavesPropertyName ( ) { final java . lang . String name = "test-name" ; final java . lang . String value = "test-value" ; com . microsoft . azure . sdk . iot . device . MessageProperty property = new com . microsoft . azure . sdk . iot . device . MessageProperty ( name , value ) ; java . lang . String testNa... | org . junit . Assert . assertThat ( testName , org . hamcrest . CoreMatchers . is ( expectedName ) ) |
getInstanceDetails_withException ( ) { org . oscm . app . common . instanceDetail . ExtensionInterfaceBean bean = getTestBean ( instanceID , subscriptionID , organizationID ) ; org . mockito . Mockito . < java . util . List < ? extends org . oscm . app . v2_0 . intf . ServerInformation > > when ( instanceAccess . getSe... | org . junit . Assert . assertEquals ( 0 , sv . size ( ) ) |
testQueryByDeploymentId ( ) { java . lang . String deploymentId = repositoryService . createDeployment ( ) . addClasspathResource ( org . camunda . bpm . engine . test . standalone . history . CustomHistoryLevelWithoutUserOperationLogTest . ONE_TASK_PROCESS ) . deploy ( ) . getId ( ) ; org . camunda . bpm . engine . hi... | org . junit . Assert . assertEquals ( 0 , query . count ( ) ) |
testUpdateClustersToggleKerberosNotInvoked ( ) { org . easymock . Capture < org . apache . ambari . server . controller . AmbariManagementController > controllerCapture = org . easymock . EasyMock . newCapture ( ) ; com . google . inject . Injector injector = createStrictMock ( com . google . inject . Injector . class ... | org . junit . Assert . assertSame ( controller , controllerCapture . getValue ( ) ) |
deveObterAmbienteComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . NFProtocoloInfo protocoloInfo = new com . fincatto . documentofiscal . nfe310 . classes . NFProtocoloInfo ( ) ; final com . fincatto . documentofiscal . DFAmbiente ambiente = com . fincatto . documentofiscal . DFAmbiente . ... | org . junit . Assert . assertEquals ( ambiente , protocoloInfo . getAmbiente ( ) ) |
testAddComment ( ) { try { org . odftoolkit . simple . TextDocument textDoc = org . odftoolkit . simple . TextDocument . loadDocument ( org . odftoolkit . simple . utils . ResourceUtilities . getAbsolutePath ( org . odftoolkit . simple . common . navigation . TextSelectionTest . TEXT_COMMENT_FILE ) ) ; search = new org... | org . junit . Assert . assertEquals ( 7 , i ) |
testEqualsSameSerial2 ( ) { org . openhab . io . transport . modbus . endpoint . ModbusSerialSlaveEndpoint e1 = new org . openhab . io . transport . modbus . endpoint . ModbusSerialSlaveEndpoint ( "port1" , 9600 , gnu . io . SerialPort . FLOWCONTROL_NONE , gnu . io . SerialPort . FLOWCONTROL_NONE , gnu . io . SerialPor... | org . junit . Assert . assertEquals ( e1 , e2 ) |
testImplementation ( ) { org . springframework . context . annotation . AnnotationConfigApplicationContext context = new org . springframework . context . annotation . AnnotationConfigApplicationContext ( org . springframework . retry . annotation . EnableRetryTests . TestConfiguration . class ) ; org . springframework... | org . junit . Assert . assertEquals ( 5 , service . getCount ( ) ) |
testImageRequestDefault ( ) { com . facebook . imagepipeline . core . ImagePipelineConfig . resetDefaultRequestConfig ( ) ; final com . facebook . imagepipeline . request . ImageRequest imageRequest = com . facebook . imagepipeline . request . ImageRequestBuilder . newBuilderWithSource ( mUri ) . build ( ) ; "<AssertPl... | org . junit . Assert . assertFalse ( imageRequest . getProgressiveRenderingEnabled ( ) ) |
whenOtherServersDefined_adminServerHasNoEnvironmentVariables ( ) { configureServer ( oracle . kubernetes . weblogic . domain . DomainTestBase . SERVER1 ) . withEnvironmentVariable ( oracle . kubernetes . weblogic . domain . DomainTestBase . NAME1 , oracle . kubernetes . weblogic . domain . DomainTestBase . VALUE1 ) . w... | org . junit . Assert . assertThat ( spec . getEnvironmentVariables ( ) , org . hamcrest . Matchers . empty ( ) ) |
testDeleteAllColumns ( ) { org . sagebionetworks . repo . model . table . ColumnModel one = servletTestHelper . createColumnModel ( dispatchServlet , org . sagebionetworks . repo . model . dbo . dao . table . TableModelTestUtils . createColumn ( 0L , "one" , ColumnType . STRING ) , adminUserId ) ; org . sagebionetworks... | org . junit . Assert . assertEquals ( 0 , table . getColumnIds ( ) . size ( ) ) |
testWriteLockSynchronizes ( ) { org . corfudb . infrastructure . log . MultiReadWriteLock locks = new org . corfudb . infrastructure . log . MultiReadWriteLock ( ) ; java . util . concurrent . CyclicBarrier entry = new java . util . concurrent . CyclicBarrier ( PARAMETERS . CONCURRENCY_SOME ) ; java . util . concurrent... | org . junit . Assert . assertTrue ( noProblems . get ( ) ) |
testGetFieldIndex ( ) { org . apache . gora . examples . generated . WebPage page = org . apache . gora . examples . generated . WebPage . newBuilder ( ) . build ( ) ; for ( int i = 0 ; i < ( WebPage . SCHEMA . . getFields ( ) . toArray ( ) . length ) ; i ++ ) { int index = page . getSchema ( ) . getFields ( ) . get ( ... | org . junit . Assert . assertEquals ( i , index ) |
loadModule_shouldLoadModuleIfItIsCurrentlyNotLoaded ( ) { java . lang . Module test2 = loadModule ( org . openmrs . module . ModuleFactoryTest . MODULE2_PATH , org . openmrs . module . ModuleFactoryTest . MODULE2 , false ) ; org . openmrs . module . ModuleFactory . startModule ( test2 ) ; "<AssertPlaceHolder>" ; } getL... | org . junit . Assert . assertTrue ( org . openmrs . module . ModuleFactory . getLoadedModules ( ) . contains ( test2 ) ) |
testFetchByPrimaryKeyExisting ( ) { com . liferay . portal . kernel . model . PortletPreferences newPortletPreferences = addPortletPreferences ( ) ; com . liferay . portal . kernel . model . PortletPreferences existingPortletPreferences = _persistence . fetchByPrimaryKey ( newPortletPreferences . getPrimaryKey ( ) ) ; ... | org . junit . Assert . assertEquals ( existingPortletPreferences , newPortletPreferences ) |
shouldManageUnusedRecordsWithWeirdDataIn ( ) { final java . util . concurrent . atomic . AtomicLong id = new java . util . concurrent . atomic . AtomicLong ( ) ; fixture . apply ( new org . neo4j . consistency . checking . GraphStoreFixture . Transaction ( ) { @ org . neo4j . consistency . checking . full . Override pr... | org . junit . Assert . assertTrue ( stats . isConsistent ( ) ) |
testUpdateRaxaAlert ( ) { org . raxa . module . raxacore . RaxaAlert raxaAlert = dao . getRaxaAlert ( 1 ) ; raxaAlert . setName ( "NewNameList" ) ; dao . updateRaxaAlert ( raxaAlert ) ; java . lang . String name = dao . getRaxaAlert ( 1 ) . getName ( ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; } | org . junit . Assert . assertEquals ( name , "NewNameList" ) |
whenDivideTwoNumberShouldBeResultCalculation ( ) { chapter1 . typedata . Calculator calc = new chapter1 . typedata . Calculator ( ) ; calc . div ( 2 , 1 ) ; double result = calc . getResult ( ) ; double testResult = 2 ; "<AssertPlaceHolder>" ; } getResult ( ) { return result ; } | org . junit . Assert . assertThat ( result , org . hamcrest . core . Is . is ( testResult ) ) |
should_return_this ( ) { org . fest . assertions . api . ByteArrayAssert returned = assertions . startsWith ( sequence ) ; "<AssertPlaceHolder>" ; } startsWith ( long [ ] ) { arrays . assertStartsWith ( description , actual , sequence ) ; return this ; } | org . junit . Assert . assertSame ( returned , assertions ) |
createInstance ( ) { this . setRevisionTo ( "8cf0ce80c2c40c6ec178ef8e5bdc4e2fcdecc7f9" ) ; org . eclipse . winery . common . ids . definitions . ServiceTemplateId id = new org . eclipse . winery . common . ids . definitions . ServiceTemplateId ( "http://winery.opentosca.org/test/servicetemplates/fruits" , "farm" , fals... | org . junit . Assert . assertNotNull ( serviceTemplateResource ) |
testFindElementsByName ( ) { java . util . Random random = new java . util . Random ( ) ; org . openqa . selenium . WebElement text = com . sugarcrm . candybean . examples . mobile . AppiumIosTest . driver . findElements ( org . openqa . selenium . By . name ( "TextField1" ) ) . get ( 0 ) ; int number = ( random . next... | org . junit . Assert . assertEquals ( sumLabel . getText ( ) , java . lang . String . valueOf ( number ) ) |
testDestroy ( ) { tested . setDomain ( "someDomain" ) ; tested . destroy ( ) ; verify ( cache , times ( 1 ) ) . clear ( ) ; "<AssertPlaceHolder>" ; } getCache ( ) { return cache ; } | org . junit . Assert . assertNull ( tested . getCache ( ) ) |
presetUpdateLimit ( ) { int updateLimit = ( DocumentMK . Builder . DEFAULT_UPDATE_LIMIT ) / 2 ; addConfigurationEntry ( preset , "updateLimit" , updateLimit ) ; org . apache . jackrabbit . oak . plugins . document . Configuration config = createConfiguration ( ) ; "<AssertPlaceHolder>" ; } createConfiguration ( ) { ret... | org . junit . Assert . assertEquals ( updateLimit , config . updateLimit ( ) ) |
testBackward ( ) { java . sql . Statement stmt = con . createStatement ( ResultSet . TYPE_SCROLL_INSENSITIVE , ResultSet . CONCUR_READ_ONLY ) ; java . sql . ResultSet rs = stmt . executeQuery ( "SELECT<sp>*<sp>FROM<sp>testrs" ) ; rs . afterLast ( ) ; "<AssertPlaceHolder>" ; rs . close ( ) ; stmt . close ( ) ; } previou... | org . junit . Assert . assertTrue ( rs . previous ( ) ) |
isBundle_nonExistingJar ( ) { aQute . bnd . osgi . Jar jar = new aQute . bnd . osgi . Jar ( "non-existing.jar" ) ; boolean isBundle = utils . isBundle ( jar ) ; "<AssertPlaceHolder>" ; } isBundle ( java . io . File ) { aQute . bnd . osgi . Jar inputJar = null ; try { inputJar = new aQute . bnd . osgi . Jar ( file ) ; r... | org . junit . Assert . assertFalse ( isBundle ) |
setDefaultValue_TypeBOOLEAN ( ) { parameterParserSpy . setDefaultValue ( defaultValue , strMinValue , strMaxValue , ParameterValueType . BOOLEAN ) ; verify ( parameterParserSpy , times ( 1 ) ) . setDefaultValueForNonDigitalTpye ( strCaptor . capture ( ) , any ( org . oscm . internal . types . enumtypes . ParameterValue... | org . junit . Assert . assertEquals ( defaultValue , strCaptor . getValue ( ) ) |
testGetBatchOfObsoleteIds ( ) { org . mozilla . gecko . sync . ExtendedJSONObject ids = new org . mozilla . gecko . sync . ExtendedJSONObject ( ) ; for ( int i = 0 ; i < ( ( 2 * ( org . mozilla . gecko . background . healthreport . HealthReportConstants . MAXIMUM_DELETIONS_PER_POST ) ) + 10 ) ; i ++ ) { ids . put ( ( "... | org . junit . Assert . assertEquals ( expected , new java . util . HashSet < java . lang . String > ( tracker . getBatchOfObsoleteIds ( ) ) ) |
testUpdateAttachmentsFromRequestIdsAreNull ( ) { javax . portlet . PortletRequest request = org . mockito . Mockito . mock ( javax . portlet . PortletRequest . class ) ; new org . eclipse . sw360 . portal . TestUserCacheHolder ( ) . enable ( ) ; java . util . Set < org . eclipse . sw360 . datahandler . thrift . attachm... | org . junit . Assert . assertThat ( org . eclipse . sw360 . portal . common . PortletUtils . updateAttachmentsFromRequest ( request , documentAttachments ) , org . hamcrest . core . Is . is ( org . hamcrest . Matchers . empty ( ) ) ) |
testInitialUpdate ( ) { org . candlepin . model . Product prod = org . candlepin . test . TestUtil . createProduct ( "test-label" , "test-product-name" ) ; productCurator . create ( prod ) ; "<AssertPlaceHolder>" ; } getUpdated ( ) { return updated ; } | org . junit . Assert . assertNotNull ( prod . getUpdated ( ) ) |
testCopyFormSize ( ) { for ( java . lang . String bcp47tag : PoPluralRule . mappingForNonDefault . keySet ( ) ) { com . ibm . icu . text . PluralRules cldrPluralRule = com . ibm . icu . text . PluralRules . forLocale ( java . util . Locale . forLanguageTag ( bcp47tag ) ) ; int cldrSize = cldrPluralRule . getKeywords ( ... | org . junit . Assert . assertEquals ( copySize , ( cldrSize - poSize ) ) |
testAddInterfaceAddres ( ) { ipInterfaceAddressTlv . addInterfaceAddres ( ip4Address ) ; resultList = ipInterfaceAddressTlv . interfaceAddress ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return map . size ( ) ; } | org . junit . Assert . assertThat ( resultList . size ( ) , org . hamcrest . CoreMatchers . is ( 1 ) ) |
nullFileShouldReturnNull ( ) { "<AssertPlaceHolder>" ; } getFile ( java . lang . String ) { if ( fileName == null ) { return null ; } final java . net . URL url = lcmc . common . domain . util . Tools . class . getResource ( fileName ) ; if ( url == null ) { return null ; } try { final java . io . BufferedReader br = n... | org . junit . Assert . assertNull ( lcmc . common . domain . util . Tools . getFile ( null ) ) |
iterator_isEmptyAfterCreation ( ) { "<AssertPlaceHolder>" ; } iterator ( ) { final java . util . Iterator wrappedIterator = wrappedSet . iterator ( ) ; return new java . util . Iterator ( ) { public boolean hasNext ( ) { return wrappedIterator . hasNext ( ) ; } public java . lang . Object next ( ) { return ( ( org . ec... | org . junit . Assert . assertFalse ( object . iterator ( ) . hasNext ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.