input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testGetStorageAttributeIntegerValueByNameWithDefault_3 ( ) { java . lang . String attributeName = "test" ; java . lang . String attributeValue = "1234" ; org . finra . herd . model . jpa . StorageEntity storageEntity = storageDaoTestHelper . createStorageEntityWithAttributes ( attributeName , attributeValue ) ; java . ... | org . junit . Assert . assertEquals ( new java . lang . Integer ( attributeValue ) , value ) |
getNumberOfProcessDeploymentInfosWithAssignedOrPendingHumanTasksSupervisedBy ( ) { final org . bonitasoft . engine . persistence . QueryOptions options = new org . bonitasoft . engine . persistence . QueryOptions ( 0 , 10 ) ; final long userId = 9 ; when ( persistenceService . getNumberOfEntities ( org . bonitasoft . e... | org . junit . Assert . assertEquals ( 1L , result ) |
checkRadioButtonGroup ( ) { com . vaadin . testbench . elements . RadioButtonGroupElement elem = $ ( com . vaadin . testbench . elements . RadioButtonGroupElement . class ) . get ( 0 ) ; java . lang . String expected = ComponentElementGetValue . TEST_STRING_VALUE ; java . lang . String actual = elem . getValue ( ) ; "<... | org . junit . Assert . assertEquals ( expected , actual ) |
testDoGenerateEdgesValidity ( ) { int meanDegree = 4 ; int numberOfNodes = 10 ; double betaCoefficient = 0.5 ; com . graphaware . module . algo . generator . relationship . WattsStrogatzRelationshipGenerator generator = new com . graphaware . module . algo . generator . relationship . WattsStrogatzRelationshipGenerator... | org . junit . Assert . assertEquals ( ( ( int ) ( ( meanDegree * numberOfNodes ) * 0.5 ) ) , generator . doGenerateEdges ( ) . size ( ) ) |
shouldCoerceAShortTargetWithASingleFlavor ( ) { com . facebook . buck . core . model . BuildTarget seen = new com . facebook . buck . rules . coercer . BuildTargetTypeCoercer ( unconfiguredBuildTargetTypeCoercer ) . coerce ( createCellRoots ( filesystem ) , filesystem , basePath , EmptyTargetConfiguration . INSTANCE , ... | org . junit . Assert . assertEquals ( expected , seen ) |
testCloseCaseInstance ( ) { final org . jbpm . workbench . cm . model . CaseInstanceSummary cis = setupCaseInstance ( ) ; presenter . closeCaseInstance ( ) ; verify ( caseManagementService ) . closeCaseInstance ( cis . getContainerId ( ) , cis . getCaseId ( ) , null ) ; final org . mockito . ArgumentCaptor < org . jbpm... | org . junit . Assert . assertEquals ( cis . getCaseId ( ) , captor . getValue ( ) . getCaseId ( ) ) |
testAdd ( ) { com . corefire . model . AlipayAnnal pay = new com . corefire . model . AlipayAnnal ( ) ; pay . setAppid ( "alipay-appid" ) ; pay . setValue ( new java . math . BigDecimal ( "999.99" ) ) ; pay . setCharge ( new java . math . BigDecimal ( "0.99" ) ) ; java . text . SimpleDateFormat sdf = new java . text . ... | org . junit . Assert . assertEquals ( 1 , res ) |
testValueFromPro ( ) { "<AssertPlaceHolder>" ; System . out . println ( app . ioc ( ) . getBean ( "com.blade.model.ValueBean" ) ) ; } ioc ( ) { return this . ioc ; } | org . junit . Assert . assertNotNull ( app . ioc ( ) . getBean ( "com.blade.model.ValueBean" ) ) |
getEmptySample ( ) { runtime . initialize ( null , org . talend . components . pubsub . runtime . PubSubTestConstants . addSubscriptionForDataset ( org . talend . components . pubsub . runtime . PubSubTestConstants . createDatasetFromAvro ( org . talend . components . pubsub . runtime . PubSubTestConstants . createData... | org . junit . Assert . assertThat ( actual . size ( ) , org . hamcrest . core . Is . is ( 0 ) ) |
testSubclassRemovesObserverAnnotationByOverriding ( ) { java . util . Collection < java . lang . Class < ? > > beanClasses = new java . util . ArrayList < java . lang . Class < ? > > ( ) ; beanClasses . add ( org . apache . webbeans . test . events . observer . Superclass . class ) ; beanClasses . add ( org . apache . ... | org . junit . Assert . assertEquals ( 0 , testEvent . getCalledObservers ( ) . size ( ) ) |
testNoZk ( ) { org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . conf . Configuration ( ) ; org . apache . sentry . provider . db . service . persistent . LeaderStatusMonitor monitor = new org . apache . sentry . provider . db . service . persistent . LeaderStatusMonitor ( conf ) ; "<Asser... | org . junit . Assert . assertTrue ( monitor . isLeader ( ) ) |
shouldNotThrowExceptionWhenFetchRangeIsExpired ( ) { windowStore = createInMemoryWindowStore ( context , false ) ; windowStore . put ( 1 , "one" , 0L ) ; windowStore . put ( 1 , "two" , retentionPeriod ) ; final org . apache . kafka . streams . state . WindowStoreIterator < java . lang . String > iterator = windowStore... | org . junit . Assert . assertFalse ( iterator . hasNext ( ) ) |
testValidate ( ) { org . meridor . perspective . shell . common . validator . PatternValidator patternValidator = new org . meridor . perspective . shell . common . validator . PatternValidator ( ) ; java . lang . Object instance = new java . lang . Object ( ) ; org . meridor . perspective . shell . common . validator ... | org . junit . Assert . assertThat ( patternValidator . validate ( instance , annotation , pattern ) , org . hamcrest . Matchers . is ( result ) ) |
testGlyph ( ) { "<AssertPlaceHolder>" ; tested . getGlyph ( canvasHandler , org . kie . workbench . common . stunner . core . client . components . toolbox . actions . MorphNodeToolboxActionTest . E_UUID ) ; verify ( shapeFactory ) . getGlyph ( org . kie . workbench . common . stunner . core . client . components . too... | org . junit . Assert . assertEquals ( org . kie . workbench . common . stunner . core . client . components . toolbox . actions . MorphNodeToolboxActionTest . MORPH_TARGET_ID , tested . getGlyphId ( canvasHandler , org . kie . workbench . common . stunner . core . client . components . toolbox . actions . MorphNodeTool... |
testGetPostsWithGreatComments ( ) { java . util . List < org . blog . core . domain . BlogPost > found = postService . getPostsWithGreatComments ( getServiceContext ( ) ) ; "<AssertPlaceHolder>" ; } getServiceContext ( ) { return org . sculptor . framework . test . AppEngineTestHelper . getServiceContext ( ) ; } | org . junit . Assert . assertEquals ( 1 , found . size ( ) ) |
testDispose ( ) { org . eclipse . swt . graphics . Cursor cursor = new org . eclipse . swt . graphics . Cursor ( device , org . eclipse . swt . SWT . CURSOR_ARROW ) ; cursor . dispose ( ) ; "<AssertPlaceHolder>" ; } isDisposed ( ) { org . eclipse . swt . widgets . Control c = getMessageControl ( ) ; return ( c != null ... | org . junit . Assert . assertTrue ( cursor . isDisposed ( ) ) |
testGetSourceNode ( ) { com . fasterxml . jackson . databind . JsonNode expResult = com . fasterxml . jackson . databind . node . NullNode . getInstance ( ) ; com . redhat . lightblue . util . JsonObject instance = new com . redhat . lightblue . util . JsonObjectTest . JsonObjectImpl ( expResult ) ; com . fasterxml . j... | org . junit . Assert . assertEquals ( expResult , result ) |
testWithBorderBlocking ( ) { com . graphhopper . routing . AbstractRoutingAlgorithmTester . initBiGraph ( ghStorage ) ; com . graphhopper . routing . lm . LandmarkStorage storage = new com . graphhopper . routing . lm . LandmarkStorage ( ghStorage , new com . graphhopper . routing . lm . RAMDirectory ( ) , new com . gr... | org . junit . Assert . assertEquals ( 3 , storage . getSubnetworksWithLandmarks ( ) ) |
testLicensesProperties ( ) { "<AssertPlaceHolder>" ; } licenseProperties ( ) { if ( ( org . gbif . ipt . action . manage . MetadataAction . licenseProperties ) == null ) { java . util . Properties p = new java . util . Properties ( ) ; try { p . load ( org . gbif . ipt . action . manage . MetadataAction . class . getRe... | org . junit . Assert . assertEquals ( 6 , org . gbif . ipt . action . manage . MetadataAction . licenseProperties ( ) . size ( ) ) |
apply_returning_tsv ( ) { final com . groupon . lex . metrics . expression . LiteralGroupExpression expr = new com . groupon . lex . metrics . expression . LiteralGroupExpression ( resolver ) ; final com . groupon . lex . metrics . timeseries . TimeSeriesValueSet expect = new com . groupon . lex . metrics . timeseries ... | org . junit . Assert . assertEquals ( expect , expr . getTSDelta ( ctx ) ) |
testGetNoDataColor ( ) { "<AssertPlaceHolder>" ; } getNoDataColor ( ) { org . esa . s2tbx . dataio . deimos . dimap . Color color ; try { int red = ( ( int ) ( ( DeimosConstants . MAX_LEVEL ) * ( java . lang . Double . parseDouble ( getAttributeSiblingValue ( DeimosConstants . PATH_SPECIAL_VALUE_TEXT , DeimosConstants ... | org . junit . Assert . assertEquals ( Color . BLACK , metadata . getNoDataColor ( ) ) |
testReload ( ) { final com . orientechnologies . orient . core . db . document . ODatabaseDocumentTx databaseDocumentTx = new com . orientechnologies . orient . core . db . document . ODatabaseDocumentTx ( "memory:osimplekeyindexdefinitiontest" ) ; databaseDocumentTx . create ( ) ; final com . orientechnologies . orien... | org . junit . Assert . assertEquals ( loadedKeyIndexDefinition , simpleKeyIndexDefinition ) |
shouldNotHaveNextIfNoIteratorsAreAdded ( ) { final java . util . Iterator < java . lang . String > itty = new org . apache . tinkerpop . gremlin . util . iterator . MultiIterator ( ) ; "<AssertPlaceHolder>" ; } hasNext ( ) { if ( ! ( this . queue . isEmpty ( ) ) ) return true ; else if ( ! ( this . inputIterator . hasN... | org . junit . Assert . assertFalse ( itty . hasNext ( ) ) |
testCombine ( ) { org . apache . accumulo . core . client . summary . SummarizerConfiguration sc = org . apache . accumulo . core . client . summary . SummarizerConfiguration . builder ( org . apache . accumulo . core . client . summary . summarizers . EntryLengthSummarizer . class ) . build ( ) ; org . apache . accumu... | org . junit . Assert . assertEquals ( expected , stats1 ) |
testGetActionUrl_relativePath ( ) { java . lang . String contextPath = "/jenkins" ; java . lang . String itUrl = "iturl/" ; org . kohsuke . stapler . StaplerRequest req = hudson . FunctionsTest . createMockRequest ( contextPath ) ; java . lang . String [ ] paths = new java . lang . String [ ] { "foo/bar" , "./foo/bar" ... | org . junit . Assert . assertEquals ( ( ( ( contextPath + "/" ) + itUrl ) + path ) , result ) |
getDelayTillHourBeforeHourTest ( ) { final int minute = 10 ; final int currentHour = 16 ; final int toHour = 20 ; long now = org . threadly . concurrent . SchedulingUtilsTest . getNowToDay ( ) ; now += TimeUnit . HOURS . toMillis ( currentHour ) ; now += TimeUnit . MINUTES . toMillis ( minute ) ; long result = org . th... | org . junit . Assert . assertEquals ( TimeUnit . HOURS . toMillis ( ( toHour - currentHour ) ) , result ) |
shouldReturnTrueOnEvaluatingSpringExpressionGivenValidSpringExpression ( ) { org . flips . model . FeatureContext featureContext = mock ( org . flips . model . FeatureContext . class ) ; org . flips . model . FlipAnnotationAttributes flipAnnotationAttributes = mock ( org . flips . model . FlipAnnotationAttributes . cla... | org . junit . Assert . assertEquals ( true , result ) |
deveObterAmbienteComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . evento . cancelamento . NFInfoEventoCancelamento infoEventoCancelamento = new com . fincatto . documentofiscal . nfe400 . classes . evento . cancelamento . NFInfoEventoCancelamento ( ) ; final com . fincatto . documentofisc... | org . junit . Assert . assertEquals ( ambiente , infoEventoCancelamento . getAmbiente ( ) ) |
createDynamicModule ( ) { de . devsurf . injection . guice . scanner . StartupModule startup = de . devsurf . injection . guice . scanner . StartupModule . create ( de . devsurf . injection . guice . scanner . asm . ASMClasspathScanner . class , de . devsurf . injection . guice . scanner . PackageFilter . create ( de .... | org . junit . Assert . assertNotNull ( injector ) |
testResourceSizeStringNoneSet ( ) { ddf . catalog . data . impl . MetacardImpl metacard = new ddf . catalog . data . impl . MetacardImpl ( ) ; java . lang . String result = org . codice . ddf . spatial . kml . transformer . TestDescriptionTemplateHelper . helper . resourceSizeString ( metacard ) ; "<AssertPlaceHolder>"... | org . junit . Assert . assertNull ( result ) |
getArchivedFlowNodeInstance ( ) { logoutOnTenant ( ) ; loginOnDefaultTenantWith ( org . bonitasoft . engine . test . USERNAME , "bpm" ) ; final org . bonitasoft . engine . bpm . process . impl . ProcessDefinitionBuilder processDefinitionBuilder = new org . bonitasoft . engine . bpm . process . impl . ProcessDefinitionB... | org . junit . Assert . assertEquals ( archivedUserTask , getProcessAPI ( ) . getArchivedFlowNodeInstance ( archivedUserTask . getId ( ) ) ) |
run ( ) { final java . io . File tempWar = new java . io . File ( "target/AppDataSourceTest" ) ; tempWar . mkdirs ( ) ; new java . io . File ( tempWar , "WEB-INF" ) . mkdirs ( ) ; org . apache . openejb . loader . IO . writeString ( new java . io . File ( tempWar , ">\n" 0 ) , ( "<resources>\n" + ( ( ( "<Resource<sp>id... | org . junit . Assert . assertTrue ( records . isEmpty ( ) ) |
shouldCloseExhaustedCursors ( ) { org . neo4j . cursor . RawCursor < org . neo4j . index . internal . gbptree . Hit < org . neo4j . kernel . impl . index . labelscan . LabelScanKey , org . neo4j . kernel . impl . index . labelscan . LabelScanValue > , java . io . IOException > cursor = mock ( org . neo4j . cursor . Raw... | org . junit . Assert . assertTrue ( toRemoveFrom . isEmpty ( ) ) |
detectInvalidSchemaId ( ) { java . io . ByteArrayOutputStream out = new java . io . ByteArrayOutputStream ( ) ; out . write ( AvroSchemaHelper . MAGIC_BYTE ) ; com . streamsets . pipeline . lib . util . AvroSchemaHelper helper = new com . streamsets . pipeline . lib . util . AvroSchemaHelper ( getSettings ( null , Orig... | org . junit . Assert . assertEquals ( java . util . Optional . empty ( ) , schemaId ) |
testSetTaxReturnsOrder ( ) { com . eclipsesource . tabris . tracking . Order order = new com . eclipsesource . tabris . tracking . Order ( "foo" , java . math . BigDecimal . ONE ) ; com . eclipsesource . tabris . tracking . Order actualOrder = order . setTax ( java . math . BigDecimal . valueOf ( 3 ) ) ; "<AssertPlaceH... | org . junit . Assert . assertSame ( order , actualOrder ) |
getAllUsersClient ( ) { org . springframework . web . reactive . function . client . WebClient webClient = org . springframework . web . reactive . function . client . WebClient . create ( ( "http://localhost:" + ( port ) ) ) ; java . util . List < com . apress . webfluxdemo . User > users = webClient . get ( ) . uri (... | org . junit . Assert . assertNotNull ( users ) |
verifyGetMachinesNameDoesNotReturnExistingMachines ( ) { oracle . kubernetes . operator . wlsconfig . WlsMachineConfig machine1 = new oracle . kubernetes . operator . wlsconfig . WlsMachineConfig ( "domain1-machine1" , 5556 , "localhost" , "SSL" ) ; oracle . kubernetes . operator . wlsconfig . WlsMachineConfig machine2... | org . junit . Assert . assertEquals ( 0 , names . length ) |
should_get_empty_string ( ) { com . moandjiezana . toml . Toml toml = new com . moandjiezana . toml . Toml ( ) . read ( "a<sp>=<sp>\"\"" ) ; "<AssertPlaceHolder>" ; } getString ( java . lang . String ) { return ( ( java . lang . String ) ( get ( key ) ) ) ; } | org . junit . Assert . assertEquals ( "" , toml . getString ( "a" ) ) |
testPastDayOK ( ) { org . ff4j . core . Feature f = ff4j . getFeature ( "past1" ) ; org . ff4j . strategy . time . ReleaseDateFlipStrategy rds = ( ( org . ff4j . strategy . time . ReleaseDateFlipStrategy ) ( f . getFlippingStrategy ( ) ) ) ; "<AssertPlaceHolder>" ; } evaluate ( java . lang . String , org . ff4j . core ... | org . junit . Assert . assertTrue ( rds . evaluate ( "past1" , null , null ) ) |
g_RowMatrix ( ) { mikera . matrixx . impl . RowMatrix rm = new mikera . matrixx . impl . RowMatrix ( mikera . vectorz . Vector . of ( 1 , 2 , 3 , 4 , 7 ) ) ; "<AssertPlaceHolder>" ; doGenericTests ( rm ) ; doGenericTests ( new mikera . matrixx . impl . RowMatrix ( mikera . vectorz . Vector3 . of ( 1 , 2 , 3 ) ) ) ; } e... | org . junit . Assert . assertEquals ( 5 , rm . elementCount ( ) ) |
testRandomByteArrayTransfer1 ( ) { byte [ ] value = new byte [ io . netty . buffer . AbstractByteBufTest . BLOCK_SIZE ] ; for ( int i = 0 ; i < ( ( ( buffer . capacity ( ) ) - ( io . netty . buffer . AbstractByteBufTest . BLOCK_SIZE ) ) + 1 ) ; i += io . netty . buffer . AbstractByteBufTest . BLOCK_SIZE ) { random . ne... | org . junit . Assert . assertEquals ( expectedValue . getByte ( j ) , value [ j ] ) |
testGetNormalizedPolarizability ( ) { org . openscience . cdk . tools . AtomicProperties props = org . openscience . cdk . tools . AtomicProperties . getInstance ( ) ; double polar = props . getNormalizedPolarizability ( "C" ) ; "<AssertPlaceHolder>" ; } getNormalizedPolarizability ( java . lang . String ) { return ( t... | org . junit . Assert . assertTrue ( ( polar > 0 ) ) |
testClientID5 ( ) { org . skyscreamer . nevado . jms . facilities . Connection conn = createConnection ( getConnectionFactory ( ) ) ; "<AssertPlaceHolder>" ; conn . createSession ( false , Session . AUTO_ACKNOWLEDGE ) ; conn . setClientID ( org . skyscreamer . nevado . jms . facilities . ClientIDTest . TEST_CLIENT_ID )... | org . junit . Assert . assertNull ( conn . getClientID ( ) ) |
lotsOfInsertsTest ( ) { io . teknek . nibiru . Keyspace ks1 = io . teknek . nibiru . engine . AbstractMemtableTest . keyspaceWithNaturalPartitioner ( testFolder ) ; ks1 . createStore ( "abc" , new io . teknek . nibiru . transport . Response ( ) . withProperty ( StoreMetaData . IMPLEMENTING_CLASS , io . teknek . nibiru ... | org . junit . Assert . assertNotNull ( o ) |
onCreateShouldNotRegisterKeyListenerWhenUnknownUser ( ) { activityController . withIntent ( null ) ; activityController . create ( ) ; final android . widget . EditText privateChatInput = ( ( android . widget . EditText ) ( controller . findViewById ( R . id . privateChatInput ) ) ) ; privateChatInput . setText ( "Hell... | org . junit . Assert . assertEquals ( "Hello" , privateChatInput . getText ( ) . toString ( ) ) |
returnsTrueIfCpuDemandLow ( ) { com . microsoft . dhalion . conf . PolicyConfig policyConf = new com . microsoft . dhalion . conf . PolicyConfig ( "policy" , java . util . Collections . emptyMap ( ) ) ; com . microsoft . dhalion . detectors . ExcessCpuDetector detector = new com . microsoft . dhalion . detectors . Exce... | org . junit . Assert . assertTrue ( detector . evaluate ( "" , 10 , 5 ) ) |
testParseWKT ( ) { java . lang . String wkt = dq ( ( "GEOGCS['GCS_WGS_1984'," + ( ( ( "DATUM['WGS_1984',<sp>" + "SPHEROID['WGS_1984',6378137,298.257223563]]," ) + "PRIMEM['Greenwich',0]," ) + "UNIT['Degree',0.017453292519943295]]" ) ) ) ; org . osgeo . proj4j . CoordinateReferenceSystem crs1 = io . jeo . proj . Proj . ... | org . junit . Assert . assertTrue ( p1 . equals ( p2 ) ) |
testError ( ) { org . mockito . ArgumentCaptor < org . pentaho . di . core . logging . Log4jFileAppender > captor = org . mockito . ArgumentCaptor . forClass ( org . pentaho . di . core . logging . Log4jFileAppender . class ) ; logWriter = mock ( org . pentaho . di . core . logging . LogWriter . class ) ; doThrow ( new... | org . junit . Assert . assertNotNull ( writerAppenderManager . getFile ( ) ) |
disposeInvalid ( ) { list . remove ( 1 ) ; "<AssertPlaceHolder>" ; p1 . dispose ( ) ; exception . expect ( jetbrains . jetpad . model . property . IllegalStateException . class ) ; p1 . dispose ( ) ; } isValid ( ) { return ( getIndex ( ) . get ( ) ) != null ; } | org . junit . Assert . assertFalse ( p1 . isValid ( ) ) |
testCapitalizeWords11 ( ) { java . lang . Object s = "" ; java . lang . String expResult = "" ; java . lang . String result = org . thymeleaf . util . StringUtils . capitalizeWords ( s , "<sp>." ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( expResult , result ) |
test ( ) { cn . bc . spider . callable . TextCallable c = new cn . bc . spider . callable . TextCallable ( ) ; c . setMethod ( "get" ) ; c . setGroup ( "baidu" ) ; c . setUrl ( "http://www.baidu.com" ) ; c . setSuccessExpression ( "length()<sp>><sp>0" ) ; cn . bc . spider . Result < java . lang . String > result = cn .... | org . junit . Assert . assertTrue ( result . isSuccess ( ) ) |
insertLastNotEmpty ( ) { lijst . insertLast ( 2 ) ; "<AssertPlaceHolder>" ; } getLast ( ) { return last . data ; } | org . junit . Assert . assertEquals ( 2 , lijst . getLast ( ) ) |
testGetGroupFaultyHttpResponse ( ) { super . setResponseResource ( new org . springframework . core . io . ByteArrayResource ( "not-even-valid-json" . getBytes ( ) ) ) ; super . setStatus ( HttpServletResponse . SC_BAD_REQUEST ) ; nl . surfnet . coin . api . client . domain . Group20 group20 = groupService . getGroup20... | org . junit . Assert . assertNull ( group20 ) |
test1ValidateForCreate ( ) { org . apache . ranger . plugin . model . RangerPolicy rangerPolicy = rangerPolicy ( ) ; policyService . validateForCreate ( rangerPolicy ) ; "<AssertPlaceHolder>" ; } validateForCreate ( org . apache . ranger . plugin . model . RangerSecurityZone ) { } | org . junit . Assert . assertNotNull ( rangerPolicy ) |
parallel_001 ( ) { final java . lang . String rulebase = "rules/reloaded/parallel.prova" ; java . util . concurrent . atomic . AtomicInteger count = new java . util . concurrent . atomic . AtomicInteger ( ) ; java . util . Map < java . lang . String , java . lang . Object > globals = new java . util . HashMap < java . ... | org . junit . Assert . assertEquals ( 1 , count . get ( ) ) |
testSupportRegexp ( ) { try { org . talend . dq . dbms . DbmsLanguage dbms = getMysqlDbmsLanguage ( ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { org . junit . Assert . fail ( e . getMessage ( ) ) ; } } supportRegexp ( ) { org . talend . utils . ProductVersion dbVersion = getDbVersion ( ) ; if ( d... | org . junit . Assert . assertTrue ( dbms . supportRegexp ( ) ) |
placeItem ( ) { com . jadventure . game . navigation . Location cave = createLocation ( ) ; com . jadventure . game . items . Item bottle = new com . jadventure . game . items . Item ( "bottle" , "tool" , "bottle" , "old<sp>bottle" , 1 , null ) ; cave . addItem ( bottle ) ; com . jadventure . game . items . Item found ... | org . junit . Assert . assertEquals ( bottle . getId ( ) , found . getId ( ) ) |
executeRulesInCorrectOrder ( ) { org . junit . experimental . results . PrintableResult . testResult ( org . junit . tests . experimental . rules . RuleChainTest . UseRuleChain . class ) ; java . util . List < java . lang . String > expectedLog = java . util . Arrays . asList ( "starting<sp>outer<sp>rule" , "starting<s... | org . junit . Assert . assertEquals ( expectedLog , org . junit . tests . experimental . rules . RuleChainTest . LOG ) |
testEmptyNumTokens ( ) { refillStrategy . addTokens ( org . isomorphism . util . TokenBucketImplTest . CAPACITY ) ; bucket . consume ( org . isomorphism . util . TokenBucketImplTest . CAPACITY ) ; "<AssertPlaceHolder>" ; } getNumTokens ( ) { refill ( refillStrategy . refill ( ) ) ; return size ; } | org . junit . Assert . assertEquals ( 0 , bucket . getNumTokens ( ) ) |
peerTypeExtractionFromConfiguration ( ) { org . apache . accumulo . server . fs . VolumeManager fs = org . easymock . EasyMock . createMock ( org . apache . accumulo . server . fs . VolumeManager . class ) ; org . apache . accumulo . server . ServerContext context = org . easymock . EasyMock . createMock ( org . apache... | org . junit . Assert . assertEquals ( configuration , proc . getPeerType ( peerName ) ) |
fetchAllEventsOfSeveralUnexistingAlmanachs ( ) { java . util . Collection < com . stratelia . webactiv . almanach . model . EventDetail > allEvents = eventDAO . findAllEvents ( "almanach1" , "almanach2" , "almanach3" ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( this . size ( ) ) == 0 ; } | org . junit . Assert . assertThat ( allEvents . isEmpty ( ) , is ( true ) ) |
testOKFullRun ( ) { com . streamsets . datacollector . main . DataCollectorMain main = new com . streamsets . datacollector . main . TestMain . TMain ( ) ; org . mockito . Mockito . verifyZeroInteractions ( com . streamsets . datacollector . main . TestMain . runtime ) ; org . mockito . Mockito . verifyZeroInteractions... | org . junit . Assert . assertEquals ( 0 , main . doMain ( ) ) |
testJobStatusContainsOnlyOneFinished ( ) { java . util . concurrent . atomic . AtomicBoolean jobStarted = new java . util . concurrent . atomic . AtomicBoolean ( true ) ; int countOfCheckers = 100 ; java . util . HashMap < java . lang . Integer , java . util . concurrent . Future < java . lang . StringBuilder > > check... | org . junit . Assert . assertTrue ( checkOrderStatus ( checker . get ( ) . toString ( ) ) ) |
testToGradleArtifactFileName_withClassifier ( ) { java . lang . String group = "org.wildfly.swarm" ; java . lang . String packaging = "jar" ; java . lang . String artifact = "test" ; java . lang . String version = "1.0" ; java . lang . String classifier = "sources" ; org . jboss . modules . maven . ArtifactCoordinates ... | org . junit . Assert . assertEquals ( ( ( ( ( ( ( artifact + "-" ) + version ) + "-" ) + classifier ) + "." ) + packaging ) , artifactFileName ) |
isIdentifierInUseByAnotherPatient_shouldReturnFalseWhenPatientIdentifierDoesNotContainAPatientAndNoPatientHasThisId ( ) { org . openmrs . PatientIdentifierType pit = org . openmrs . api . PatientServiceTest . patientService . getPatientIdentifierType ( 1 ) ; org . openmrs . PatientIdentifier patientIdentifier = new org... | org . junit . Assert . assertFalse ( org . openmrs . api . PatientServiceTest . patientService . isIdentifierInUseByAnotherPatient ( patientIdentifier ) ) |
testAnonymousAccess ( ) { java . io . File temp = java . io . File . createTempFile ( "temp" , java . lang . Long . toString ( java . lang . System . nanoTime ( ) ) ) ; temp . mkdirs ( ) ; io . findify . s3mock . S3Mock mockS3 = new io . findify . s3mock . S3Mock . Builder ( ) . withPort ( 8001 ) . withFileBackend ( te... | org . junit . Assert . assertEquals ( 1 , s . count ( ) ) |
testStateStoreLazyEval ( ) { final org . apache . kafka . streams . StreamsBuilder builder = new org . apache . kafka . streams . StreamsBuilder ( ) ; final java . lang . String topic1 = "topic1" ; final java . lang . String topic2 = "topic2" ; final org . apache . kafka . streams . kstream . internals . KTableImpl < j... | org . junit . Assert . assertEquals ( 0 , driver . getAllStateStores ( ) . size ( ) ) |
testInputRepartitionColumnsAndPartitionCount ( ) { java . util . Map < java . lang . String , java . lang . Object > configMap = com . google . common . collect . Maps . newHashMap ( ) ; configMap . put ( BatchStep . REPARTITION_COLUMNS_PROPERTY , com . google . common . collect . Lists . newArrayList ( "modulo" ) ) ; ... | org . junit . Assert . assertEquals ( 5 , numPartitions ) |
givenUserService_whenSearchForUserByEmailEndsWith_thenFound ( ) { expect ( userService . findByEmail ( endsWith ( ".com" ) ) ) . andReturn ( java . util . Collections . emptyList ( ) ) ; replay ( userService ) ; java . util . List < com . baeldung . easymock . User > result = userService . findByEmail ( "test@example.c... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
testDeserializationException ( ) { java . lang . String json = "{\"k1\":[\"v1\",\"v2\"],\"k3\":\"v3\",\"k4\":500,000}" ; boolean ex = false ; try { org . apache . tika . metadata . Metadata deserialized = org . apache . tika . metadata . serialization . JsonMetadata . fromJson ( new java . io . StringReader ( json ) ) ... | org . junit . Assert . assertTrue ( ex ) |
testRunBackup ( ) { final java . util . Collection < java . lang . Throwable > problems = new java . util . ArrayList ( ) ; when ( mockService . backupRepository ( any ( org . fcrepo . kernel . api . FedoraSession . class ) , any ( java . io . File . class ) ) ) . thenReturn ( problems ) ; final java . lang . String ba... | org . junit . Assert . assertNotNull ( backupPath ) |
whenLoggerEmitsLoggingEvent_thenAppenderReceivesEvent ( ) { logger . info ( "Test<sp>from<sp>{}" , this . getClass ( ) . getSimpleName ( ) ) ; org . apache . logging . log4j . core . LoggerContext context = org . apache . logging . log4j . core . LoggerContext . getContext ( false ) ; org . apache . logging . log4j . c... | org . junit . Assert . assertEquals ( appender . getEventMap ( ) . size ( ) , 1 ) |
testGetServerContext ( ) { javax . net . ssl . SSLContext context = sslContextFactory . getServerContext ( ) ; "<AssertPlaceHolder>" ; } getServerContext ( ) { java . lang . String algorithm = java . security . Security . getProperty ( "ssl.KeyManagerFactory.algorithm" ) ; if ( algorithm == null ) { algorithm = "SunX50... | org . junit . Assert . assertNotNull ( context ) |
testPeriodBarriersCrossedWhenLeavingDaylightSaving ( ) { ch . qos . logback . core . rolling . helper . RollingCalendar rc = new ch . qos . logback . core . rolling . helper . RollingCalendar ( dailyPattern , java . util . TimeZone . getTimeZone ( "CET" ) , java . util . Locale . US ) ; long start = 1509228123333L ; lo... | org . junit . Assert . assertEquals ( 1 , rc . periodBarriersCrossed ( start , end ) ) |
retrieveTopicName ( ) { cern . c2mon . client . core . tag . TagController tagController = new cern . c2mon . client . core . tag . TagController ( 1234L ) ; tagController . onUpdate ( createValidTransferTag ( 1234L ) ) ; tagController . getTagImpl ( ) . setTopicName ( "test" ) ; "<AssertPlaceHolder>" ; } getTopicName ... | org . junit . Assert . assertTrue ( tagController . getTagImpl ( ) . getTopicName ( ) . equals ( "test" ) ) |
testBuildWithEmptyContext ( ) { java . util . List < java . lang . Long > context = java . util . Collections . emptyList ( ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>UserGroupView<sp>e<sp>WHERE<sp>e.status=:status<sp>AND<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>" ; org . lnu . is . pagination ... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
testNullTaskObject ( ) { java . util . List l = interceptor . getHandlers ( null ) ; "<AssertPlaceHolder>" ; } getHandlers ( java . lang . Object ) { if ( o == null ) return org . cytoscape . work . Collections . emptyList ( ) ; return loadTunables ( o , 0.0 ) ; } | org . junit . Assert . assertTrue ( l . isEmpty ( ) ) |
reportIdsStartWithRepositoryIdTest ( ) { java . util . List < org . opennms . features . reporting . model . basicreport . BasicReportDefinition > reports = m_defaultRemoteRepository . getReports ( ) ; logger . debug ( "reportIdsStartWithRepositoryIdTest" ) ; for ( org . opennms . features . reporting . model . basicre... | org . junit . Assert . assertTrue ( report . getId ( ) . startsWith ( m_defaultRemoteRepository . getRepositoryId ( ) ) ) |
testReSeed ( ) { empiricalDistribution . load ( url ) ; empiricalDistribution . reSeed ( 100 ) ; final double [ ] values = new double [ 10 ] ; for ( int i = 0 ; i < 10 ; i ++ ) { values [ i ] = empiricalDistribution . getNextValue ( ) ; } empiricalDistribution . reSeed ( 100 ) ; for ( int i = 0 ; i < 10 ; i ++ ) { "<As... | org . junit . Assert . assertEquals ( values [ i ] , empiricalDistribution . getNextValue ( ) , 0.0 ) |
shouldOnlyBindCookieWhenNoBindingAlreadyMade ( ) { com . threewks . thundr . introspection . ParameterDescription varParam = new com . threewks . thundr . introspection . ParameterDescription ( "var" , java . lang . String . class ) ; bindings . put ( varParam , "original" ) ; req . withCookie ( "var" , "overridden" ) ... | org . junit . Assert . assertThat ( bindings . get ( varParam ) , is ( ( ( java . lang . Object ) ( "original" ) ) ) ) |
testGetModifiedDate ( ) { net . holmes . core . business . media . model . AbstractNodeTest . AbstractNodeTester node = buildAbstractNodeTester ( "" ) ; "<AssertPlaceHolder>" ; } getModifiedDate ( ) { return modifiedDate ; } | org . junit . Assert . assertNull ( node . getModifiedDate ( ) ) |
testToStringOther ( ) { org . eclipse . kura . core . net . NetworkConfiguration config = new org . eclipse . kura . core . net . NetworkConfiguration ( ) ; org . eclipse . kura . core . net . EthernetInterfaceConfigImpl interfaceConfig = new org . eclipse . kura . core . net . EthernetInterfaceConfigImpl ( "if1" ) ; j... | org . junit . Assert . assertEquals ( expected , config . toString ( ) ) |
testBigDecimal ( ) { final java . lang . String drl = ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "end" 0 + ( "\n" + "end" 3 ) ) + ( org . drools . testcoverage . common . model . Cheese . class . getCanonicalName ( ) ) ) + "end" 1 ) + "end" 3 ) + ( org . drools . testcoverage . common . model . Primitives . class . getCanonical... | org . junit . Assert . assertEquals ( 1 , ( ( java . util . List ) ( session . getGlobal ( "end" 5 ) ) ) . size ( ) ) |
testCountingBloomFilter2 ( ) { final int countingSize = 20 ; final int items = 100 ; final int error = 8 ; int [ ] counting = new int [ countingSize ] ; net . tomp2p . rpc . CountingBloomFilter < java . lang . String > cbs = new net . tomp2p . rpc . CountingBloomFilter < java . lang . String > ( bfSizeLarge , counting ... | org . junit . Assert . assertEquals ( ( items + error ) , cbs . approximateCount ( "abc" ) ) |
scryptViaLambdaWorksTest ( ) { java . lang . String encodedValue = com . jedivision . Hash . scryptViaLambdaWorks ( com . jedivision . HashTest . GLOBAL_VALUE ) ; boolean matched = com . lambdaworks . crypto . SCryptUtil . check ( com . jedivision . HashTest . GLOBAL_VALUE , encodedValue ) ; "<AssertPlaceHolder>" ; } s... | org . junit . Assert . assertTrue ( matched ) |
testConstructorWithBeginningOfQuery ( ) { io . quantumdb . core . utils . QueryBuilder builder = new io . quantumdb . core . utils . QueryBuilder ( "SELECT" ) ; "<AssertPlaceHolder>" ; } toString ( ) { return io . quantumdb . core . schema . definitions . PrettyPrinter . prettyPrint ( this ) ; } | org . junit . Assert . assertEquals ( "SELECT" , builder . toString ( ) ) |
i02a ( ) { boolean r = proxy . httpStatusReturnBool200 ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( true , r ) |
testWithOneFileWithWrongOrder ( ) { uk . gov . nationalarchives . droid . core . interfaces . archive . AsynchDroid droid = mock ( uk . gov . nationalarchives . droid . core . interfaces . archive . AsynchDroid . class ) ; uk . gov . nationalarchives . droid . core . interfaces . archive . IdentificationRequestFactory ... | org . junit . Assert . assertTrue ( true ) |
testLoadWithNullBundleContext ( ) { com . codeaffine . osgi . testuite . internal . DevPropertiesLoader loader = new com . codeaffine . osgi . testuite . internal . DevPropertiesLoader ( null ) ; java . util . Properties properties = loader . load ( ) ; "<AssertPlaceHolder>" ; } load ( ) { if ( ( bundleContext ) != nul... | org . junit . Assert . assertEquals ( 0 , properties . size ( ) ) |
testRewriteCorrelatedSubqueryInHaving ( ) { java . lang . String sql = "select<sp>pm1.g1.e1<sp>from<sp>pm1.g1<sp>group<sp>by<sp>pm1.g1.e1<sp>having<sp>pm1.g1.e1<sp>in<sp>(select<sp>pm1.g1.e1<sp>from<sp>pm1.g2)" ; java . lang . String expected = "SELECT<sp>pm1.g1.e1<sp>FROM<sp>pm1.g1<sp>GROUP<sp>BY<sp>pm1.g1.e1<sp>HAVIN... | org . junit . Assert . assertEquals ( 1 , refs . size ( ) ) |
aBaseCalendarMustBeActive ( ) { org . libreplan . business . calendars . entities . BaseCalendar calendar = org . libreplan . business . test . calendars . entities . BaseCalendarTest . createBasicCalendar ( ) ; "<AssertPlaceHolder>" ; } isActive ( org . joda . time . LocalDate ) { return ( ( startDate . compareTo ( da... | org . junit . Assert . assertTrue ( calendar . isActive ( new org . joda . time . LocalDate ( ) ) ) |
testAddLog ( ) { service . log ( "JUNIT<sp>TEST<sp>ADD<sp>LOG" ) ; "<AssertPlaceHolder>" ; } logEntries ( ) { return logEntryConverter . convert ( dao . findAll ( ) ) ; } | org . junit . Assert . assertEquals ( "JUNIT<sp>TEST<sp>ADD<sp>LOG" , service . logEntries ( ) . get ( 0 ) . getMessage ( ) ) |
testGivenMOKBuyWith2LOSellWhenMOKQuantityIsBigger ( ) { vn . com . vndirect . exchangesimulator . model . NewOrderSingle order = vn . com . vndirect . exchangesimulator . matching . OrderFactory . createLOSell ( "VND" , 1000 , 13000 ) ; sm . push ( order ) ; vn . com . vndirect . exchangesimulator . model . NewOrderSin... | org . junit . Assert . assertEquals ( 1 , reports . size ( ) ) |
testGoodDesc ( ) { org . apache . kylin . cube . model . validation . rule . DictionaryRule rule = new org . apache . kylin . cube . model . validation . rule . DictionaryRule ( ) ; for ( java . io . File f : new java . io . File ( ( ( org . apache . kylin . common . util . LocalFileMetadataTestCase . LOCALMETA_TEST_DA... | org . junit . Assert . assertTrue ( ( ( vContext . getResults ( ) . length ) == 0 ) ) |
marshall_BrokerRevenueShareResult ( ) { org . oscm . billingservice . business . model . brokershare . BrokerRevenueShareResult brokerRevenueShareResult = createBrokerRevenueShareResult ( ) ; byte [ ] serialized = sharesCalculator . marshallRevenueShareResults ( brokerRevenueShareResult ) ; "<AssertPlaceHolder>" ; } ma... | org . junit . Assert . assertNotNull ( serialized ) |
testCopyFieldsValues ( ) { org . apache . avro . Schema intSchema = org . apache . avro . SchemaBuilder . record ( "intSchema" ) . fields ( ) . name ( "a" ) . type ( ) . intType ( ) . noDefault ( ) . endRecord ( ) ; org . apache . avro . generic . GenericRecord intRecord = new org . apache . avro . generic . GenericRec... | org . junit . Assert . assertEquals ( intRecord . get ( "a" ) , stringRecord . get ( "a" ) ) |
SimpleExecute ( ) { java . lang . String driver = "org.h2.Driver" ; java . lang . Class . forName ( driver ) . newInstance ( ) ; java . lang . String url = "jdbc:h2:~/jell" ; java . lang . String username = "sa" ; java . lang . String password = "" ; java . sql . Connection conn = java . sql . DriverManager . getConnec... | org . junit . Assert . assertEquals ( 1 , count ) |
testIntersectVersionRange_Invalid1 ( ) { org . apache . aries . util . VersionRange v1 = new org . apache . aries . util . VersionRange ( "[1.0.0,2.0.0]" ) ; org . apache . aries . util . VersionRange v2 = new org . apache . aries . util . VersionRange ( "(2.0.0,3.0.0]" ) ; org . apache . aries . util . VersionRange re... | org . junit . Assert . assertNull ( result ) |
testBasicKeyboardInput ( ) { driver . get ( pages . javascriptPage ) ; org . openqa . selenium . qtwebkit . WebElement keyReporter = driver . findElement ( org . openqa . selenium . qtwebkit . By . id ( "keyReporter" ) ) ; org . openqa . selenium . interactions . Action sendLowercase = getBuilder ( driver ) . sendKeys ... | org . junit . Assert . assertThat ( keyReporter . getAttribute ( "value" ) , org . hamcrest . Matchers . is ( "abc<sp>def" ) ) |
testAddChildAfter_withNullNewChild ( ) { final com . valkryst . VTerminal . TileGrid gridA = new com . valkryst . VTerminal . TileGrid ( new java . awt . Dimension ( 1 , 1 ) ) ; parentGrid . addChild ( gridA ) ; parentGrid . addChildAfter ( null , gridA ) ; "<AssertPlaceHolder>" ; } containsChild ( com . valkryst . VTe... | org . junit . Assert . assertTrue ( parentGrid . containsChild ( gridA ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.