input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testCreateWithEmptyMessage ( ) { java . io . IOException ex = org . apache . qpid . jms . util . IOExceptionSupport . create ( new java . lang . RuntimeException ( "" ) ) ; "<AssertPlaceHolder>" ; } getMessage ( ) { return message ; } | org . junit . Assert . assertNotNull ( ex . getMessage ( ) ) |
testLeeg ( ) { final nl . bzk . brp . util . hisvolledig . kern . PersoonHisVolledigImplBuilder builder = new nl . bzk . brp . util . hisvolledig . kern . PersoonHisVolledigImplBuilder ( nl . bzk . brp . model . algemeen . stamgegeven . kern . SoortPersoon . INGESCHREVENE ) ; final nl . bzk . brp . model . hisvolledig ... | org . junit . Assert . assertNull ( brpVerblijfstitel ) |
WHEN_a_null_value_is_set_in_the_table_for_batch_size_AND_the_WorkflowModel_is_asked_for_simulator_configuration_THEN_there_is_no_corresponding_IterationParameter ( ) { int firstBatchSizeValue = 5 ; com . bigvisible . kanbansimulator . app . WorkflowModel workflowModel = new com . bigvisible . kanbansimulator . app . Wo... | org . junit . Assert . assertThat ( numberOfIterationParameters , is ( 0 ) ) |
validate_shouldRejectXmlWhenBothObsConceptIdAndConceptIdsIsMissing ( ) { java . lang . String xml = "<htmlform><obs<sp>conceptId=\"xx\"<sp>conceptIds=\"xx,yy\">TEST</obs></htmlform>" ; org . openmrs . module . htmlformentry . handler . TagAnalysis analysis = validateObsTag ( xml ) ; "<AssertPlaceHolder>" ; } getErrors ... | org . junit . Assert . assertEquals ( 1 , analysis . getErrors ( ) . size ( ) ) |
testDisableLookupSync ( ) { org . apache . druid . query . lookup . LookupConfig lookupConfig = new org . apache . druid . query . lookup . LookupConfig ( null ) { @ org . apache . druid . query . lookup . Override public boolean getEnableLookupSyncOnStartup ( ) { return false ; } } ; org . apache . druid . query . loo... | org . junit . Assert . assertNull ( lookupReferencesManager . get ( "testMockForDisableLookupSync" ) ) |
testEqualsNoQuotes ( ) { final org . apache . commons . csv . CSVFormat left = org . apache . commons . csv . CSVFormat . newFormat ( ',' ) . withQuote ( null ) ; final org . apache . commons . csv . CSVFormat right = left . withQuote ( null ) ; "<AssertPlaceHolder>" ; } withQuote ( java . lang . Character ) { if ( org... | org . junit . Assert . assertEquals ( left , right ) |
testCreateConnectionCallSystemAdmin ( ) { org . apache . qpid . jms . JmsConnectionFactory factory = new org . apache . qpid . jms . JmsConnectionFactory ( getBrokerAmqpConnectionURI ( ) ) ; connection = factory . createConnection ( "system" , "manager" ) ; "<AssertPlaceHolder>" ; connection . start ( ) ; connection . ... | org . junit . Assert . assertNotNull ( connection ) |
simpleCollectionETagTest ( ) { com . sun . jersey . api . client . ClientResponse response = getCollectionResponse ( ) ; java . lang . String etag = getETag ( response ) ; response = getCollectionResponse ( ) ; java . lang . String otherEtag = getETag ( response ) ; "<AssertPlaceHolder>" ; } getETag ( java . io . File ... | org . junit . Assert . assertEquals ( etag , otherEtag ) |
testUpdate ( ) { org . hisp . dhis . programrule . ProgramRuleVariable variableH = new org . hisp . dhis . programrule . ProgramRuleVariable ( "RuleVariableH" , programA , ProgramRuleVariableSourceType . DATAELEMENT_NEWEST_EVENT_PROGRAM_STAGE , null , dataElementA , false , null ) ; long idH = variableService . addProg... | org . junit . Assert . assertEquals ( variableH , variableService . getProgramRuleVariable ( idH ) ) |
testAnyScriptReturnedNothing ( ) { com . eclipsesource . v8 . V8Value result = ( ( com . eclipsesource . v8 . V8Value ) ( v8 . executeScript ( "" ) ) ) ; "<AssertPlaceHolder>" ; } isUndefined ( ) { return v8Object . executeBooleanFunction ( com . eclipsesource . v8 . debug . mirror . Mirror . IS_UNDEFINED , null ) ; } | org . junit . Assert . assertTrue ( result . isUndefined ( ) ) |
testCanGetFirehoseItemsIncludingPrivateAsAdminUser ( ) { dbTester . loadData ( "node_1" ) ; dbTester . loadData ( "node_2" ) ; store . setNodeConfValue ( org . buddycloud . channelserver . db . jdbc . TEST_SERVER1_NODE1_ID , AccessModel . FIELD_NAME , AccessModels . open . toString ( ) ) ; store . setNodeConfValue ( or... | org . junit . Assert . assertEquals ( 7 , count ) |
exceptionsDoNotBlockAllListeners ( ) { wallet . addEventListener ( new com . google . bitcoin . core . AbstractWalletEventListener ( ) { @ com . google . bitcoin . core . Override public void onCoinsReceived ( com . google . bitcoin . core . Wallet wallet , com . google . bitcoin . core . Transaction tx , java . math .... | org . junit . Assert . assertEquals ( 1 , flag . get ( ) ) |
testMultiTouch ( ) { com . vividsolutions . jts . geom . LineString ls = ( ( com . vividsolutions . jts . geom . LineString ) ( wkt . read ( "LINESTRING(-5<sp>0,<sp>0<sp>1,<sp>-5<sp>2,<sp>0<sp>3,<sp>-5<sp>4,<sp>0<sp>5)" ) ) ) ; com . vividsolutions . jts . geom . Geometry clipped = clipper . clip ( ls , false ) ; "<Ass... | org . junit . Assert . assertNull ( clipped ) |
eachKeyWithString ( ) { java . lang . String result = compile ( "{{#each<sp>this}}{{@key}}<sp>{{/each}}" ) . apply ( "String" ) ; java . lang . String expected1 = "empty<sp>bytes<sp>" ; java . lang . String expected2 = "bytes<sp>empty<sp>" ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( obj instanceo... | org . junit . Assert . assertTrue ( ( ( result . equals ( expected1 ) ) || ( result . equals ( expected2 ) ) ) ) |
testRemove ( ) { com . liferay . blogs . model . BlogsStatsUser newBlogsStatsUser = addBlogsStatsUser ( ) ; _persistence . remove ( newBlogsStatsUser ) ; com . liferay . blogs . model . BlogsStatsUser existingBlogsStatsUser = _persistence . fetchByPrimaryKey ( newBlogsStatsUser . getPrimaryKey ( ) ) ; "<AssertPlaceHold... | org . junit . Assert . assertNull ( existingBlogsStatsUser ) |
testEmptyCommand ( ) { java . lang . String [ ] command = new org . dcache . pool . repository . v5 . CheckHealthTask . Scanner ( "" ) . scan ( ) ; "<AssertPlaceHolder>" ; } scan ( ) { java . util . List < java . lang . String > arguments = new java . util . ArrayList ( ) ; scanWhitespace ( ) ; while ( ! ( isEof ( ) ) ... | org . junit . Assert . assertEquals ( 0 , command . length ) |
testPatternSpecial02 ( ) { final java . util . regex . Pattern pattern = java . util . regex . Pattern . compile ( "" ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertFalse ( pattern . matcher ( "/" ) . matches ( ) ) |
testPlainConstructor ( ) { java . util . Iterator < org . cleartk . ml . util . featurevector . FeatureVector . Entry > it = fv1 . iterator ( ) ; "<AssertPlaceHolder>" ; } hasNext ( ) { if ( ( line ) == null ) { line = input . readLine ( ) ; if ( ( line ) != null ) { for ( java . lang . String commentSpecifier : commen... | org . junit . Assert . assertFalse ( it . hasNext ( ) ) |
removeModel ( ) { org . graphwalker . multipleModels . ModelHandler modelhandler = new org . graphwalker . multipleModels . ModelHandler ( ) ; modelhandler . add ( "A" , new org . graphwalker . multipleModels . ModelAPI ( "graphml/multiple/switch/A.graphml" , true , new org . graphwalker . generators . RandomPathGenera... | org . junit . Assert . assertTrue ( modelhandler . getModels ( ) . isEmpty ( ) ) |
testUserBuilder ( ) { java . util . Map < java . lang . String , java . lang . Object > map = new com . google . firebase . auth . UserRecord . CreateRequest ( ) . getProperties ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( start ) >= ( end ) ; } | org . junit . Assert . assertTrue ( map . isEmpty ( ) ) |
testClose ( ) { java . sql . Connection conn = createMock ( java . sql . Connection . class ) ; conn . setAutoCommit ( true ) ; conn . close ( ) ; java . sql . Driver driver = createMock ( java . sql . Driver . class ) ; java . lang . String url = "jdbc:bar:baz" ; expect ( driver . acceptsURL ( url ) ) . andReturn ( tr... | org . junit . Assert . assertNotNull ( sds . getReadOnlyConnection ( null ) ) |
testReadShortString ( ) { final java . lang . String s = "" ; final int len = s . getBytes ( "UTF-8" ) . length ; final java . nio . ByteBuffer buffer = java . nio . ByteBuffer . allocate ( ( 2 + len ) ) ; buffer . putShort ( ( ( short ) ( len ) ) ) ; buffer . put ( s . getBytes ( "UTF-8" ) ) ; buffer . rewind ( ) ; "<... | org . junit . Assert . assertEquals ( s , io . jafka . utils . Utils . readShortString ( buffer ) ) |
testDiscardingCheckpointsAtShutDown ( ) { final org . apache . flink . runtime . state . SharedStateRegistry sharedStateRegistry = new org . apache . flink . runtime . state . SharedStateRegistry ( ) ; final org . apache . flink . configuration . Configuration configuration = new org . apache . flink . configuration . ... | org . junit . Assert . assertThat ( checkpointStore . getAllCheckpoints ( ) , org . hamcrest . Matchers . contains ( checkpoint1 ) ) |
testFinalLeftIteration ( ) { com . twitter . graphjet . algorithms . salsa . SalsaIterations < com . twitter . graphjet . bipartite . api . BipartiteGraph > salsaIterations = new com . twitter . graphjet . algorithms . salsa . SalsaIterations < com . twitter . graphjet . bipartite . api . BipartiteGraph > ( salsaIntern... | org . junit . Assert . assertEquals ( expectedVisitedRightNodesMap , salsaInternalState . getVisitedRightNodes ( ) ) |
testDefaultValueForStringIdIsSet ( ) { all_types . A a = new all_types . A ( ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; } | org . junit . Assert . assertEquals ( "" , a . getId ( ) ) |
testAnalyze ( ) { if ( ! ( org . opencastproject . analysis . text . TesseractTextExtractorTest . tesseractInstalled ) ) return ; org . opencastproject . textextractor . api . TextFrame frame = analyzer . extract ( testFile ) ; "<AssertPlaceHolder>" ; } hasText ( ) { return ( lines . size ( ) ) > 0 ; } | org . junit . Assert . assertTrue ( frame . hasText ( ) ) |
testReplaceNewLines_unixLineBreaks ( ) { java . lang . String stringToReplace = "First<sp>line.\nSecond<sp>line.\nThird<sp>line." ; java . lang . String expected = "First<sp>line.\\nSecond<sp>line.\\nThird<sp>line." ; java . lang . String result = org . eclipse . rap . rwt . internal . util . EncodingUtil . replaceNewL... | org . junit . Assert . assertEquals ( expected , result ) |
voidPerson_shouldVoidPatient ( ) { org . openmrs . Person person = personService . getPerson ( 2 ) ; personService . voidPerson ( person , "reason" ) ; "<AssertPlaceHolder>" ; } getVoided ( ) { return voided ; } | org . junit . Assert . assertTrue ( person . getVoided ( ) ) |
findsRepositoryForClosedProject ( ) { org . eclipse . core . resources . IFile a = testUtils . addFileToProject ( project . getProject ( ) , "folder1/a.txt" , "a" ) ; project . getProject ( ) . close ( null ) ; "<AssertPlaceHolder>" ; } getRepository ( org . eclipse . core . commands . ExecutionEvent ) { java . lang . ... | org . junit . Assert . assertEquals ( repository , cache . getRepository ( a ) ) |
testCollection1 ( ) { testcase . function . Set < java . lang . Boolean > testData = new testcase . function . HashSet < java . lang . Boolean > ( ) ; testData . add ( true ) ; testData . add ( null ) ; testData . add ( false ) ; testcase . function . Set < java . lang . Boolean > set = executeBackAndForth ( testData ,... | org . junit . Assert . assertEquals ( b1 , b2 ) |
testDeleteBoundaryLink ( ) { "<AssertPlaceHolder>" ; verify ( netIf ) . delLink ( "Id_link01" ) ; } | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( true ) ) |
copyCopiesPrimaryGroupName ( ) { state . generate ( environment , player , org . communitybridge . synchronization . PlayerStateTest . USER_ID ) ; org . communitybridge . synchronization . PlayerState copy = state . copy ( ) ; "<AssertPlaceHolder>" ; } getPermissionsSystemPrimaryGroupName ( ) { return permissionsSystem... | org . junit . Assert . assertEquals ( state . getPermissionsSystemPrimaryGroupName ( ) , copy . getPermissionsSystemPrimaryGroupName ( ) ) |
replaceElement2Test ( ) { java . lang . String content = "<a/>" ; org . apache . cxf . ws . transfer . manager . ResourceManager resourceManager = new org . apache . cxf . ws . transfer . manager . MemoryResourceManager ( ) ; org . apache . cxf . ws . addressing . ReferenceParametersType refParams = resourceManager . c... | org . junit . Assert . assertEquals ( "b" , rootEl . getNodeName ( ) ) |
testNamedQuery_FindForTechnicalServices ( ) { runTX ( new java . util . concurrent . Callable < java . lang . Void > ( ) { @ org . oscm . domobjects . Override public org . oscm . domobjects . Void call ( ) throws org . oscm . domobjects . Exception { org . oscm . domobjects . MarketingPermission permission = new org .... | org . junit . Assert . assertEquals ( 3 , result . size ( ) ) |
testChangeGhostControllerAfterUI ( ) { org . junit . Assume . assumeTrue ( org . jpacman . framework . ui . MainUI . class . desiredAssertionStatus ( ) ) ; mainUI . initialize ( ) ; mainUI . withGhostController ( new org . jpacman . framework . controller . RandomGhostMover ( mainUI . getGame ( ) ) ) ; mainUI . createU... | org . junit . Assert . assertTrue ( gotException ) |
testFloatObj ( ) { java . lang . Class < com . j256 . ormlite . field . types . FloatObjectTypeTest . LocalFloatObj > clazz = com . j256 . ormlite . field . types . FloatObjectTypeTest . LocalFloatObj . class ; com . j256 . ormlite . dao . Dao < com . j256 . ormlite . field . types . FloatObjectTypeTest . LocalFloatObj... | org . junit . Assert . assertEquals ( 1 , dao . create ( foo ) ) |
testDeleteProcessInstanceSkipCustomListenersEnsureHistoryWritten ( ) { org . camunda . bpm . engine . runtime . ProcessInstance processInstance = runtimeService . startProcessInstanceByKey ( "oneTaskProcess" ) ; runtimeService . deleteProcessInstance ( processInstance . getId ( ) , null , true ) ; if ( ! ( ProcessEngin... | org . junit . Assert . assertNotNull ( hai . getEndTime ( ) ) |
testSpringCronExpressions ( ) { com . cronutils . parser . CronParser parser = new com . cronutils . parser . CronParser ( com . cronutils . model . definition . CronDefinitionBuilder . instanceDefinitionFor ( CronType . SPRING ) ) ; try { com . cronutils . model . Cron parsed = parser . parse ( expression ) ; "<Assert... | org . junit . Assert . assertNotNull ( parsed ) |
testGetAllSubsectionsGlobal ( ) { config . putGlobal ( "section1.subsection1.int" , 1 ) ; config . putGlobal ( "section1.subsection2.string" , "2" ) ; config . putGlobal ( "4" 0 , 1 ) ; config . putGlobal ( "section1.subsection2.subsub2.string" , "2" ) ; config . putGlobal ( "section2.subsection3.int" , 3 ) ; config . ... | org . junit . Assert . assertEquals ( expected , new java . util . HashSet < java . lang . String > ( allSubsections ) ) |
testMoveToRightIsAllowedWithoutLock ( ) { com . eclipsesource . tabris . internal . SwipeManager manager = new com . eclipsesource . tabris . internal . SwipeManager ( mock ( com . eclipsesource . tabris . widgets . swipe . SwipeItemProvider . class ) ) ; boolean allowed = manager . isMoveAllowed ( 0 , 1 ) ; "<AssertPl... | org . junit . Assert . assertTrue ( allowed ) |
testHiddenRow ( ) { sheet = spreadsheet . getBook ( ) . getSheet ( "row" ) ; "<AssertPlaceHolder>" ; } isRowHidden ( int ) { return getNative ( ) . getRow ( row ) . isHidden ( ) ; } | org . junit . Assert . assertEquals ( true , sheet . isRowHidden ( 5 ) ) |
testCopyReaderToWriter ( ) { java . lang . String data = "Strawberry<sp>Fields<sp>Forever" ; java . io . Reader in = new org . kocakosm . pitaya . io . StringReader ( data ) ; java . io . Writer out = new java . io . StringWriter ( ) ; org . kocakosm . pitaya . io . CharStreams . copy ( in , out ) ; "<AssertPlaceHolder... | org . junit . Assert . assertEquals ( data , out . toString ( ) ) |
root ( ) { java . io . File rootFile = new java . io . File ( fr . opensagres . xdocreport . document . tools . remoting . resources . services . client . jaxrs . MainTest . tempFolder , "root.xml" ) ; java . lang . String [ ] args = new java . lang . String [ ] { "-baseAddress" , fr . opensagres . xdocreport . documen... | org . junit . Assert . assertTrue ( rootFile . exists ( ) ) |
testVersionInvalid ( ) { tested . getDiagramSet ( ) . setVersion ( new org . kie . workbench . common . stunner . cm . definition . property . diagram . Version ( org . kie . workbench . common . stunner . cm . definition . CaseManagementDiagramTest . VERSION_INVALID ) ) ; java . util . Set < javax . validation . Const... | org . junit . Assert . assertEquals ( 1 , violations . size ( ) ) |
testIsRegularOrExecutableFileWhenRegularFileExists_shouldReturnTrue ( ) { writeToCache ( "/test_file.txt" ) ; "<AssertPlaceHolder>" ; } isRegularOrExecutableFile ( java . lang . String , com . beijunyi . parallelgit . utils . DirCache ) { com . beijunyi . parallelgit . utils . DirCacheEntry entry = com . beijunyi . par... | org . junit . Assert . assertTrue ( com . beijunyi . parallelgit . utils . CacheUtils . isRegularOrExecutableFile ( "/test_file.txt" , cache ) ) |
checkValueSettingAndReporting ( ) { dmxChannel . setValue ( 125 ) ; dmxChannel . getNewValue ( currentTime ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( dimmerThingHandler ) . updateChannelValue ( valueChannelUID , 125 ) ; } getValue ( ) { return value ; } | org . junit . Assert . assertThat ( dmxChannel . getValue ( ) , org . hamcrest . CoreMatchers . is ( 125 ) ) |
testWriteAndRead2 ( ) { byte [ ] data = new byte [ ] { 0 , 1 , 2 , 3 , 4 , - 1 , 6 } ; java . io . File f = new java . io . File ( ( "/tmp/test." + ( java . lang . System . currentTimeMillis ( ) ) ) ) ; java . io . FileOutputStream fos = new java . io . FileOutputStream ( f ) ; fos . write ( data ) ; fos . close ( ) ; ... | org . junit . Assert . assertEquals ( data [ ( offset + i ) ] , buf [ i ] ) |
serialize ( ) { org . oscm . billingservice . business . model . brokershare . BrokerRevenueShareResult result = org . oscm . billingservice . business . model . brokershare . BrokerShareResultAssemblerTest . brokerShareAssembler . build ( org . oscm . billingservice . business . model . brokershare . BrokerShareResult... | org . junit . Assert . assertNotNull ( bos . toByteArray ( ) ) |
shouldOccupiedHypercubesReturnTheNumberOfOccupiedHypercubes ( ) { org . uma . jmetal . util . AdaptiveGrid < org . uma . jmetal . solution . DoubleSolution > adaptiveGrid ; int bisections = 5 ; int objectives = 2 ; adaptiveGrid = new org . uma . jmetal . util . AdaptiveGrid ( bisections , objectives ) ; int [ ] hypercu... | org . junit . Assert . assertEquals ( 3 , adaptiveGrid . occupiedHypercubes ( ) ) |
testFloat1 ( ) { java . lang . Float negativeFloat = - 456.23F ; java . lang . Float convertedFloat = _converter . convertType ( ExpandoColumnConstants . FLOAT , negativeFloat . toString ( ) ) ; "<AssertPlaceHolder>" ; } toString ( ) { com . liferay . petra . string . StringBundler sb = new com . liferay . petra . stri... | org . junit . Assert . assertEquals ( negativeFloat , convertedFloat ) |
testCharactersDirectlyUnderBodyElement ( ) { java . lang . String test = "<html><body>test</body></html>" ; java . lang . String content = new org . apache . tika . Tika ( ) . parseToString ( new java . io . ByteArrayInputStream ( test . getBytes ( org . apache . tika . parser . html . UTF_8 ) ) ) ; "<AssertPlaceHolder... | org . junit . Assert . assertEquals ( "test" , content ) |
testAddTest5 ( ) { io . vertx . core . MultiMap mmap = newMultiMap ( ) ; io . vertx . core . MultiMap headers = newMultiMap ( ) ; "<AssertPlaceHolder>" ; } addAll ( java . util . Map ) { for ( Map . Entry < java . lang . String , java . lang . String > entry : map . entrySet ( ) ) { add ( entry . getKey ( ) , entry . g... | org . junit . Assert . assertEquals ( "" , mmap . addAll ( headers ) . toString ( ) ) |
testCustomizeInvalidConnectTimeout ( ) { java . lang . String someInvalidConnectTimeout = "a" ; java . lang . System . setProperty ( "apollo.connectTimeout" , someInvalidConnectTimeout ) ; com . ctrip . framework . apollo . util . ConfigUtil configUtil = new com . ctrip . framework . apollo . util . ConfigUtil ( ) ; "<... | org . junit . Assert . assertTrue ( ( ( configUtil . getConnectTimeout ( ) ) > 0 ) ) |
checkConnections ( ) { redis . clients . jedis . ShardedJedisPool pool = new redis . clients . jedis . ShardedJedisPool ( new org . apache . commons . pool2 . impl . GenericObjectPoolConfig ( ) , shards ) ; redis . clients . jedis . ShardedJedis jedis = pool . getResource ( ) ; jedis . set ( "foo" , "bar" ) ; "<AssertP... | org . junit . Assert . assertEquals ( "bar" , jedis . get ( "foo" ) ) |
testListMessageCounterHistory ( ) { long counterPeriod = 1000 ; org . apache . activemq . artemis . api . core . SimpleString address = org . apache . activemq . artemis . utils . RandomUtil . randomSimpleString ( ) ; org . apache . activemq . artemis . api . core . SimpleString queue = org . apache . activemq . artemi... | org . junit . Assert . assertEquals ( 1 , infos . length ) |
testGetStorage ( ) { org . finra . herd . model . api . xml . Storage storage = storageService . createStorage ( getNewStorageCreateRequest ( ) ) ; org . finra . herd . model . api . xml . Storage result = storageService . getStorage ( new org . finra . herd . model . api . xml . StorageKey ( storage . getName ( ) ) ) ... | org . junit . Assert . assertEquals ( storage , result ) |
testCreateFillsMessageFromCauseMessageParamWhenErrorMessageIsNull ( ) { javax . jms . JMSException result = org . apache . qpid . jms . exceptions . JmsExceptionSupport . create ( null , new java . io . IOException ( CAUSE_MESSAGE ) ) ; "<AssertPlaceHolder>" ; } getMessage ( ) { return message ; } | org . junit . Assert . assertEquals ( CAUSE_MESSAGE , result . getMessage ( ) ) |
testApplicationContext ( ) { java . util . Map < java . lang . String , org . apache . dubbo . config . ConsumerConfig > consumers = beansOfTypeIncludingAncestors ( applicationContext , org . apache . dubbo . config . ConsumerConfig . class ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 1 , consumers . size ( ) ) |
assertExecuteForSingleStatementWithDQL ( ) { java . sql . Statement statement = getStatement ( ) ; when ( statement . execute ( org . apache . shardingsphere . shardingjdbc . executor . StatementExecutorTest . DQL_SQL ) ) . thenReturn ( true ) ; setExecuteGroups ( java . util . Collections . singletonList ( statement )... | org . junit . Assert . assertTrue ( actual . execute ( ) ) |
addZeroSize ( ) { bucketer . reset ( "test" ) ; bucketer . add ( new com . m6d . filecrush . crush . Bucketer . HasSize ( ) { @ com . m6d . filecrush . crush . Override public java . lang . String id ( ) { return "test" ; } @ com . m6d . filecrush . crush . Override public long size ( ) { return 0 ; } } ) ; "<AssertPla... | org . junit . Assert . assertThat ( bucketer . createBuckets ( ) , org . hamcrest . Matchers . equalTo ( ( ( java . lang . Object ) ( emptyList ( ) ) ) ) ) |
testFieldNameCreateIOC ( ) { info . smart_tools . smartactors . iobject . ifield_name . IFieldName fieldName = info . smart_tools . smartactors . ioc . ioc . IOC . resolve ( info . smart_tools . smartactors . ioc . named_keys_storage . Keys . getOrAdd ( "info.smart_tools.smartactors.iobject.ifield_name.IFieldName" ) , ... | org . junit . Assert . assertEquals ( "name" , fieldName . toString ( ) ) |
testStringResult ( ) { de . fraunhofer . iosb . ilt . sta . dao . ObservationDao doa = de . fraunhofer . iosb . ilt . statests . c02cud . ResultTypesTests . service . observations ( ) ; de . fraunhofer . iosb . ilt . sta . model . Observation b1 = new de . fraunhofer . iosb . ilt . sta . model . Observation ( "fourty<s... | org . junit . Assert . assertEquals ( message , b1 . getResult ( ) , found . getResult ( ) ) |
shouldParseIntegerWithIntegerInput ( ) { long value = org . dcache . util . ByteSizeParser . using ( isoSymbol ( ) ) . withInput ( NumericalInput . INTEGER ) . parse ( "1" ) ; "<AssertPlaceHolder>" ; } parse ( java . io . File ) { java . util . List < diskCacheV111 . util . PnfsId > list = new java . util . ArrayList (... | org . junit . Assert . assertThat ( value , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . equalTo ( 1L ) ) ) |
testGetOntologyEntryByAccAndRefSource ( ) { uk . ac . ebi . bioinvindex . dao . ejb3 . OntologyEntryEJB3DAO dao = ( ( uk . ac . ebi . bioinvindex . dao . ejb3 . OntologyEntryEJB3DAO ) ( daoFactory . getOntologyEntryDAO ( ) ) ) ; uk . ac . ebi . bioinvindex . model . term . OntologyEntry ontologyEntryByAcc = dao . getOn... | org . junit . Assert . assertNotNull ( ontologyEntryByAcc ) |
testNotABlobSetNBCMD2 ( ) { fr . inria . diverse . torgen . inspectorguidget . analyser . BlobListenerAnalyser . setNbCmdBlobs ( 2 ) ; analyser . addInputResource ( "src/test/resources/java/analysers/ActionListenerCondOneInstanceOf.java" ) ; analyser . run ( ) ; "<AssertPlaceHolder>" ; } getBlobs ( ) { return blobs ; } | org . junit . Assert . assertTrue ( analyser . getBlobs ( ) . entrySet ( ) . isEmpty ( ) ) |
testNodeCount ( ) { final org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . hdfs . HdfsConfiguration ( ) ; conf . setInt ( DFSConfigKeys . DFS_NAMENODE_STARTUP_DELAY_BLOCK_DELETION_SEC_KEY , 60 ) ; conf . setInt ( DFSConfigKeys . DFS_NAMENODE_REDUNDANCY_INTERVAL_SECONDS_KEY , 1 ) ; conf . ... | org . junit . Assert . assertTrue ( ( nonExcessDN != null ) ) |
testCompareTo015 ( ) { javax . naming . ldap . LdapName ln = new javax . naming . ldap . LdapName ( "T=<sp>teSt1+f<sp>=<sp>anything,d=<sp>here;<sp>j=uos<asd,h<sp>=THAT," ) ; javax . naming . ldap . LdapName ln2 = new javax . naming . ldap . LdapName ( "t=test1+f=anything,d=here;j=uos<asd,h=that," ) ; "<AssertPlaceHolde... | org . junit . Assert . assertTrue ( ( ( ln . compareTo ( ln2 ) ) == 0 ) ) |
setMeasurand_powerFactor_measurandIsSet ( ) { java . lang . String measurand = "Power.Factor" ; sampledValue . setMeasurand ( measurand ) ; "<AssertPlaceHolder>" ; } getMeasurand ( ) { return measurand ; } | org . junit . Assert . assertThat ( sampledValue . getMeasurand ( ) , org . hamcrest . CoreMatchers . equalTo ( measurand ) ) |
testSetMaxRowsLowerThanSystemLimit ( ) { int sysValueToSet = ( org . apache . drill . jdbc . PreparedStatementMaxRowsTest . RANDOMIZER . nextInt ( 5 ) ) + 6 ; setSystemMaxRows ( sysValueToSet ) ; try ( java . sql . PreparedStatement pStmt = org . apache . drill . jdbc . PreparedStatementMaxRowsTest . connection . prepa... | org . junit . Assert . assertEquals ( valueToSet , rowCount ) |
shouldReturnTrueIfRevisionTypeIsAdd ( ) { java . lang . String value = EMPTY ; ch . puzzle . itc . mobiliar . business . database . entity . MyRevisionEntity revisionEntity = new ch . puzzle . itc . mobiliar . business . database . entity . MyRevisionEntity ( ) ; ch . puzzle . itc . mobiliar . business . auditview . en... | org . junit . Assert . assertThat ( relevant , org . hamcrest . Matchers . is ( true ) ) |
testUpgradeTemplateReferencesDueUpdatedStructureFieldName1 ( ) { addStructure ( _structureId , DDMStructureConstants . DEFAULT_PARENT_STRUCTURE_ID , DDMStructureConstants . VERSION_DEFAULT , read ( "ddm-structure-references-field-name.xsd" ) , "xml" ) ; addTemplate ( _templateId , _structureId , DDMTemplateConstants . ... | org . junit . Assert . assertEquals ( expectedDefinition , actualDefinition ) |
testDeleteProcessInstances ( ) { org . camunda . bpm . engine . runtime . ProcessInstance processInstance = runtimeService . startProcessInstanceByKey ( "oneTaskProcess" ) ; org . camunda . bpm . engine . runtime . ProcessInstance processInstance2 = runtimeService . startProcessInstanceByKey ( "oneTaskProcess" ) ; runt... | org . junit . Assert . assertThat ( runtimeService . createProcessInstanceQuery ( ) . count ( ) , org . hamcrest . CoreMatchers . is ( 0L ) ) |
testIntersectionWithTwoContainedElementsReversed ( ) { org . antlr . v4 . runtime . misc . IntervalSet s = org . antlr . v4 . runtime . misc . IntervalSet . of ( 10 , 20 ) ; org . antlr . v4 . runtime . misc . IntervalSet s2 = org . antlr . v4 . runtime . misc . IntervalSet . of ( 2 , 2 ) ; s2 . add ( 15 ) ; s2 . add (... | org . junit . Assert . assertEquals ( expecting , result ) |
testReadBits ( ) { com . ifesdjeen . continuum . compressed . ByteBufExtension buf = new com . ifesdjeen . continuum . compressed . ByteBufExtension ( io . netty . buffer . Unpooled . buffer ( 8 ) ) ; for ( int i = 0 ; i < 100 ; i ++ ) { buf . writeBit ( ( ( i % 2 ) == 0 ) ) ; } buf . flushUnwritten ( ) ; for ( int i =... | org . junit . Assert . assertEquals ( ( ( i % 2 ) == 0 ) , buf . readBit ( ) ) |
testGetArtistAlbums ( ) { SpotifyArtistAlbums albums = spotify . getArtistAlbums ( "1vCWHaC5f2uS3yhpwWbIA6" ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( albums ) |
testGetSharedFormURL ( ) { java . lang . String sharedFormURL = _ddmFormAdminDisplayContext . getSharedFormURL ( ) ; "<AssertPlaceHolder>" ; } getSharedFormURL ( ) { return getFormURL ( com . liferay . dynamic . data . mapping . form . web . internal . display . context . DDMFormAdminDisplayContextTest . _PUBLIC_FRIEND... | org . junit . Assert . assertEquals ( getSharedFormURL ( ) , sharedFormURL ) |
checkPattern ( ) { for ( int i = 0 ; i < 2 ; i ++ ) { edu . cmu . tetrad . test . Graph graph = edu . cmu . tetrad . test . GraphUtils . randomGraph ( 100 , 0 , 100 , 100 , 100 , 100 , false ) ; edu . cmu . tetrad . test . IndTestDSep test = new edu . cmu . tetrad . test . IndTestDSep ( graph ) ; edu . cmu . tetrad . t... | org . junit . Assert . assertEquals ( pattern , pattern2 ) |
testAdd ( ) { final int iterations = com . carrotsearch . randomizedtesting . RandomizedTest . between ( 5 , 50 ) ; final org . neo4j . graphalgo . core . utils . queue . IntPriorityQueue queue = org . neo4j . graphalgo . core . utils . queue . IntPriorityQueue . min ( ) ; int min = - 1 ; double minWeight = Double . PO... | org . junit . Assert . assertEquals ( queue . top ( ) , min ) |
testGetSelection ( ) { if ( java . awt . GraphicsEnvironment . isHeadless ( ) ) return ; org . biojava . nbio . structure . gui . StructureViewer instance = new org . biojava . nbio . structure . gui . StructureViewerTest . StructureViewerImpl ( ) ; org . biojava . nbio . structure . gui . Selection expResult = null ; ... | org . junit . Assert . assertEquals ( expResult , result ) |
testDisabledComment ( ) { final java . io . StringWriter sw = new java . io . StringWriter ( ) ; final leap . lang . csv . CSVPrinter printer = new leap . lang . csv . CSVPrinter ( sw , CSVFormat . DEFAULT ) ; printer . printComment ( "This<sp>is<sp>a<sp>comment" ) ; "<AssertPlaceHolder>" ; printer . close ( ) ; } toSt... | org . junit . Assert . assertEquals ( "" , sw . toString ( ) ) |
timeSequentialTest ( ) { org . lable . oss . uniqueid . zookeeper . SynchronizedGeneratorIdentity generatorIdentityHolder = new org . lable . oss . uniqueid . zookeeper . SynchronizedGeneratorIdentity ( org . lable . oss . uniqueid . zookeeper . SynchronizedUniqueIDGeneratorIT . zooKeeperConnection , org . lable . oss ... | org . junit . Assert . assertThat ( ids . size ( ) , org . hamcrest . CoreMatchers . is ( 100000 ) ) |
datumIngangNaDatumEinde ( ) { final nl . bzk . algemeenbrp . dal . domein . brp . entity . PartijRol partijRol = new nl . bzk . algemeenbrp . dal . domein . brp . entity . PartijRol ( new nl . bzk . algemeenbrp . dal . domein . brp . entity . Partij ( "partij1" , "000001" ) , nl . bzk . algemeenbrp . dal . domein . brp... | org . junit . Assert . assertEquals ( 1 , errorCount ( partijRol ) ) |
filterEntitlementCert ( ) { java . util . List < org . candlepin . model . Entitlement > allEnts = new java . util . LinkedList ( ) ; org . candlepin . model . Entitlement e = new org . candlepin . model . Entitlement ( ) ; java . util . Set < org . candlepin . model . EntitlementCertificate > entCerts = new java . uti... | org . junit . Assert . assertFalse ( output . contains ( "FILTERME" ) ) |
testBCryptEncodeAndMatch ( ) { java . lang . String rawPassword = "test" ; java . lang . String encoded = this . instance . encode ( rawPassword ) ; boolean matched = this . instance . matches ( rawPassword , encoded ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( matched ) |
testSetTableNameCase ( ) { java . util . List < com . j256 . ormlite . field . DatabaseFieldConfig > fieldConfigs = new java . util . ArrayList < com . j256 . ormlite . field . DatabaseFieldConfig > ( ) ; com . j256 . ormlite . field . DatabaseFieldConfig fieldId = new com . j256 . ormlite . field . DatabaseFieldConfig... | org . junit . Assert . assertEquals ( tableName , tableConfig . getTableName ( ) ) |
test_isComplete_noAmount ( ) { org . joda . money . format . MoneyParseContext test = new org . joda . money . format . MoneyParseContext ( java . util . Locale . FRANCE , "GBP<sp>123" , 0 ) ; test . setCurrency ( CurrencyUnit . GBP ) ; "<AssertPlaceHolder>" ; } isComplete ( ) { return ( ( currency ) != null ) && ( ( a... | org . junit . Assert . assertEquals ( false , test . isComplete ( ) ) |
testCardumentM70EvolveNotUniformreplacement ( ) { fr . inria . main . CommandSummary command = fr . inria . astor . test . repair . evaluation . regression . MathCommandsTests . getMath70Command ( ) ; fr . inria . astor . core . solutionsearch . spaces . ingredients . scopes . IngredientPoolScope scope = fr . inria . a... | org . junit . Assert . assertNotNull ( ingredientSpace ) |
testGetEntryNotAvailable ( ) { java . util . NavigableMap < byte [ ] , byte [ ] > pendingPrepare = getBinaryTreeMap ( ) ; java . util . NavigableMap < byte [ ] , byte [ ] > pendingCommit = getBinaryTreeMap ( ) ; org . apache . storm . hbase . state . HBaseKeyValueStateIterator < byte [ ] , byte [ ] > kvIterator = new o... | org . junit . Assert . assertFalse ( kvIterator . hasNext ( ) ) |
test21 ( ) { com . creactiviti . piper . core . task . SpelTaskEvaluator evaluator = new com . creactiviti . piper . core . task . SpelTaskEvaluator ( ) ; com . creactiviti . piper . core . task . TaskExecution jt = com . creactiviti . piper . core . task . SimpleTaskExecution . createFrom ( "someInt" , "${int('1')}" )... | org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 1 ) , evaluated . get ( "someInt" ) ) |
selectUnique ( ) { super . selectUnique ( ) ; org . eclipse . collections . api . bag . primitive . MutableBooleanBag bag = this . classUnderTest ( ) ; org . eclipse . collections . api . set . primitive . MutableBooleanSet expected = BooleanSets . mutable . with ( false ) ; org . eclipse . collections . api . set . pr... | org . junit . Assert . assertEquals ( expected , actual ) |
NPETest ( ) { java . util . List < java . lang . String > result = lotteryMachine . setSeed ( 100500 ) . draw ( null ) ; "<AssertPlaceHolder>" ; } size ( ) { throw new java . lang . UnsupportedOperationException ( ) ; } | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
testEqualsNotEqualsGroupId ( ) { org . o3project . odenos . core . component . network . flow . ofpflow . OFPFlowActionPushPbb obj = new org . o3project . odenos . core . component . network . flow . ofpflow . OFPFlowActionPushPbb ( ) ; boolean result = target . equals ( obj ) ; "<AssertPlaceHolder>" ; } equals ( java ... | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( false ) ) |
testInvokeVarargs06 ( ) { javax . el . BeanELResolver resolver = new javax . el . BeanELResolver ( ) ; javax . el . ELContext context = new javax . el . StandardELContext ( javax . el . ELManager . getExpressionFactory ( ) ) ; java . lang . Object result = resolver . invoke ( context , new javax . el . TesterBean ( jav... | org . junit . Assert . assertEquals ( javax . el . TestBeanELResolver . BEAN_NAME , result ) |
isJSONValidFalse ( ) { final java . lang . String json = "I'm<sp>not<sp>a<sp>valid<sp>JSON" ; final boolean expected = false ; final boolean result = org . sentilo . web . catalog . utils . CatalogUtils . isJSONValid ( json ) ; "<AssertPlaceHolder>" ; } isJSONValid ( java . lang . String ) { final com . fasterxml . jac... | org . junit . Assert . assertEquals ( expected , result ) |
readDeflate64CompressedStream ( ) { final java . io . File input = org . apache . commons . compress . AbstractTestCase . getFile ( "COMPRESS-380/COMPRESS-380-input" ) ; final java . io . File archive = org . apache . commons . compress . AbstractTestCase . getFile ( "COMPRESS-380/COMPRESS-380.zip" ) ; try ( java . io ... | org . junit . Assert . assertArrayEquals ( orig , fromZip ) |
testSetAndGet ( ) { gov . llnl . ontology . text . Sentence sent = new gov . llnl . ontology . text . Sentence ( 0 , 100 , 1 ) ; gov . llnl . ontology . text . Annotation annot = new gov . llnl . ontology . text . SimpleAnnotation ( "blah" ) ; sent . addAnnotation ( 0 , annot ) ; "<AssertPlaceHolder>" ; } getAnnotation... | org . junit . Assert . assertEquals ( annot , sent . getAnnotation ( 0 ) ) |
moveIntoHigher ( ) { await ( io . datakernel . csp . ChannelSupplier . of ( wrapUtf8 ( "hello,<sp>this<sp>is<sp>some<sp>text" ) ) . streamTo ( client . upload ( "test.txt" , 0 , 1 ) ) ) ; await ( io . datakernel . csp . ChannelSupplier . of ( wrapUtf8 ( "and<sp>this<sp>is<sp>another" ) ) . streamTo ( client . upload ( ... | org . junit . Assert . assertEquals ( "and<sp>this<sp>is<sp>another" , download ( "test2.txt" ) ) |
testStripSecretFromUrl5 ( ) { java . lang . String input = "&client_secret=&client_secret=password&client_secret=123&client_secret=abc&client_secret=" ; java . lang . String expected = "&client_secret=&client_secret=*****&client_secret=*****&client_secret=*****&client_secret=" ; java . lang . String secret = "client_se... | org . junit . Assert . assertEquals ( expected , value ) |
test ( ) { final org . opendaylight . yangtools . yang . data . api . schema . DataContainerChild < ? extends org . opendaylight . yangtools . yang . data . api . YangInstanceIdentifier . PathArgument , ? > rootNode = org . opendaylight . yangtools . yang . data . codec . gson . Bug5446Test . createRootNode ( ) ; final... | org . junit . Assert . assertEquals ( expextedJson , serializedJson ) |
testGenericS3Exception ( ) { org . apache . hadoop . fs . s3a . AWSS3IOException ex = ( ( org . apache . hadoop . fs . s3a . AWSS3IOException ) ( org . apache . hadoop . fs . s3a . TestS3AExceptionTranslation . verifyTranslated ( org . apache . hadoop . fs . s3a . AWSS3IOException . class , org . apache . hadoop . fs .... | org . junit . Assert . assertEquals ( 451 , ex . getStatusCode ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.