input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
shouldSerialiseAndDeserialiseValueWithSerialiser ( ) { final java . lang . String string = "Some<sp>value" ; final uk . gov . gchq . gaffer . serialisation . implementation . StringSerialiser serialiser = new uk . gov . gchq . gaffer . serialisation . implementation . StringSerialiser ( ) ; final byte [ ] serialisedByt... | org . junit . Assert . assertEquals ( string , deserialisedString ) |
testEmpty ( ) { "<AssertPlaceHolder>" ; } evaluate ( hivemall . ftvec . DeferredObject [ ] ) { assert ( arguments . length ) == 1 ; @ hivemall . ftvec . SuppressWarnings ( "unchecked" ) final java . util . List < java . lang . Double > input = ( ( java . util . List < java . lang . Double > ) ( argumentOI . getList ( a... | org . junit . Assert . assertEquals ( "" , udf . evaluate ( "" ) ) |
testInsertSystemInfo ( ) { org . smartdata . model . SystemInfo systemInfo = new org . smartdata . model . SystemInfo ( "test" , "test" ) ; metaStore . insertSystemInfo ( systemInfo ) ; "<AssertPlaceHolder>" ; } getSystemInfoByProperty ( java . lang . String ) { try { return systemInfoDao . getByProperty ( property ) ;... | org . junit . Assert . assertTrue ( metaStore . getSystemInfoByProperty ( "test" ) . equals ( systemInfo ) ) |
removeAll_01 ( ) { org . apache . jena . graph . Graph g = emptyGraph ( ) ; org . apache . jena . graph . Triple t1 = org . openjena . jenasesame . AbstractTestGraph2 . triple ( org . openjena . jenasesame . AbstractTestGraph2 . s1 , org . openjena . jenasesame . AbstractTestGraph2 . p1 , org . openjena . jenasesame . ... | org . junit . Assert . assertEquals ( 0 , g . size ( ) ) |
testTherapyRowGets ( ) { int id = 0 ; try { id = _setupTestTherapyRow ( false ) ; _checkTherapyRowIntoDb ( id ) ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; "<AssertPlaceHolder>" ; } return ; } _checkTherapyRowIntoDb ( int ) { org . isf . therapy . model . TherapyRow foundTherapyRow ; foundTherap... | org . junit . Assert . assertEquals ( true , false ) |
nioThreadsOptionalPresent ( ) { final io . trane . ndbc . Config c = io . trane . ndbc . Config . create ( dataSourceSupplierClass , host , port , user ) ; final int nioThreads = 100 ; "<AssertPlaceHolder>" ; } nioThreads ( int ) { return nioThreads ( java . util . Optional . of ( nioThreads ) ) ; } | org . junit . Assert . assertEquals ( java . util . Optional . of ( nioThreads ) , c . nioThreads ( java . util . Optional . of ( nioThreads ) ) . nioThreads ( ) ) |
testVoerRegelUitMetVerwantschap ( ) { final nl . bzk . brp . model . bericht . kern . FamilierechtelijkeBetrekkingBericht nieuweSituatie = maakFamilierechtelijkeBetrekkingBericht ( ) ; final java . util . Map < java . lang . String , nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView > bestaandeBetr... | org . junit . Assert . assertEquals ( 1 , resultaat . size ( ) ) |
shouldFetchAudioFromServer ( ) { com . rapidftr . model . Child child = new com . rapidftr . model . Child ( "id1" , "user1" , "{<sp>'_id'<sp>:<sp>'1234abcd'<sp>,'recorded_audio'<sp>:<sp>'audio_file_name'}" ) ; getFakeHttpLayer ( ) . setDefaultHttpResponse ( 200 , "audio<sp>stream" ) ; getFakeHttpLayer ( ) . addHttpRes... | org . junit . Assert . assertEquals ( "OK" , response ) |
testIsDisplaySizeTwiceThePrecision ( ) { org . pentaho . di . core . database . DatabaseInterface databaseInterface = new org . pentaho . di . core . database . VerticaDatabaseMeta ( ) ; "<AssertPlaceHolder>" ; } isDisplaySizeTwiceThePrecision ( ) { return true ; } | org . junit . Assert . assertTrue ( databaseInterface . isDisplaySizeTwiceThePrecision ( ) ) |
testCreateZKAccessControl ( ) { org . apache . distributedlog . thrift . AccessControlEntry ace = new org . apache . distributedlog . thrift . AccessControlEntry ( ) ; ace . setDenyWrite ( true ) ; java . lang . String zkPath = "/create-zk-access-control" ; org . apache . distributedlog . impl . acl . ZKAccessControl z... | org . junit . Assert . assertEquals ( zkac , readZKAC ) |
getPositionByUser ( ) { org . egov . pims . commons . Position pos = eisCommonService . getPositionByUserId ( 1L ) ; "<AssertPlaceHolder>" ; } getPositionByUserId ( java . lang . Long ) { return assignmentService . getPrimaryAssignmentForUser ( userId ) . getPosition ( ) ; } | org . junit . Assert . assertNotNull ( pos ) |
get_partition_by_name ( ) { org . apache . hadoop . hive . metastore . api . Partition partition = new org . apache . hadoop . hive . metastore . api . Partition ( ) ; org . apache . hadoop . hive . metastore . api . Partition outbound = new org . apache . hadoop . hive . metastore . api . Partition ( ) ; when ( primar... | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( outbound ) ) |
testBuildGetIndexTypeUrl ( ) { java . lang . String expected = "http://localhost:9200/test/any_type" ; java . lang . String actual = com . github . aureliano . evtbridge . output . elasticsearch . ESUrlHelper . buildGetIndexTypeUrl ( this . configuration , "any_type" ) ; "<AssertPlaceHolder>" ; } buildGetIndexTypeUrl (... | org . junit . Assert . assertEquals ( expected , actual ) |
testOpenOpenDescending ( ) { org . apache . commons . functor . range . IntegerRange range = org . apache . commons . functor . range . Ranges . integerRange ( 5 , BoundType . OPEN , ( - 5 ) , BoundType . OPEN , ( - 3 ) ) ; java . util . List < java . lang . Integer > expected = java . util . Arrays . asList ( 2 , ( - ... | org . junit . Assert . assertEquals ( expected , elements ) |
testHandleMessagePSS_SHA256 ( ) { java . security . KeyPair keyPair = test . unit . be . fedict . eid . applet . service . MiscTestUtils . generateKeyPair ( ) ; org . joda . time . DateTime notBefore = new org . joda . time . DateTime ( ) ; org . joda . time . DateTime notAfter = notBefore . plusYears ( 1 ) ; java . se... | org . junit . Assert . assertEquals ( signatureValue , test . unit . be . fedict . eid . applet . service . SignatureDataMessageHandlerTest . SignatureTestService . getSignatureValue ( ) ) |
createCriteria ( ) { org . hibernate . Session session = sessionFactory . openSession ( ) ; io . robe . hibernate . criteria . api . Criteria < io . robe . hibernate . test . entity . User > criteria = io . robe . hibernate . criteria . api . Criteria . createCriteria ( io . robe . hibernate . test . entity . User . cl... | org . junit . Assert . assertNotNull ( criteria ) |
verifyGetSecretVersionRetrievesBinary ( ) { final com . amazonaws . services . secretsmanager . model . GetSecretValueRequest request = new com . amazonaws . services . secretsmanager . model . GetSecretValueRequest ( ) ; request . setSecretId ( "secret" ) ; request . setVersionId ( "version" ) ; final com . amazonaws ... | org . junit . Assert . assertEquals ( "expected" , new java . lang . String ( buffer , "UTF-8" ) ) |
testNoInfo ( ) { eu . europa . esig . dss . validation . reports . wrapper . TrustedServiceWrapper service = new eu . europa . esig . dss . validation . reports . wrapper . TrustedServiceWrapper ( ) ; "<AssertPlaceHolder>" ; } isConsistent ( eu . europa . esig . dss . validation . reports . wrapper . TrustedServiceWrap... | org . junit . Assert . assertTrue ( condition . isConsistent ( service ) ) |
testInvalidMvp4gConfigurationException ( ) { com . mvp4g . rebind . exception . InvalidMvp4gConfigurationException e = new com . mvp4g . rebind . exception . InvalidMvp4gConfigurationException ( "test" ) ; "<AssertPlaceHolder>" ; } getMessage ( ) { return msg ; } | org . junit . Assert . assertEquals ( "test" , e . getMessage ( ) ) |
testMimimumSize ( ) { org . eclipse . swt . widgets . Group group = new org . eclipse . swt . widgets . Group ( shell , org . eclipse . swt . SWT . NONE ) ; org . eclipse . swt . graphics . Rectangle clientArea = group . getClientArea ( ) ; org . eclipse . swt . widgets . Button button = new org . eclipse . swt . widge... | org . junit . Assert . assertEquals ( new org . eclipse . swt . graphics . Point ( 200 , 50 ) , size ) |
divTest ( ) { double result = cn . hutool . core . util . NumberUtil . div ( 0 , 1 ) ; "<AssertPlaceHolder>" ; } div ( float , float ) { return cn . hutool . core . util . NumberUtil . div ( v1 , v2 , cn . hutool . core . util . NumberUtil . DEFAUT_DIV_SCALE ) ; } | org . junit . Assert . assertEquals ( 0.0 , result , 0 ) |
test_getCharWidthC ( ) { int w = gc . getCharWidth ( 'a' ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( ( w > 0 ) ) |
testIsPreview ( ) { System . out . println ( "isPreview" ) ; kg . apc . jmeter . vizualizers . JCompositeRowsSelectorPanel instance = new kg . apc . jmeter . vizualizers . JCompositeRowsSelectorPanel ( new kg . apc . jmeter . vizualizers . CompositeModel ( ) , new kg . apc . jmeter . vizualizers . CompositeGraphGui ( )... | org . junit . Assert . assertEquals ( expResult , result ) |
testPersistingAndLoadingVariousMultibleObjects ( ) { persistenceService . create ( com . google . common . collect . Lists . newArrayList ( new org . openengsb . core . persistence . test . objects . B ( ) , new org . openengsb . core . persistence . test . objects . A ( ) ) ) ; java . util . List < org . openengsb . c... | org . junit . Assert . assertEquals ( 1 , query . size ( ) ) |
tesGetMovieSubtitles ( ) { java . util . List < java . lang . String > subtitles = new java . util . ArrayList ( ) ; subtitles . add ( "en" ) ; subtitles . add ( "it" ) ; subtitles . add ( "de" ) ; subtitles . add ( "nor" ) ; subtitles . add ( "ger" ) ; com . moviejukebox . model . Movie movie = new com . moviejukebox ... | org . junit . Assert . assertEquals ( 2 , com . moviejukebox . tools . SubtitleTools . getSubtitles ( movie ) . size ( ) ) |
testSplit1 ( ) { "<AssertPlaceHolder>" ; } split ( java . lang . String ) { if ( ( commandline == null ) || ( ( commandline . length ( ) ) == 0 ) ) { return new java . util . ArrayList < java . lang . String > ( ) ; } final java . util . List < java . lang . String > args = new java . util . ArrayList < java . lang . S... | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( ) , org . jacoco . core . runtime . CommandLineSupport . split ( null ) ) |
isExistingJob_should_return_false_if_doesnt_exist_in_quartz ( ) { doReturn ( null ) . when ( scheduler ) . getJobDetail ( any ( org . quartz . JobKey . class ) ) ; final boolean existingJob = quartzSchedulerExecutor . isExistingJob ( "name" , "group" ) ; "<AssertPlaceHolder>" ; } isExistingJob ( java . lang . String , ... | org . junit . Assert . assertFalse ( existingJob ) |
testTimedReceiveBodyPassthrough ( ) { org . apache . qpid . jms . JmsSession session = org . mockito . Mockito . mock ( org . apache . qpid . jms . JmsSession . class ) ; org . apache . qpid . jms . JmsMessageConsumer messageConsumer = org . mockito . Mockito . mock ( org . apache . qpid . jms . JmsMessageConsumer . cl... | org . junit . Assert . assertNull ( consumer . receiveBody ( java . util . Map . class , 100 ) ) |
testGetNextBusinessDay_Satruday ( ) { java . time . ZonedDateTime ldt = java . time . ZonedDateTime . of ( 2016 , 2 , 27 , 6 , 45 , 55 , 0 , java . time . ZoneId . systemDefault ( ) ) ; java . time . ZonedDateTime expectedDatetime = java . time . ZonedDateTime . of ( 2016 , 2 , 29 , 6 , 30 , 2 , 0 , java . time . ZoneI... | org . junit . Assert . assertEquals ( expectedDatetime , strategy . getNextBusinessDay ( ldt ) ) |
testNegociate ( ) { final net . violet . platform . datamodel . Timezone tzParis = Factories . TIMEZONE . findByJavaId ( "testuser@violet.invalid" 6 ) ; final net . violet . platform . datamodel . Lang frLang = getFrLang ( ) ; final net . violet . platform . datamodel . User theUser = new net . violet . platform . data... | org . junit . Assert . assertEquals ( "testuser@violet.invalid" 7 , negociatedResult . getModality ( ) ) |
testGetName ( ) { java . util . Map < java . lang . String , java . lang . String > props = new java . util . HashMap ( ) ; org . apache . ambari . server . controller . ivory . Feed feed = new org . apache . ambari . server . controller . ivory . Feed ( "Feed1" , "d" , "s" , "sch" , "source" , "st" , "end" , "l" , "a"... | org . junit . Assert . assertEquals ( "Feed1" , feed . getName ( ) ) |
folderShouldExist ( ) { final org . talend . dataprep . api . folder . Folder foo = getFolderRepository ( ) . addFolder ( homeFolderId , "/foo" ) ; final boolean exists = getFolderRepository ( ) . exists ( foo . getId ( ) ) ; "<AssertPlaceHolder>" ; } getId ( ) { return this . id ; } | org . junit . Assert . assertTrue ( exists ) |
deveObterInformacoesAdicionaisComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . nota . NFNotaInfo notaInfo = new com . fincatto . documentofiscal . nfe310 . classes . nota . NFNotaInfo ( ) ; final com . fincatto . documentofiscal . nfe310 . classes . nota . NFNotaInfoInformacoesAdicionais ... | org . junit . Assert . assertEquals ( informacoesAdicionais , notaInfo . getInformacoesAdicionais ( ) ) |
testEncodeImplicit ( ) { org . wildfly . security . asn1 . DEREncoder encoder = new org . wildfly . security . asn1 . DEREncoder ( ) ; encoder . encodeImplicit ( 2 ) ; encoder . encodeIA5String ( "server1.example.com" ) ; byte [ ] expected = new byte [ ] { - 126 , 19 , 115 , 101 , 114 , 118 , 101 , 114 , 49 , 46 , 101 ... | org . junit . Assert . assertArrayEquals ( expected , encoder . getEncoded ( ) ) |
addsPath ( java . lang . String , java . lang . String , java . lang . String ) { java . net . URI uri = javax . ws . rs . core . UriBuilder . fromUri ( source ) . path ( path ) . build ( ) ; "<AssertPlaceHolder>" ; } create ( javax . servlet . http . HttpServletRequest ) { final java . net . URL forwardedUrl = org . e... | org . junit . Assert . assertEquals ( java . net . URI . create ( expected ) , uri ) |
testSetName ( ) { metadata . setName ( "testname" ) ; "<AssertPlaceHolder>" ; } getFileName ( ) { return this . name ; } | org . junit . Assert . assertEquals ( "testname" , metadata . getFileName ( ) ) |
firstTest ( ) { com . microsoft . azure . management . postgresql . v2017_12_01 . PostgreSQLTest . rgName = com . microsoft . azure . arm . utils . SdkContext . randomResourceName ( "rg" , 20 ) ; com . microsoft . azure . management . resources . ResourceGroup group = com . microsoft . azure . management . postgresql .... | org . junit . Assert . assertNotNull ( group ) |
testAlleInhoudelijkeGroepen ( ) { final nl . bzk . brp . model . operationeel . kern . ActieModel actie = support . PersoonHisVolledigUtil . maakActie ( 2L , SoortAdministratieveHandeling . G_B_A_BIJHOUDING_ACTUEEL , SoortActie . CONVERSIE_G_B_A , 19400101 , partij ) ; final nl . bzk . brp . model . algemeen . stamgege... | org . junit . Assert . assertEquals ( 4 , resultaat . size ( ) ) |
write ( ) { com . asakusafw . runtime . io . json . value . IntOptionPropertyAdapter adapter = builder . build ( ) ; com . asakusafw . runtime . io . json . value . MockValue writer = new com . asakusafw . runtime . io . json . value . MockValue ( ) ; adapter . write ( new com . asakusafw . runtime . value . IntOption ... | org . junit . Assert . assertThat ( writer . get ( ) , is ( 100 ) ) |
shouldHaveURLInExceptionMessage ( ) { com . openshift . client . fakes . HttpServerFake server = null ; try { this . serverFake . stop ( ) ; server = startHttpServerFake ( "HTTP/1.0<sp>404<sp>Not<sp>Found" ) ; httpClient . get ( server . getUrl ( ) , IHttpClient . NO_TIMEOUT ) ; org . junit . Assert . fail ( "Expected<... | org . junit . Assert . assertTrue ( e . getMessage ( ) . contains ( server . getUrl ( ) . toString ( ) ) ) |
testIsolated ( ) { int [ ] [ ] g = new int [ ] [ ] { new int [ ] { 5 , 1 } , new int [ ] { 0 , 2 } , new int [ ] { 1 , 3 } , new int [ ] { 2 , 4 } , new int [ ] { 3 , 5 } , new int [ ] { 4 , 0 } } ; org . openscience . cdk . ringsearch . CyclicVertexSearch search = new org . openscience . cdk . ringsearch . RegularCycl... | org . junit . Assert . assertThat ( search . isolated ( ) , org . hamcrest . CoreMatchers . is ( new int [ ] [ ] { new int [ ] { 0 , 1 , 2 , 3 , 4 , 5 } } ) ) |
test_minus_BigDecimal_zero ( ) { org . joda . money . Money test = org . joda . money . TestMoney . GBP_2_34 . minus ( BigDecimal . ZERO ) ; "<AssertPlaceHolder>" ; } minus ( double ) { return minus ( amountToSubtract , RoundingMode . UNNECESSARY ) ; } | org . junit . Assert . assertSame ( org . joda . money . TestMoney . GBP_2_34 , test ) |
testFindByDemographicNumber ( ) { int demographicNo1 = 101 ; int demographicNo2 = 202 ; org . oscarehr . common . model . Relationships relationships1 = new org . oscarehr . common . model . Relationships ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( relationships1 ... | org . junit . Assert . assertTrue ( true ) |
testgetShortKO ( ) { "<AssertPlaceHolder>" ; ff4jConf . getShort ( "propString" ) ; } containsKey ( java . lang . Object ) { return value ( ) . containsKey ( key ) ; } | org . junit . Assert . assertTrue ( ff4jConf . containsKey ( "propString" ) ) |
shouldReplaceValuesOnEqualKey ( ) { org . neo4j . kernel . impl . store . kvstore . KeyValueMerger merger = new org . neo4j . kernel . impl . store . kvstore . KeyValueMerger ( org . neo4j . kernel . impl . store . kvstore . KeyValueMergerTest . provider ( org . neo4j . kernel . impl . store . kvstore . KeyValueMergerT... | org . junit . Assert . assertEquals ( asList ( 1 , 1 , 2 , 2 , 3 , 2 , 5 , 1 , 6 , 2 ) , data ) |
shouldCreateColorlessMana ( ) { mage . Mana mana = mage . Mana . ColorlessMana ( 1 ) ; "<AssertPlaceHolder>" ; } getColorless ( ) { return colorless ; } | org . junit . Assert . assertEquals ( 1 , mana . getColorless ( ) ) |
testWithMaintenanceAssociationList ( ) { java . util . Collection < org . onosproject . incubator . net . l2monitoring . cfm . MaintenanceAssociation > maList = md1 . maintenanceAssociationList ( ) ; maList . add ( org . onosproject . incubator . net . l2monitoring . cfm . DefaultMaintenanceAssociation . builder ( org ... | org . junit . Assert . assertEquals ( 2 , md1 . maintenanceAssociationList ( ) . size ( ) ) |
AccessStaticVariableIndirect_VarVar ( ) { java . lang . String fromClass = "Domain.Indirect.ViolatingFrom.AccessStaticVariableIndirect_VarVar" ; java . lang . String toClass = "Domain.Indirect.IndirectTo.ServiceOne" ; java . util . ArrayList < java . lang . String > typesToFind = new java . util . ArrayList < java . la... | org . junit . Assert . assertTrue ( areDependencyTypesDetected ( fromClass , toClass , typesToFind , true ) ) |
searchProcessDeploymentInfosCanStartForUsersManagedBy ( ) { final org . bonitasoft . engine . persistence . QueryOptions options = new org . bonitasoft . engine . persistence . QueryOptions ( 0 , 10 ) ; final long userId = 9 ; when ( persistenceService . searchEntity ( org . bonitasoft . engine . core . process . defin... | org . junit . Assert . assertNotNull ( result ) |
testBuildAggregate ( ) { final org . apache . metamodel . util . AggregateBuilder < ? > aggregateBuilder = org . apache . metamodel . query . RandomAggregateFunctionTest . FUNCTION . createAggregateBuilder ( ) ; aggregateBuilder . add ( "foo" ) ; aggregateBuilder . add ( "bar" ) ; aggregateBuilder . add ( "baz" ) ; fin... | org . junit . Assert . assertTrue ( java . util . Arrays . asList ( "foo" , "bar" , "baz" ) . contains ( aggregate ) ) |
testLongUpdateInterval ( ) { final long updateInterval = 1000L ; final java . util . concurrent . atomic . AtomicInteger requestMetricQueryServiceGatewaysCounter = new java . util . concurrent . atomic . AtomicInteger ( 0 ) ; final org . apache . flink . runtime . webmonitor . RestfulGateway restfulGateway = createRest... | org . junit . Assert . assertThat ( requestMetricQueryServiceGatewaysCounter . get ( ) , org . hamcrest . Matchers . is ( 1 ) ) |
getCountWithGenes ( ) { "<AssertPlaceHolder>" ; } getCount ( ) { return this . genes . size ( ) ; } | org . junit . Assert . assertEquals ( 4 , this . component . getCount ( ) ) |
testFullEntryNullParentPath ( ) { org . locationtech . geogig . model . Node ln = org . locationtech . geogig . model . RevObjectFactory . defaultInstance ( ) . createNode ( NodeRef . ROOT , RevTree . EMPTY_TREE_ID , ObjectId . NULL , TYPE . TREE , new org . locationtech . jts . geom . Envelope ( 0 , 0 , 0 , 0 ) , null... | org . junit . Assert . assertEquals ( entry , read ) |
testSchemaEvolution ( ) { org . apache . avro . message . List < java . nio . ByteBuffer > buffers = new org . apache . avro . message . ArrayList ( ) ; org . apache . avro . message . List < org . apache . avro . generic . GenericData . Record > records = new org . apache . avro . message . ArrayList ( ) ; records . a... | org . junit . Assert . assertEquals ( allAsV2 , decodedUsingV2 ) |
toStringValueOf ( ) { for ( org . apache . jackrabbit . oak . plugins . document . FormatVersion v : org . apache . jackrabbit . oak . plugins . document . FormatVersion . values ( ) ) { java . lang . String s = v . toString ( ) ; "<AssertPlaceHolder>" ; } } valueOf ( java . lang . String ) { java . lang . String [ ] p... | org . junit . Assert . assertSame ( v , org . apache . jackrabbit . oak . plugins . document . FormatVersion . valueOf ( s ) ) |
_3 ( ) { int actual = new fr . inria . lille . examples . tcas . Tcas ( ) . is_upward_preferred ( 0 , 100 , 50 ) ; "<AssertPlaceHolder>" ; } is_upward_preferred ( int , int , int ) { int bias ; if ( 0 != inhibit ) { bias = down_sep ; } else { bias = up_sep ; } if ( bias > down_sep ) { return 1 ; } else { return 0 ; } } | org . junit . Assert . assertEquals ( 1 , actual ) |
testOptimizeOperationsRToU ( ) { java . util . Deque < org . onosproject . vpls . api . VplsOperation > operations = new java . util . ArrayDeque ( ) ; org . onosproject . vpls . api . VplsData vplsData = org . onosproject . vpls . api . VplsData . of ( org . onosproject . vpls . VPLS1 ) ; vplsData . addInterfaces ( co... | org . junit . Assert . assertEquals ( org . onosproject . vpls . api . VplsOperation . of ( vplsData , VplsOperation . Operation . UPDATE ) , vplsOperation ) |
testIntArray ( ) { int [ ] array = new int [ ] { 1 , 2 , 3 , 4 , 5 } ; java . io . ByteArrayOutputStream bos = new java . io . ByteArrayOutputStream ( ) ; java . io . DataOutputStream dos = new java . io . DataOutputStream ( bos ) ; org . apache . giraph . utils . WritableUtils . writeIntArray ( array , dos ) ; dos . c... | org . junit . Assert . assertArrayEquals ( array , result ) |
setFontShouldNotCreateDuplicateStyle ( ) { org . apache . poi . ss . usermodel . Workbook wb1 = _testDataProvider . createWorkbook ( ) ; org . apache . poi . ss . usermodel . Cell c = wb1 . createSheet ( ) . createRow ( 1 ) . createCell ( 1 ) ; org . apache . poi . ss . usermodel . Font f = wb1 . createFont ( ) ; org .... | org . junit . Assert . assertEquals ( num1 , num2 ) |
testGetProperty_invalidKey ( ) { org . kuali . rice . core . impl . services . ConfigurationServiceImpl . PropertyHolder propertyHolder = new org . kuali . rice . core . impl . services . ConfigurationServiceImpl . PropertyHolder ( ) ; boolean failedAsExpected = false ; try { propertyHolder . getProperty ( null ) ; } c... | org . junit . Assert . assertTrue ( failedAsExpected ) |
testInvalidObjectId ( ) { java . lang . String [ ] invalidShas = new java . lang . String [ ] { null , "abcdef" , "a0123456789012345678901234567890123456789" , "!123456789012345678901234567890123456789" } ; for ( java . lang . String sha : invalidShas ) { boolean caught = false ; try { new org . libgit2 . jagged . Obje... | org . junit . Assert . assertTrue ( caught ) |
withEmptyList ( ) { "<AssertPlaceHolder>" ; } isPalindrome ( linkedlist . LinkedListNode ) { if ( head == null ) return true ; java . util . Stack < java . lang . Integer > stack = new java . util . Stack ( ) ; linkedlist . LinkedListNode cur = head ; while ( cur != null ) { stack . push ( cur . val ) ; cur = cur . nex... | org . junit . Assert . assertTrue ( s . isPalindrome ( linkedlist . LinkedListNode . empty ( ) ) ) |
resolveRefOverlap ( ) { org . opencb . biodata . models . variant . Variant a = org . opencb . opencga . storage . hadoop . variant . archive . mr . VariantLocalConflictResolverTest . getVariant ( "2:10048155-10048156:" , "PASS" , "220" , "0/0" ) ; a . setType ( org . opencb . opencga . storage . hadoop . variant . arc... | org . junit . Assert . assertEquals ( 1 , resolved . size ( ) ) |
testTXInsertionInExonReverse ( ) { de . charite . compbio . jannovar . reference . GenomeVariant change = new de . charite . compbio . jannovar . reference . GenomeVariant ( new de . charite . compbio . jannovar . reference . GenomePosition ( de . charite . compbio . jannovar . reference . TranscriptSequenceChangeHelpe... | org . junit . Assert . assertEquals ( expectedBuilder . toString ( ) , resultTranscript ) |
itDeletesDocumentIfValid ( ) { final javax . ws . rs . core . Response response = resource . delete ( request , credentials , "bob" , "document1.txt" ) ; "<AssertPlaceHolder>" . isEqualTo ( Status . NO_CONTENT . getStatusCode ( ) ) ; verify ( documentDAO ) . delete ( document ) ; } delete ( javax . ws . rs . core . Req... | org . junit . Assert . assertThat ( response . getStatus ( ) ) |
testSingleton ( ) { java . lang . Object o = new java . lang . Object ( ) ; org . apache . tuscany . sca . implementation . java . injection . SingletonObjectFactory < java . lang . Object > factory = new org . apache . tuscany . sca . implementation . java . injection . SingletonObjectFactory < java . lang . Object > ... | org . junit . Assert . assertEquals ( o , factory . getInstance ( ) ) |
testAsChars ( ) { org . apache . tajo . datum . Datum d = org . apache . tajo . datum . DatumFactory . createChar ( "1234567890" ) ; "<AssertPlaceHolder>" ; } asChars ( ) { throw new org . apache . tajo . datum . exception . InvalidCastException ( ( ( type ) + "<sp>cannot<sp>be<sp>casted<sp>to<sp>STRING<sp>type" ) ) ; ... | org . junit . Assert . assertEquals ( "1234567890" , d . asChars ( ) ) |
testGetLatestDemographic ( ) { org . oscarehr . common . model . DemographicExt entity = new org . oscarehr . common . model . DemographicExt ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( entity ) ; entity . setKey ( "Test" ) ; entity . setDemographicNo ( 20 ) ; ent... | org . junit . Assert . assertEquals ( newerEntity . getId ( ) , foundEntity . getId ( ) ) |
unchanged ( ) { final org . apache . isis . core . runtime . services . changes . PreAndPostValues papv = org . apache . isis . core . runtime . services . changes . PreAndPostValues . pre ( "Foo" ) ; papv . setPost ( "Foo" ) ; "<AssertPlaceHolder>" ; } shouldAudit ( ) { if ( ( ( getPre ( ) ) == ( IsisTransaction . Pla... | org . junit . Assert . assertFalse ( papv . shouldAudit ( ) ) |
getRealm ( ) { com . ibm . websphere . simplicity . log . Log . info ( com . ibm . ws . security . wim . adapter . ldap . fat . URAPIs_PropertiesNotSupportedTest . c , "getRealm" , "Checking<sp>expected<sp>realm" ) ; "<AssertPlaceHolder>" ; } getRealm ( ) { com . ibm . websphere . simplicity . log . Log . info ( com . ... | org . junit . Assert . assertEquals ( "TDSRealm" , com . ibm . ws . security . wim . adapter . ldap . fat . URAPIs_PropertiesNotSupportedTest . servlet . getRealm ( ) ) |
refresh_sharp_keep_eternalAfterRefresh ( ) { final int KEY = 1 ; final org . cache2k . test . core . expiry . CountingLoader _LOADER = new org . cache2k . test . core . expiry . CountingLoader ( ) ; final org . cache2k . Cache < java . lang . Integer , java . lang . Integer > c = builder ( org . cache2k . test . core .... | org . junit . Assert . assertEquals ( 0 , v ) |
testQueryAndPatch ( ) { org . glassfish . json . tests . JsonCollectorTest . index = - 1 ; javax . json . JsonPatchBuilder builder = javax . json . Json . createPatchBuilder ( ) ; org . glassfish . json . tests . JsonCollectorTest . contacts . getValuesAs ( javax . json . JsonObject . class ) . stream ( ) . peek ( ( p ... | org . junit . Assert . assertEquals ( expected , result ) |
comparisonAscendingCompactedListTest ( ) { org . apache . druid . query . scan . ScanQuery query = org . apache . druid . query . Druids . newScanQueryBuilder ( ) . order ( ScanQuery . Order . ASCENDING ) . resultFormat ( ScanQuery . ResultFormat . RESULT_FORMAT_COMPACTED_LIST ) . dataSource ( "some<sp>src" ) . interva... | org . junit . Assert . assertEquals ( 1 , comparator . compare ( s1 , s2 ) ) |
testGetUpdatedAuthorByUsername ( ) { com . iluwatar . cqrs . dto . Author author = com . iluwatar . cqrs . IntegrationTest . queryService . getAuthorByUsername ( "new_username2" ) ; com . iluwatar . cqrs . dto . Author expectedAuthor = new com . iluwatar . cqrs . dto . Author ( "new_name2" , "new_email2" , "new_usernam... | org . junit . Assert . assertEquals ( expectedAuthor , author ) |
testAliasSuggester ( ) { final org . apache . calcite . tools . RelBuilder builder = org . apache . calcite . tools . RelBuilder . create ( org . apache . calcite . test . RelBuilderTest . config ( ) . build ( ) ) ; org . apache . calcite . rel . RelNode root = builder . scan ( "EMP" ) . project ( builder . field ( 0 )... | org . junit . Assert . assertThat ( root , org . apache . calcite . test . Matchers . hasTree ( expected ) ) |
testFilterString18 ( ) { java . lang . String filter = ( org . opennms . features . topology . plugins . topo . asset . layers . NodeParamLabels . NODE_CATEGORIES ) + "=~.*4,category3" ; java . lang . String expected = "nodeList:{<sp>[0]<sp>[1]<sp>[2]<sp>[3]<sp>[4]<sp>[5]<sp>[6]<sp>[7]<sp>[8]<sp>[9]<sp>}" ; org . openn... | org . junit . Assert . assertEquals ( expected , s2 ) |
test_param_names_putall_map ( ) { org . nutz . dao . impl . sql . NutSql sql = org . nutz . dao . impl . sql . SqlLiteralTest . L ( "INSERT<sp>INTO<sp>t_pet($id,$name,$alias,$age)<sp>VALUES(@id,@name,@nickName,@age)" ) ; java . util . Map < java . lang . String , java . lang . Object > map = new java . util . HashMap <... | org . junit . Assert . assertEquals ( expect , sql . toString ( ) ) |
should_get_name ( ) { "<AssertPlaceHolder>" ; } getName ( ) { return "Demo<sp>Plugin" ; } | org . junit . Assert . assertEquals ( "Demo<sp>Plugin" , plugin . getName ( ) ) |
testIsUniqueIteratorExp01 ( ) { testpackage . Class1 class1 ; class1 = new testpackage . Class1 ( ) ; "<AssertPlaceHolder>" ; } testIsUniqueIteratorExp01 ( ) { testpackage . Class1 class1 ; class1 = new testpackage . Class1 ( ) ; org . junit . Assert . assertTrue ( class1 . testIsUniqueIteratorExp01 ( ) ) ; } | org . junit . Assert . assertTrue ( class1 . testIsUniqueIteratorExp01 ( ) ) |
testDefined ( ) { com . github . caldav4j . model . request . ParamFilter p = new com . github . caldav4j . model . request . ParamFilter ( ) ; p . setName ( "testDefined" ) ; "<AssertPlaceHolder>" ; p . setDefined ( true ) ; try { p . validate ( ) ; log . info ( com . github . caldav4j . util . XMLUtils . prettyPrint ... | org . junit . Assert . assertEquals ( p . getName ( ) , "testDefined" ) |
testExecutePayload ( ) { java . lang . String wd = ".bat" 4 ; java . lang . String cmd = wd + "/command_payload" ; if ( java . lang . System . getProperty ( ".bat" 1 ) . contains ( "Windows" ) ) { cmd += ".bat" ; } else { cmd += ".sh" ; } org . eclipse . kura . cloud . app . command . CommandCloudApp cca = new org . ec... | org . junit . Assert . assertNotNull ( response ) |
testReportForFileSizeGroupByFileExtensionWithFilter ( ) { reportData = reportDao . getReportData ( filter , ReportFieldEnum . FILE_SIZE , getGroupByFieldList ( ReportFieldEnum . FILE_EXTENSION ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return size ; } | org . junit . Assert . assertTrue ( ( ( reportData . size ( ) ) > 0 ) ) |
testCheckout ( ) { org . eclipse . che . ide . ext . svn . shared . CLIOutputWithRevisionResponse response = this . subversionApi . checkout ( org . eclipse . che . dto . server . DtoFactory . getInstance ( ) . createDto ( org . eclipse . che . ide . ext . svn . shared . CheckoutRequest . class ) . withProjectPath ( tm... | org . junit . Assert . assertTrue ( ( ( response . getRevision ( ) ) > ( - 1 ) ) ) |
testHasRuntimesFalse ( ) { java . util . Collection < org . guvnor . ala . ui . model . RuntimeListItem > runtimes = mock ( java . util . Collection . class ) ; when ( runtimeService . getRuntimeItems ( providerKey ) ) . thenReturn ( runtimes ) ; when ( runtimes . isEmpty ( ) ) . thenReturn ( true ) ; "<AssertPlaceHold... | org . junit . Assert . assertFalse ( service . hasRuntimes ( providerKey ) ) |
testHasInstanceId1 ( ) { com . liferay . portal . kernel . model . PortletInstance portletInstance = com . liferay . portal . kernel . model . PortletInstance . fromPortletInstanceKey ( PortletKeys . TEST ) ; "<AssertPlaceHolder>" ; } hasInstanceId ( ) { return com . liferay . portal . kernel . util . Validator . isNot... | org . junit . Assert . assertFalse ( portletInstance . hasInstanceId ( ) ) |
shouldAllowEmptyBufferToCreateCompositeBuffer ( ) { io . netty . buffer . ByteBuf buf = wrappedBuffer ( io . netty . buffer . EMPTY_BUFFER , wrappedBuffer ( new byte [ 16 ] ) . order ( io . netty . buffer . LITTLE_ENDIAN ) , io . netty . buffer . EMPTY_BUFFER ) ; try { "<AssertPlaceHolder>" ; } finally { buf . release ... | org . junit . Assert . assertEquals ( 16 , buf . capacity ( ) ) |
testUnEncryptedNullPassword ( ) { java . security . PrivateKey key = io . netty . handler . ssl . SslContext . toPrivateKey ( io . netty . util . internal . ResourcesUtil . getFile ( getClass ( ) , "test2_unencrypted.pem" ) , null ) ; "<AssertPlaceHolder>" ; } getFile ( java . lang . Class , java . lang . String ) { tr... | org . junit . Assert . assertNotNull ( key ) |
testVerifyWhenUpdatingGroup ( ) { com . liferay . portal . kernel . model . Group group = com . liferay . portal . security . membership . policy . test . util . MembershipPolicyTestUtil . addGroup ( ) ; java . util . Map < java . util . Locale , java . lang . String > nameMap = new java . util . HashMap ( ) ; nameMap ... | org . junit . Assert . assertTrue ( isVerify ( ) ) |
testGetAllDocumentBlobsOperation ( ) { org . nuxeo . ecm . core . api . Blob mainFile = new org . nuxeo . ecm . core . api . impl . blob . StringBlob ( "blobWithName" 1 ) ; java . util . Map < java . lang . String , java . io . Serializable > file = new java . util . HashMap ( ) ; java . util . ArrayList < java . util ... | org . junit . Assert . assertEquals ( files . size ( ) , 2 ) |
refinementReversedCardinalityZeroToUnbounded ( ) { generateDrugHierarchy ( ) ; final com . b2international . index . query . Expression actual = eval ( java . lang . String . format ( "<%s:<sp>[0..*]<sp>R<sp>%s=%s" , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . SUBSTANCE , co... | org . junit . Assert . assertEquals ( expected , actual ) |
test_getSerialiser_for_hashmap_successful ( ) { java . util . HashMap < java . lang . Class , com . esotericsoftware . kryo . Serializer > serialisers = new java . util . HashMap < java . lang . Class , com . esotericsoftware . kryo . Serializer > ( ) ; serialisers . put ( java . io . File . class , new org . ikasan . ... | org . junit . Assert . assertTrue ( restored . equals ( hashMap ) ) |
testFindBestWithSingleProductSinglePoolReturnsProvidedPool ( ) { org . candlepin . model . Product product = org . candlepin . test . TestUtil . createProduct ( productId , "A<sp>test<sp>product" ) ; org . candlepin . model . Pool pool = org . candlepin . test . TestUtil . createPool ( owner , product ) ; pool . setId ... | org . junit . Assert . assertEquals ( 1 , bestPools . size ( ) ) |
deleteVolumeTestVolumeStateAllocated ( ) { org . mockito . Mockito . doReturn ( Volume . State . Allocated ) . when ( volumeVoMock ) . getState ( ) ; org . mockito . Mockito . doReturn ( volumeVoMock ) . when ( volumeApiServiceImpl ) . retrieveAndValidateVolume ( volumeMockId , accountMock ) ; org . mockito . Mockito .... | org . junit . Assert . assertTrue ( result ) |
getUserGroupsForUserWithRole ( ) { final org . oscm . usergroupservice . dao . PlatformUser testUser = createUser ( admin , false , randomString ( ) ) ; final org . oscm . usergroupservice . dao . UserGroup ug1 = createUserGroup ( randomString ( ) , admin , false , randomString ( ) , randomString ( ) , user ) ; final o... | org . junit . Assert . assertEquals ( 2 , result . size ( ) ) |
shouldCreateDecimalFromDoubleValue ( ) { "<AssertPlaceHolder>" ; } create ( java . lang . Iterable ) { final java . util . List < org . modeshape . jcr . spi . index . IndexWriter > writers = new java . util . ArrayList ( ) ; for ( org . modeshape . jcr . spi . index . provider . IndexProvider provider : providers ) { ... | org . junit . Assert . assertThat ( factory . create ( 1.0 ) , org . hamcrest . core . Is . is ( java . math . BigDecimal . valueOf ( 1.0 ) ) ) |
testValues ( ) { java . util . List < java . io . Serializable > vals = toTest . getValues ( ) ; "<AssertPlaceHolder>" ; } createValues ( ) { return new java . util . ArrayList < java . io . Serializable > ( java . util . Arrays . asList ( 0 , 1 , 2 ) ) ; } | org . junit . Assert . assertEquals ( createValues ( ) , vals ) |
testGetDynamicFieldPosition ( ) { org . apache . avro . Schema designSchema = org . apache . avro . SchemaBuilder . builder ( ) . record ( "Record" ) . prop ( DiSchemaConstants . TALEND6_DYNAMIC_COLUMN_POSITION , "4" ) . prop ( SchemaConstants . INCLUDE_ALL_FIELDS , "true" ) . fields ( ) . name ( "id" ) . type ( ) . in... | org . junit . Assert . assertEquals ( 4 , org . talend . codegen . DynamicFieldUtils . getDynamicFieldPosition ( designSchema ) ) |
isArray_A$String_true ( ) { org . junithelper . core . meta . ClassMeta classMeta = null ; org . junithelper . core . extractor . AvailableTypeDetector target = new org . junithelper . core . extractor . AvailableTypeDetector ( classMeta ) ; java . lang . String typeName = "String[]" ; boolean actual = target . isArray... | org . junit . Assert . assertEquals ( expected , actual ) |
testEquals_differentName ( ) { final java . lang . String expression = "a>b" ; config . setName ( "Claire" ) ; config . setExpr ( expression ) ; final org . esa . beam . binning . operator . VariableConfig other = new org . esa . beam . binning . operator . VariableConfig ( ) ; other . setName ( "Paul" ) ; other . setE... | org . junit . Assert . assertFalse ( config . equals ( other ) ) |
test ( ) { java . util . List < com . splout . db . common . PartitionEntry > entries = new java . util . ArrayList < com . splout . db . common . PartitionEntry > ( ) ; com . splout . db . common . PartitionEntry entry = new com . splout . db . common . PartitionEntry ( ) ; entry . setMax ( "a" ) ; entry . setMin ( "b... | org . junit . Assert . assertEquals ( map2 . getPartitionEntries ( ) . toString ( ) , map . getPartitionEntries ( ) . toString ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.