input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testGetNewDataTypeHashWhenReferenceDataTypeHashIsEmpty ( ) { final org . kie . workbench . common . dmn . client . editors . types . common . DataType newDataType = mock ( org . kie . workbench . common . dmn . client . editors . types . common . DataType . class ) ; final java . lang . String newDataTypeName = "value"... | org . junit . Assert . assertEquals ( expectedHash , actualHash ) |
testLanguageCodeConversion ( ) { java . lang . String [ ] from1 = new java . lang . String [ ] { "aa" , "kw" , "gd" , "mh" } ; java . lang . String [ ] to2 = new java . lang . String [ ] { "aar" , "cor" , "gla" , "mah" } ; for ( int i = 0 ; i < ( from1 . length ) ; i ++ ) { java . lang . String from = from1 [ i ] ; jav... | org . junit . Assert . assertTrue ( code . getLanguageCode ( ) . equals ( to ) ) |
driver_accepts_01 ( ) { java . lang . String url = this . getConnectionUrl ( ) ; org . junit . Assume . assumeNotNull ( url ) ; org . apache . jena . jdbc . JenaDriver driver = this . getDriver ( ) ; "<AssertPlaceHolder>" ; } acceptsURL ( java . lang . String ) { if ( url . startsWith ( ( ( org . apache . jena . jdbc .... | org . junit . Assert . assertTrue ( driver . acceptsURL ( url ) ) |
testZijnVerwantBuitenland ( ) { org . mockito . Mockito . when ( brby0001 . isErVerwantschap ( org . mockito . Matchers . any ( nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView . class ) , org . mockito . Matchers . any ( nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView . cla... | org . junit . Assert . assertEquals ( 0 , resultaat . size ( ) ) |
test_evaluate_array_strings ( ) { org . junit . Assume . assumeFalse ( webkit1SkipMsg ( ) , isWebkit1 ) ; final java . util . concurrent . atomic . AtomicReferenceArray < java . lang . String > atomicStringArray = new java . util . concurrent . atomic . AtomicReferenceArray ( 3 ) ; atomicStringArray . set ( 0 , "execut... | org . junit . Assert . assertTrue ( message , passed ) |
testSimpleLoops ( ) { org . antlr . tool . Grammar g = new org . antlr . tool . Grammar ( ( "lexer<sp>grammar<sp>t;\n" + "A<sp>:<sp>(\'0\'..\'9\')+<sp>\'.\'<sp>(\'0\'..\'9\')*<sp>|<sp>(\'0\'..\'9\')+<sp>;\n" ) ) ; final int Atype = g . getTokenType ( "A" ) ; org . antlr . runtime . CharStream input = new org . antlr . ... | org . junit . Assert . assertEquals ( Atype , result . getType ( ) ) |
whenMultipleListenersAdded_thenTheyAreAddedInOrder ( ) { org . multiverse . api . lifecycle . TxnListener listener1 = mock ( org . multiverse . api . lifecycle . TxnListener . class ) ; org . multiverse . api . lifecycle . TxnListener listener2 = mock ( org . multiverse . api . lifecycle . TxnListener . class ) ; org .... | org . junit . Assert . assertEquals ( asList ( listener1 , listener2 ) , listeners ) |
testSetDestName ( ) { conf . setDestinationName ( "dest_name1" ) ; "<AssertPlaceHolder>" ; } getDestinationName ( ) { return destinationName ; } | org . junit . Assert . assertEquals ( "dest_name1" , conf . getDestinationName ( ) ) |
testForEach ( ) { ch . lambdaj . collection . LambdaList < ch . lambdaj . collection . Person > personInFamily = ch . lambdaj . collection . LambdaCollections . with ( new ch . lambdaj . collection . Person ( "Domenico" ) , new ch . lambdaj . collection . Person ( "Mario" ) , new ch . lambdaj . collection . Person ( "I... | org . junit . Assert . assertEquals ( "Fusco" , person . getLastName ( ) ) |
testGetSubscribingToComponent1 ( java . lang . String , java . lang . String , java . util . Map , org . apache . commons . configuration . Configuration ) { int subscribedBoltNumber = 0 ; new com . boozallen . cognition . ingest . storm . topology . Expectations ( ) { { boltConf . getInt ( com . boozallen . cognition ... | org . junit . Assert . assertThat ( result , org . hamcrest . core . Is . is ( subscribedBolt ) ) |
shouldHandleMissingBucketUuid ( ) { java . lang . String raw = com . couchbase . client . core . util . Resources . read ( "config_without_uuid.json" , getClass ( ) ) ; com . couchbase . client . core . config . CouchbaseBucketConfig config = ( ( com . couchbase . client . core . config . CouchbaseBucketConfig ) ( com ... | org . junit . Assert . assertNull ( config . uuid ( ) ) |
shouldAcceptAllValidPolicyKeys ( ) { org . neo4j . kernel . configuration . ssl . SslPolicyConfigValidator validator = new org . neo4j . kernel . configuration . ssl . SslPolicyConfigValidator ( ) ; java . util . Map < java . lang . String , java . lang . String > originalParams = org . neo4j . kernel . configuration .... | org . junit . Assert . assertEquals ( originalParams , validatedParams ) |
testSymlinkTarget ( ) { final ch . cyberduck . core . Path file = new ch . cyberduck . core . Path ( "/f1/f2/s.txt" , java . util . EnumSet . of ( Path . Type . file , Path . Type . symboliclink ) ) ; file . setSymlinkTarget ( new ch . cyberduck . core . Path ( "/f1/f2/t.txt" , java . util . EnumSet . of ( Path . Type ... | org . junit . Assert . assertEquals ( new ch . cyberduck . core . Path ( "/f1/f2/t.txt" , java . util . EnumSet . of ( Path . Type . file ) ) , editor . getRemote ( ) ) |
testCreateFile ( ) { System . out . println ( "Testing<sp>HDFSBackendImpl.createFile" ) ; try { backend . setFSGetter ( mockFSGetter ) ; backend . createFile ( dirPath , data ) ; } catch ( java . lang . Exception e ) { org . junit . Assert . fail ( e . getMessage ( ) ) ; } finally { "<AssertPlaceHolder>" ; } createFile... | org . junit . Assert . assertTrue ( true ) |
testConstructor ( ) { org . pentaho . platform . web . http . api . resources . JobRequest jr = new org . pentaho . platform . web . http . api . resources . JobRequest ( ) ; jr . setJobId ( "jobId" ) ; "<AssertPlaceHolder>" ; } getJobId ( ) { return jobId ; } | org . junit . Assert . assertEquals ( "jobId" , jr . getJobId ( ) ) |
testname ( ) { javax . persistence . Query query = entityManager . createQuery ( "select<sp>p<sp>from<sp>Person<sp>p" ) ; "<AssertPlaceHolder>" ; } getResultList ( ) { log . info ( "load<sp>blog<sp>entries" ) ; if ( ( resultList ) == null ) { resultList = blogEntryDao . find ( de . akquinet . jbosscc . blog . BlogEntry... | org . junit . Assert . assertEquals ( 3 , query . getResultList ( ) . size ( ) ) |
testCreatingVEventWithUrlProperty ( ) { org . sakaiproject . calendar . api . CalendarEventEdit event = generateEvent ( ) ; java . lang . String uuid = java . util . UUID . randomUUID ( ) . toString ( ) ; event . setField ( "vevent_url" , "http://www.fake.com" ) ; net . fortuna . ical4j . model . component . VEvent vev... | org . junit . Assert . assertNotNull ( vevent ) |
DeclarationExceptionThrows ( ) { java . lang . String fromClass = "Domain.Direct.Violating.DeclarationExceptionThrows" ; java . lang . String toClass = "Technology.Direct.Dao.StaticsException" ; java . util . ArrayList < java . lang . String > typesToFind = new java . util . ArrayList < java . lang . String > ( ) ; typ... | org . junit . Assert . assertTrue ( areDependencyTypesDetected ( fromClass , toClass , typesToFind , false ) ) |
testProcessSessionIds_none ( ) { hudson . plugins . sauce_ondemand . SauceOnDemandBuildAction sauceOnDemandBuildAction ; java . util . LinkedList < hudson . plugins . sauce_ondemand . TestIDDetails > details = hudson . plugins . sauce_ondemand . SauceOnDemandReportPublisher . processSessionIds ( null , new java . lang ... | org . junit . Assert . assertTrue ( details . isEmpty ( ) ) |
testAcceptForWindows ( ) { com . eclipsesource . tabris . test . util . TabrisRequest request = environment . getRequest ( ) ; request . setHeader ( Constants . USER_AGENT , Constants . ID_WINDOWS ) ; "<AssertPlaceHolder>" ; } accept ( javax . servlet . http . HttpServletRequest ) { java . lang . String platform = getP... | org . junit . Assert . assertTrue ( provider . accept ( request ) ) |
testNullTypes ( ) { com . google . common . util . concurrent . ListenableFuture < java . lang . String > nullable = com . google . common . util . concurrent . Futures . immediateFuture ( null ) ; com . spotify . futures . JoinedResults joined = com . spotify . futures . FuturesExtra . join ( com . google . common . u... | org . junit . Assert . assertEquals ( null , joined . get ( nullable ) ) |
testNoFrontendUrlWithMultipleUrl ( ) { java . util . Map < java . net . URI , java . net . URI > emptyMap = new java . util . HashMap ( ) ; when ( graphiteSources . getIpportsByUrl ( ) ) . thenReturn ( new java . util . HashMap ( ) ) ; when ( this . graphiteSources . getSources ( ) ) . thenReturn ( java . util . stream... | org . junit . Assert . assertEquals ( null , backendAlarm . getGraphiteBaseUrl ( ) ) |
testErrorInValidateCallback ( ) { java . util . Properties p2 = new java . util . Properties ( ) ; p2 . put ( "instance.name" , "error" ) ; instance = ipojoHelper . createComponentInstance ( "LFCB-CallbackWithError" , p2 ) ; org . osgi . framework . ServiceReference ref = osgiHelper . getServiceReference ( org . apache... | org . junit . Assert . assertNull ( ref ) |
testApplySpeedSingle ( ) { int size = 1000 ; final java . util . List < org . opencb . biodata . models . variant . protobuf . VcfSliceProtos . VcfSlice > lst = new java . util . ArrayList ( ) ; org . opencb . commons . io . DataWriter < org . opencb . biodata . models . variant . protobuf . VcfSliceProtos . VcfSlice >... | org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( ( 2 * 10 ) ) , java . lang . Integer . valueOf ( lst . size ( ) ) ) |
testGetMoreResults ( ) { org . apache . calcite . avatica . AvaticaResultSet resultSet = mock ( org . apache . calcite . avatica . AvaticaResultSet . class ) ; statement . openResultSet = resultSet ; doCallRealMethod ( ) . when ( statement ) . onResultSetClose ( any ( java . sql . ResultSet . class ) ) ; when ( stateme... | org . junit . Assert . assertFalse ( statement . getMoreResults ( ) ) |
testGetTagTypes ( ) { java . util . List < org . finra . herd . model . jpa . TagTypeEntity > tagTypeEntities = java . util . Arrays . asList ( tagTypeDaoTestHelper . createTagTypeEntity ( tagTypeDaoTestHelper . getTestTagTypeKeys ( ) . get ( 0 ) . getTagTypeCode ( ) , org . finra . herd . dao . TAG_TYPE_DISPLAY_NAME ,... | org . junit . Assert . assertEquals ( tagTypeEntities , resultTagTypeEntities ) |
testGetDeclaredFields ( ) { final java . util . List < java . lang . String > expectedFields = com . google . common . collect . Lists . newLinkedList ( ) ; expectedFields . add ( ( ( ( org . jboss . errai . codegen . test . model . tree . Child . class . getCanonicalName ( ) ) + "." ) + "childPrivate" ) ) ; expectedFi... | org . junit . Assert . assertEquals ( expectedFields . toString ( ) , actualFields . toString ( ) ) |
testIsConsumed_afterMarkingAsConsumed_isTrue ( ) { final org . edx . mobile . event . NewVersionAvailableEvent event = new org . edx . mobile . event . NewVersionAvailableEvent ( newVersion , lastSupportedDate , isUnsupported ) ; event . markAsConsumed ( ) ; "<AssertPlaceHolder>" ; } isConsumed ( ) { return isConsumed ... | org . junit . Assert . assertTrue ( event . isConsumed ( ) ) |
testWithKeystoreAndAlias ( ) { at . favre . tools . apksigner . ui . Arg parsedArg = at . favre . tools . apksigner . ui . CLIParser . parse ( at . favre . tools . apksigner . ui . CLIParserTest . asArgArray ( ( ( "-" + ( CLIParser . ARG_APK_FILE ) ) + "<sp>./<sp>--ks<sp>my-keystore.jks<sp>--ksAlias<sp>debugAlias" ) ) ... | org . junit . Assert . assertEquals ( expectedArg , parsedArg ) |
strategiesSupport ( ) { com . avanza . astrix . modules . ModulesConfigurer modulesConfigurer = new com . avanza . astrix . modules . ModulesConfigurer ( ) ; modulesConfigurer . register ( new com . avanza . astrix . modules . Module ( ) { @ com . avanza . astrix . modules . test . Override public void prepare ( com . ... | org . junit . Assert . assertEquals ( "foo" , ping . ping ( "foo" ) ) |
testNoSpecialConfig ( ) { java . util . Properties props = new java . util . Properties ( ) ; org . wildfly . core . embedded . EmbeddedStandaloneServerFactory . setupCleanDirectories ( standardJBossHome , props ) ; "<AssertPlaceHolder>" ; } size ( ) { return definitions . size ( ) ; } | org . junit . Assert . assertEquals ( 0 , props . size ( ) ) |
testSLT_4 ( ) { org . ethereum . vm . VM vm = new org . ethereum . vm . VM ( ) ; program = new org . ethereum . vm . Program ( org . spongycastle . util . encoders . Hex . decode ( ( "7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF56" + "0D" ) ) , invoke ) ; try { vm . step ( program ) ; vm . step ( pr... | org . junit . Assert . assertTrue ( program . isStopped ( ) ) |
testRangeReadOnly_REPLICA ( ) { org . neo4j . graphdb . GraphDatabaseService db = getOneReplicaDatabase ( ) ; org . neo4j . graphdb . Result execute = db . execute ( "CALL<sp>ga.timetree.range({start:<sp>1463659567468,<sp>end:<sp>1463859569504,<sp>create:<sp>false})" ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertFalse ( execute . hasNext ( ) ) |
testShow ( ) { java . lang . String uid = java . lang . System . getProperty ( "weibo.uid" ) ; com . belerweb . social . bean . Result < com . belerweb . social . weibo . bean . User > result = weibo . getUser ( ) . show ( weibo . getClientId ( ) , null , uid , null ) ; "<AssertPlaceHolder>" ; com . belerweb . social .... | org . junit . Assert . assertTrue ( result . success ( ) ) |
testReferentialConstraint_false ( ) { org . seasar . extension . jdbc . EntityMeta entityMeta = entityMetaFactory . getEntityMeta ( org . seasar . extension . jdbc . gen . internal . desc . ForeignKeyDescFactoryImplTest . Ddd . class ) ; org . seasar . extension . jdbc . gen . desc . ForeignKeyDesc foreignKeyDesc = for... | org . junit . Assert . assertNull ( foreignKeyDesc ) |
testDoStripHeader ( ) { java . lang . StringBuffer sb = new java . lang . StringBuffer ( ) ; sb . append ( "name,phone,zip\n" ) ; sb . append ( "Joe,phone,95121\n" ) ; sb . append ( "Sally,phone,95121\n" ) ; sb . append ( "Sam,phone,95120\n" ) ; sb . append ( "Michael,phone,94550\n" ) ; long bytes = headerSupport . fin... | org . junit . Assert . assertEquals ( 15 , bytes ) |
getView ( ) { org . drools . workbench . screens . scenariosimulation . client . editor . menu . BaseMenuView retrieved = baseMenu . getView ( ) ; "<AssertPlaceHolder>" ; } getView ( ) { return view ; } | org . junit . Assert . assertNotNull ( retrieved ) |
testExceptions1 ( ) { java . lang . String imei = "" ; try { imei = edu . columbia . cs . psl . test . phosphor . DroidBenchObjTagITCase . taintedString ( "abcde1" ) ; throw new java . lang . RuntimeException ( ) ; } catch ( java . lang . RuntimeException ex ) { "<AssertPlaceHolder>" ; } } getTaint ( java . lang . Stri... | org . junit . Assert . assertTrue ( ( ( edu . columbia . cs . psl . test . phosphor . DroidBenchObjTagITCase . getTaint ( imei ) ) != 0 ) ) |
testHas10 ( ) { java . lang . String perm = "test.test1.test2" ; java . util . List < java . lang . String > perms = new java . util . ArrayList ( ) ; perms . add ( "test.test1.test2" ) ; perms . add ( "-test.*" ) ; perms . add ( "test.*" ) ; "<AssertPlaceHolder>" ; } has ( java . util . List , java . lang . String ) {... | org . junit . Assert . assertTrue ( resolver . has ( perms , perm ) ) |
pickDocument ( ) { eu . dnetlib . iis . citationmatching . direct . schemas . DocumentMetadata firstDocument = new eu . dnetlib . iis . citationmatching . direct . schemas . DocumentMetadata ( "id-1" , null , null , com . google . common . collect . Lists . newArrayList ( ) ) ; eu . dnetlib . iis . citationmatching . d... | org . junit . Assert . assertEquals ( firstDocument , retDocument ) |
testGetCharset_2 ( ) { org . jinstagram . http . Request fixture = new org . jinstagram . http . Request ( Verbs . DELETE , "" ) ; fixture . setConnectionKeepAlive ( true ) ; fixture . setCharset ( ( ( java . lang . String ) ( null ) ) ) ; fixture . addPayload ( "Dummy<sp>payload" ) ; fixture . setConnection ( mockHttp... | org . junit . Assert . assertNotNull ( result ) |
testRollupWithoutConversionToDistinct ( ) { java . lang . String sqlText = format ( ( "select<sp>a1<sp>from<sp>t1<sp>--splice-properties<sp>useSpark=%s\n" + "group<sp>by<sp>rollup(a1)<sp>order<sp>by<sp>1" ) , this . useSparkString ) ; java . sql . ResultSet rs = methodWatcher . executeQuery ( sqlText ) ; java . lang . ... | org . junit . Assert . assertEquals ( ( ( "\n" + sqlText ) + "\n" ) , expected , TestUtils . FormattedResult . ResultFactory . toStringUnsorted ( rs ) ) |
testCheckoutOfFileWithInexistentParentDir ( ) { java . io . File a = writeTrashFile ( "dir/a.txt" , "A" ) ; writeTrashFile ( "dir/b.txt" , "A" ) ; git . add ( ) . addFilepattern ( "dir/a.txt" ) . addFilepattern ( "dir/b.txt" ) . call ( ) ; git . commit ( ) . setMessage ( "Added<sp>dir" ) . call ( ) ; java . io . File d... | org . junit . Assert . assertTrue ( a . exists ( ) ) |
testCacheResourceLayer ( ) { org . geoserver . catalog . LayerInfo layer = addLayer ( ) ; org . geoserver . catalog . ResourceInfo resourceInfo = database . getById ( layer . getResource ( ) . getId ( ) , org . geoserver . catalog . ResourceInfo . class ) ; resourceInfo . setName ( "rs2" ) ; testSaved ( resourceInfo ) ... | org . junit . Assert . assertEquals ( "rs2" , layer . getResource ( ) . getName ( ) ) |
test_addResourceBundle ( ) { messageResolver . addResourceBundle ( java . util . ResourceBundle . getBundle ( "com.gh.mygreen.xlsmapper.validation.beanvalidation.OtherElMessages" , new com . gh . mygreen . xlsmapper . localization . EncodingControl ( "UTF-8" ) ) ) ; java . util . Optional < java . lang . String > messa... | org . junit . Assert . assertThat ( message ) |
testGetTaggedMetricNull2 ( ) { registry . taggedCounter ( "foo" , tags ) ; "<AssertPlaceHolder>" ; } getTaggedMetric ( java . lang . String , java . util . Map ) { final com . codahale . metrics . Timer . Context context = timeToFindMetric . time ( ) ; for ( Map . Entry < java . lang . String , com . codahale . metrics... | org . junit . Assert . assertEquals ( null , registry . getTaggedMetric ( "foo" , null ) ) |
testDecodeGeneralizedTimeWithNegTimeZoneWithFracSec ( ) { java . util . Calendar cal = java . util . Calendar . getInstance ( ) ; cal . clear ( ) ; cal . set ( Calendar . YEAR , 2010 ) ; cal . set ( Calendar . MONTH , Calendar . JULY ) ; cal . set ( Calendar . DAY_OF_MONTH , 12 ) ; cal . set ( Calendar . HOUR_OF_DAY , ... | org . junit . Assert . assertEquals ( expectedDate , actualDate ) |
getRedenVerkrijgingNlTestOK ( ) { final java . lang . String rvnCode = "000" ; final nl . bzk . algemeenbrp . dal . domein . brp . entity . RedenVerkrijgingNLNationaliteit expectedRvn = new nl . bzk . algemeenbrp . dal . domein . brp . entity . RedenVerkrijgingNLNationaliteit ( rvnCode , "000" ) ; final java . lang . S... | org . junit . Assert . assertEquals ( expected , resultRvn ) |
testNextBatchSelectionWithMaxedParams ( ) { try ( org . apache . kafka . common . record . FileRecords fileRecords = org . apache . kafka . common . record . FileRecords . open ( tempFile ( ) ) ) { org . apache . kafka . common . record . FileLogInputStream logInputStream = new org . apache . kafka . common . record . ... | org . junit . Assert . assertNull ( logInputStream . nextBatch ( ) ) |
testGetParameters ( ) { java . lang . String field1 = "field1" ; java . lang . String value1 = "value1" ; java . util . Map < java . lang . String , java . lang . String > pathVariables = new java . util . HashMap ( ) ; pathVariables . put ( field1 , value1 ) ; java . util . Map < java . lang . String , java . lang . S... | org . junit . Assert . assertEquals ( expected , actual ) |
testClientLeakDetected ( ) { long initialLeakedClients = org . apache . druid . client . cache . MemcacheClientPool . leakedClients ( ) ; createDanglingClient ( ) ; for ( int i = 0 ; ( i < 6000 ) && ( ( org . apache . druid . client . cache . MemcacheClientPool . leakedClients ( ) ) == initialLeakedClients ) ; i ++ ) {... | org . junit . Assert . assertEquals ( ( initialLeakedClients + 1 ) , org . apache . druid . client . cache . MemcacheClientPool . leakedClients ( ) ) |
testUpdateCountSingle ( ) { java . sql . Statement stmt = sharedConnection . createStatement ( ) ; stmt . execute ( "select<sp>1" ) ; "<AssertPlaceHolder>" ; } getUpdateCount ( ) { if ( ( ( ( results ) != null ) && ( ( results . getCmdInformation ( ) ) != null ) ) && ( ! ( results . isBatch ( ) ) ) ) { return results .... | org . junit . Assert . assertTrue ( ( ( - 1 ) == ( stmt . getUpdateCount ( ) ) ) ) |
shouldEvaluate0N ( ) { com . spotify . flo . Task < java . lang . String > task = com . spotify . flo . Task . named ( "InContext" ) . ofType ( java . lang . String . class ) . process ( ( ) -> "constant" ) ; com . spotify . flo . AwaitValue < java . lang . String > val = new com . spotify . flo . AwaitValue ( ) ; com ... | org . junit . Assert . assertThat ( val . awaitAndGet ( ) , org . hamcrest . Matchers . is ( "constant" ) ) |
test ( ) { org . apache . commons . math . genetics . GeneticAlgorithm ga = new org . apache . commons . math . genetics . GeneticAlgorithm ( new org . apache . commons . math . genetics . OnePointCrossover < java . lang . Integer > ( ) , org . apache . commons . math . genetics . GeneticAlgorithmTestPermutations . CRO... | org . junit . Assert . assertTrue ( ( ( bestFinal . compareTo ( bestInitial ) ) > 0 ) ) |
testDoubleConstructor ( ) { final org . apache . isis . applib . value . Money m1 = new org . apache . isis . applib . value . Money ( 100.15 , "pds" ) ; "<AssertPlaceHolder>" ; } doubleValue ( ) { return value ; } | org . junit . Assert . assertEquals ( 100.15 , m1 . doubleValue ( ) , 0.0 ) |
testExtract ( ) { logger . info ( "extract" ) ; java . lang . String text = "this<sp>is<sp>a<sp>text<sp>sequence<sp>that<sp>is<sp>amazing<sp>text<sp>sequence" ; com . datumbox . framework . core . common . text . extractors . WordSequenceExtractor instance = new com . datumbox . framework . core . common . text . extra... | org . junit . Assert . assertEquals ( expResult , result ) |
testGivenMTLSellWithOneLOBuyWhenQuantityOfMTLOrderIsBigger ( ) { vn . com . vndirect . exchangesimulator . model . NewOrderSingle order = vn . com . vndirect . exchangesimulator . matching . OrderFactory . createLOBuy ( "VND" , 1000 , 13000 ) ; sm . push ( order ) ; vn . com . vndirect . exchangesimulator . model . New... | org . junit . Assert . assertEquals ( 3 , reports . size ( ) ) |
testToProtoAndBack ( ) { org . apache . beam . sdk . transforms . windowing . Trigger trigger = toProtoAndBackSpec . getTrigger ( ) ; org . apache . beam . sdk . transforms . windowing . Trigger toProtoAndBackTrigger = org . apache . beam . runners . core . construction . TriggerTranslation . fromProto ( org . apache .... | org . junit . Assert . assertThat ( toProtoAndBackTrigger , org . hamcrest . Matchers . equalTo ( trigger ) ) |
testFromCollection_IsEmpty_False ( ) { java . util . Collection < com . googlecode . cqengine . testutil . Car > collection = mock ( java . util . Collection . class ) ; when ( collection . isEmpty ( ) ) . thenReturn ( false ) ; com . googlecode . cqengine . persistence . support . ObjectSet < com . googlecode . cqengi... | org . junit . Assert . assertEquals ( false , objectSet . isEmpty ( ) ) |
severityNullTest ( ) { org . marc . everest . rmim . uv . cdar2 . pocd_mt000040uv . EntryRelationship entryRelationship = org . oscarehr . e2e . model . export . body . AllergiesModelTest . nullAllergiesModel . getSeverity ( ) ; "<AssertPlaceHolder>" ; } getSeverity ( ) { return new org . oscarehr . e2e . model . expor... | org . junit . Assert . assertNotNull ( entryRelationship ) |
executorForcefullyShutdownIfStoreScanFails ( ) { org . neo4j . kernel . impl . api . index . IndexStoreView storeView = mock ( org . neo4j . kernel . impl . api . index . IndexStoreView . class ) ; org . neo4j . kernel . impl . api . index . StoreScan < java . lang . Exception > failingStoreScan = mock ( org . neo4j . ... | org . junit . Assert . assertSame ( scanError , t ) |
testSimpleGetWithCustomProvider ( ) { driver . addExpectation ( onRequestTo ( "/test" ) . withMethod ( com . eclipsesource . jaxrs . consumer . GET ) , giveResponse ( "get" , javax . ws . rs . core . MediaType . TEXT_PLAIN ) ) ; com . eclipsesource . jaxrs . consumer . test . TestUtil . CustomType content = resource . ... | org . junit . Assert . assertEquals ( "get" , content . getValue ( ) ) |
testSizeIsZeroIfTreeEmpty ( ) { "<AssertPlaceHolder>" ; } create ( int , int ) { com . github . davidmoten . rtree . RTree < java . lang . Object , com . github . davidmoten . rtree . geometry . Rectangle > tree = com . github . davidmoten . rtree . RTree . maxChildren ( maxChildren ) . create ( ) ; for ( int i = 1 ; i... | org . junit . Assert . assertEquals ( 0 , com . github . davidmoten . rtree . RTreeTest . create ( 3 , 0 ) . size ( ) ) |
equal_self ( ) { final net . ripe . db . whois . update . domain . NicHandle nicHandle = net . ripe . db . whois . update . domain . NicHandle . parse ( "DW" , source , countryCodes ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == o ) return true ; if ( ( o == null ) || ( ( getClass ( ) ... | org . junit . Assert . assertTrue ( nicHandle . equals ( nicHandle ) ) |
inverseOnLists ( ) { java . util . List < org . springframework . sync . Todo > original = new java . util . ArrayList < org . springframework . sync . Todo > ( ) ; original . add ( new org . springframework . sync . Todo ( 1L , "A" , false ) ) ; original . add ( new org . springframework . sync . Todo ( 2L , "B" , fal... | org . junit . Assert . assertEquals ( modified , patched ) |
ifAcceptHeaderIsNullShouldReturnDefault ( ) { when ( request . getParameter ( "_format" ) ) . thenReturn ( null ) ; when ( request . getHeader ( "Accept" ) ) . thenReturn ( null ) ; when ( acceptHeaderToFormat . getFormat ( null ) ) . thenReturn ( "html" ) ; java . lang . String format = resolver . getAcceptFormat ( ) ... | org . junit . Assert . assertThat ( format , org . hamcrest . Matchers . is ( "html" ) ) |
testFactoryProducer ( ) { com . streamsets . pipeline . hbase . api . HBaseProducer producer = com . streamsets . pipeline . hbase . api . HBaseFactory . createProducer ( null , null , null ) ; "<AssertPlaceHolder>" ; } createProducer ( com . streamsets . pipeline . api . Stage$Context , com . streamsets . pipeline . h... | org . junit . Assert . assertNotNull ( producer ) |
extendReference ( ) { com . linkedpipes . etl . rdf . utils . pojo . FieldLoaderTest . TestClass instance = new com . linkedpipes . etl . rdf . utils . pojo . FieldLoaderTest . TestClass ( ) ; java . lang . reflect . Field field = com . linkedpipes . etl . rdf . utils . pojo . FieldLoaderTest . TestClass . class . getD... | org . junit . Assert . assertEquals ( firstReference , secondReference ) |
testEmptyNameInCurlys ( ) { javax . jcr . Node n = nameTest ( "{}foo" ) ; "<AssertPlaceHolder>" ; } getName ( ) { return journalNamePrefix ; } | org . junit . Assert . assertEquals ( "foo" , n . getName ( ) ) |
runTest ( ) { boolean result = checkNoError ( "Social_Profiles_Update_Profile_Photo" ) ; "<AssertPlaceHolder>" ; } getNoErrorMsg ( ) { return noErrorMsg ; } | org . junit . Assert . assertTrue ( getNoErrorMsg ( ) , result ) |
testWhenSomeMatch ( ) { mapOfMatchers = tech . aroma . application . service . reactions . matchers . MatchBehavior . createMatchersThatSometimesMatchFor ( message ) ; setupMatchers ( ) ; "<AssertPlaceHolder>" ; } matches ( tech . aroma . thrift . Message , java . util . List ) { if ( sir . wellington . alchemy . colle... | org . junit . Assert . assertThat ( instance . matches ( message , matchers ) , is ( false ) ) |
test ( ) { int [ ] experience = new int [ ] { 17 , 17 , 17 , 17 , 17 , 17 , 17 , 17 , 17 , 17 , 17 , 17 , 17 , 17 , 17 , 17 , 20 , 23 , 26 , 29 , 32 , 35 , 38 , 41 , 44 , 47 , 50 , 53 , 56 , 59 } ; com . comphenix . xp . parser . sections . LevelsSectionParser levelsParser = new com . comphenix . xp . parser . sections... | org . junit . Assert . assertEquals ( experience [ i ] , ( ( int ) ( rate . get ( i ) ) ) ) |
test_exec_with_stdErr ( ) { org . gridkit . util . concurrent . FutureBox < java . lang . Integer > done = execCmd ( "echo<sp>\"Hallo<sp>welt!\"<sp>1>&2\n" ) ; "<AssertPlaceHolder>" ; } get ( ) { return ( ( T ) ( org . gridkit . vicluster . MassExec . waitAll ( ( ( java . util . List ) ( futures ) ) ) . get ( 0 ) ) ) ;... | org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 0 ) , done . get ( ) ) |
testRepresentation ( ) { org . xwiki . rest . model . jaxb . Page page = getFirstPage ( ) ; org . xwiki . rest . model . jaxb . Link link = getFirstLinkByRelation ( page , Relations . SELF ) ; "<AssertPlaceHolder>" ; checkLinks ( page ) ; } getFirstLinkByRelation ( org . xwiki . rest . model . jaxb . LinkCollection , j... | org . junit . Assert . assertNotNull ( link ) |
testAnsiDecodePushbackSequenceNonTickFirstElementReturnsNull ( ) { org . owasp . esapi . codecs . PushbackSequence < java . lang . Character > mockPushback = org . mockito . Mockito . mock ( org . owasp . esapi . codecs . PushbackSequence . class ) ; org . mockito . Mockito . when ( mockPushback . next ( ) ) . thenRetu... | org . junit . Assert . assertNull ( decChar ) |
shouldParseTheNewSms ( ) { android . database . Cursor mockedCursor = mockCursorToReturn ( com . tuenti . smsradar . SmsCursorParserTest . ANY_ADDRESS , com . tuenti . smsradar . SmsCursorParserTest . NEW_DATE , com . tuenti . smsradar . SmsCursorParserTest . ANY_BODY , com . tuenti . smsradar . SmsCursorParserTest . T... | org . junit . Assert . assertEquals ( expectedSms , sms ) |
testAssertionsEnabled ( ) { java . lang . String message = "Java<sp>assertion<sp>failure" ; try { assert false : message ; org . junit . Assert . fail ( "Assertions<sp>not<sp>enabled" ) ; } catch ( java . lang . AssertionError e ) { "<AssertPlaceHolder>" ; } } getMessage ( ) { return "Unsupported<sp>Ion<sp>version<sp>"... | org . junit . Assert . assertEquals ( message , e . getMessage ( ) ) |
listTest2 ( ) { java . util . List < java . lang . Integer > agTest1 = agTest . listTest2 ( 1 ) ; "<AssertPlaceHolder>" ; } listTest2 ( java . lang . Long ) { return value ; } | org . junit . Assert . assertTrue ( ( ( agTest1 . size ( ) ) == 2 ) ) |
getVSystemTemplateName ( ) { org . apache . commons . configuration . HierarchicalConfiguration configuration = prepareConfiguration ( org . oscm . app . ror . LPlatformDescriptorTest . LPLATFORMDESCRIPTORNAME , org . oscm . app . ror . LPlatformDescriptorTest . DESCRIPTORNAME ) ; prepareDescriptor ( configuration ) ; ... | org . junit . Assert . assertEquals ( result , org . oscm . app . ror . LPlatformDescriptorTest . DESCRIPTORNAME ) |
testRemove ( ) { "<AssertPlaceHolder>" ; } of ( double [ ] , int , int ) { return one . util . streamex . DoubleStreamEx . of ( one . util . streamex . Arrays . spliterator ( array , startInclusive , endExclusive ) ) ; } | org . junit . Assert . assertArrayEquals ( new double [ ] { 1 , 2 } , one . util . streamex . DoubleStreamEx . of ( 1 , 2 , 3 ) . remove ( ( x ) -> x > 2 ) . toArray ( ) , 0.0 ) |
createRouteTarget_pojo_instanceIsCreated ( ) { com . vaadin . flow . di . Instantiator instantiator = com . vaadin . flow . spring . instantiator . SpringInstantiatorTest . getInstantiator ( context ) ; com . vaadin . flow . spring . instantiator . SpringInstantiatorTest . RouteTarget1 target1 = instantiator . createRo... | org . junit . Assert . assertNotNull ( target1 ) |
testReturnsNullContextWhenAuthenticationFails ( ) { when ( authenticationHandler . authenticate ( any ( javax . ws . rs . container . ContainerRequestContext . class ) ) ) . thenReturn ( null ) ; com . eclipsesource . jaxrs . provider . security . impl . SecurityAdmin securityAdmin = new com . eclipsesource . jaxrs . p... | org . junit . Assert . assertNull ( context ) |
givenPredicate_whenIterateArrayList_thenFindAllElementsSatisfyingPredicate ( ) { org . baeldung . java . collections . Set < java . lang . String > matchingStrings = new org . baeldung . java . collections . HashSet ( org . baeldung . java . collections . Arrays . asList ( "a" , "c" , "9" ) ) ; org . baeldung . java . ... | org . junit . Assert . assertEquals ( 6 , result . size ( ) ) |
testPerfHasEntry ( ) { org . apache . directory . api . ldap . model . name . Dn adminDn = new org . apache . directory . api . ldap . model . name . Dn ( "uid=admin,<sp>ou=system" ) ; org . apache . directory . server . core . api . interceptor . context . HasEntryOperationContext hasEntryContext = new org . apache . ... | org . junit . Assert . assertTrue ( hasEntry ) |
testGetKey ( ) { "<AssertPlaceHolder>" ; } getKey ( ) { return hashOps . getKey ( ) ; } | org . junit . Assert . assertNotNull ( map . getKey ( ) ) |
testGetIndex ( ) { classUnderTest . setIndex ( 10 ) ; "<AssertPlaceHolder>" ; } getIndex ( ) { return _ix ; } | org . junit . Assert . assertEquals ( 10 , classUnderTest . getIndex ( ) ) |
twoBitTwoExchangeTwoEntryRun ( ) { org . apache . drill . exec . server . RemoteServiceSet serviceSet = org . apache . drill . exec . server . RemoteServiceSet . getLocalServiceSet ( ) ; try ( org . apache . drill . exec . server . Drillbit bit1 = new org . apache . drill . exec . server . Drillbit ( CONFIG , serviceSe... | org . junit . Assert . assertEquals ( 200 , count ) |
should_return_false_if_wasnt_sent_this_week ( ) { br . com . caelum . timemachine . TimeMachine . goTo ( new org . joda . time . DateTime ( ) . minusDays ( 10 ) ) . andExecute ( new br . com . caelum . timemachine . Block < org . mamute . model . NewsletterSentLog > ( ) { @ org . mamute . dao . Override public org . ma... | org . junit . Assert . assertFalse ( newsletterSentLogs . wasSentThisWeek ( ) ) |
propertiesFileParsingShouldIgnoreUnknownArgumentsIfStrictModeIsFalse ( ) { liquibase . integration . commandline . Main cli = new liquibase . integration . commandline . Main ( ) ; java . lang . String [ ] args = new java . lang . String [ ] { "--strict=false" } ; cli . parseOptions ( args ) ; java . util . Properties ... | org . junit . Assert . assertEquals ( "DRIVER" , cli . driver ) |
create_object_twice ( ) { final net . ripe . db . whois . common . dao . RpslObjectUpdateInfo person = subject . createObject ( new net . ripe . db . whois . common . rpsl . RpslObject ( 1 , com . google . common . collect . ImmutableList . of ( new net . ripe . db . whois . common . rpsl . RpslAttribute ( "person" , "... | org . junit . Assert . assertThat ( person . getKey ( ) , org . hamcrest . Matchers . is ( "P1" ) ) |
testProcessTemplate8 ( ) { java . util . Map < java . lang . String , java . lang . Object > context = new java . util . HashMap ( ) ; context . put ( com . liferay . portal . template . freemarker . internal . FreeMarkerTemplateTest . _TEST_KEY , com . liferay . portal . template . freemarker . internal . FreeMarkerTe... | org . junit . Assert . assertEquals ( com . liferay . portal . template . freemarker . internal . FreeMarkerTemplateTest . _TEST_VALUE , result ) |
testAllocateWithOneResourceRequest ( ) { int testAppId = 1 ; org . apache . hadoop . yarn . api . protocolrecords . RegisterApplicationMasterResponse registerResponse = registerApplicationMaster ( testAppId ) ; "<AssertPlaceHolder>" ; getContainersAndAssert ( testAppId , 1 ) ; finishApplicationMaster ( testAppId , Fina... | org . junit . Assert . assertNotNull ( registerResponse ) |
testGetStringOnNullCell ( ) { final org . simpleflatmapper . reflect . Getter < org . simpleflatmapper . poi . test . impl . Row , java . lang . String > getter = rowGetterFactory . newGetter ( java . lang . String . class , noCellKey , CsvColumnDefinition . IDENTITY ) ; "<AssertPlaceHolder>" ; } get ( java . sql . Res... | org . junit . Assert . assertEquals ( null , getter . get ( row ) ) |
testWithoutDelete ( ) { final org . apache . oozie . fluentjob . api . action . FSActionBuilder builder = getBuilderInstance ( ) ; for ( final org . apache . oozie . fluentjob . api . action . Delete delete : org . apache . oozie . fluentjob . api . action . TestFSActionBuilder . DELETES ) { builder . withDelete ( dele... | org . junit . Assert . assertEquals ( expectedDeletes , fsAction . getDeletes ( ) ) |
kontraktorConsumes ( ) { final int NUM_MSG = 50000000 ; final akka . actor . ActorSystem system = akka . actor . ActorSystem . create ( "reactive-interop" ) ; final akka . stream . Materializer mat = akka . stream . ActorMaterializer . create ( system ) ; org . nustaq . kontraktor . reactivestreams . KxReactiveStreams ... | org . junit . Assert . assertTrue ( ( ( count . getCount ( ) ) == 0 ) ) |
testNumberLoopTemplate ( ) { freemarker . template . Template template = cfg . getTemplate ( getTemplatePath ( "numberloop.html" ) ) ; java . util . Map < java . lang . String , java . lang . Object > params = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; params . put ( GlobalVariable ... | org . junit . Assert . assertEquals ( expected , value ) |
testUnRegisterAddedItemOnEmptyModification ( ) { modifications . unregisterAddedItem ( "a" ) ; "<AssertPlaceHolder>" ; } toString ( ) { if ( ! ( isModified ( ) ) ) { return "{}" ; } else { java . lang . StringBuilder sb = new java . lang . StringBuilder ( "{" ) ; sb . append ( ( "added:<sp>" + ( addedItems . size ( ) )... | org . junit . Assert . assertEquals ( "{}" , modifications . toString ( ) ) |
testListProducts ( ) { java . util . List < ducttape . entities . Product > products = productmanager . listProducts ( ) ; "<AssertPlaceHolder>" ; } listProducts ( ) { return listProducts ( true , null ) ; } | org . junit . Assert . assertThat ( products . size ( ) , org . hamcrest . core . Is . is ( 5 ) ) |
shouldNotExtendStatelessRegion ( ) { when ( regionExecPlan . getRegionType ( ) ) . thenReturn ( cs . bilkent . joker . engine . adaptation . impl . bottleneckresolver . STATELESS ) ; final cs . bilkent . joker . engine . adaptation . AdaptationAction action = regionExtender . resolve ( regionExecPlan , bottleneckPipeli... | org . junit . Assert . assertNull ( action ) |
shouldCleanupPodWithoutRunStateAfterNonDeletePeriod ( ) { final java . lang . String name = createdPod . getMetadata ( ) . getName ( ) ; when ( k8sClient . pods ( ) . withName ( name ) ) . thenReturn ( namedPod ) ; when ( namedPod . get ( ) ) . thenReturn ( createdPod ) ; createdPod . setStatus ( podStatus ) ; when ( p... | org . junit . Assert . assertThat ( shouldDelete , org . hamcrest . Matchers . is ( true ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.