input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testIsValidDefinitionNull ( ) { org . apache . tiles . request . Request request = createMock ( org . apache . tiles . request . Request . class ) ; expect ( definitionsFactory . getDefinition ( "definition" , request ) ) . andReturn ( null ) ; replay ( applicationContext , attributeEvaluatorFactory , definitionsFactor... | org . junit . Assert . assertFalse ( container . isValidDefinition ( "definition" , request ) ) |
test_createPomCreator_nullProcessor ( ) { java . util . Map < java . lang . String , java . lang . Object > parameters = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; org . talend . core . runtime . repository . build . RepositoryObjectTypeBuildProvider provider = createTestBuildProvid... | org . junit . Assert . assertNull ( provider . createPomCreator ( parameters ) ) |
shouldSendCommandUpdateAction ( ) { com . devicehive . model . DeviceCommand command = new com . devicehive . model . DeviceCommand ( ) ; command . setCommand ( "test_command" ) ; command . setResult ( new com . devicehive . model . JsonStringWrapper ( "{\"result\":<sp>\"OK\"}" ) ) ; command . setDeviceId ( com . devic... | org . junit . Assert . assertNotNull ( response ) |
loadPreKey ( ) { final org . whispersystems . libaxolotl . state . PreKeyRecord preKey = org . whispersystems . libaxolotl . util . KeyHelper . generatePreKeys ( 0 , ANY_NUMBER ) . get ( 0 ) ; store . storePreKey ( preKey . getId ( ) , preKey ) ; final org . whispersystems . libaxolotl . state . PreKeyRecord newKey = s... | org . junit . Assert . assertArrayEquals ( preKey . serialize ( ) , newKey . serialize ( ) ) |
givenDirectedGraph_whenCreateInstanceBreadthFirstIterator_thenGetIterator ( ) { org . jgrapht . traverse . BreadthFirstIterator breadthFirstIterator = new org . jgrapht . traverse . BreadthFirstIterator ( directedGraph ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( breadthFirstIterator ) |
test ( ) { final java . util . List < nl . bzk . migratiebrp . conversie . model . lo3 . syntax . Lo3CategorieWaarde > categorieen = new nl . bzk . migratiebrp . bericht . model . lo3 . format . Lo3PersoonslijstFormatter ( ) . format ( buildLo3Persoonslijst ( ) ) ; final java . util . List < nl . bzk . migratiebrp . co... | org . junit . Assert . assertEquals ( verwachteWa11 . toString ( ) , wa11 ) |
testPullRMNodeLabelsInfo ( ) { mgr . addToCluserNodeLabelsWithDefaultExclusivity ( toSet ( "x" , "y" , "z" ) ) ; mgr . activateNode ( org . apache . hadoop . yarn . api . records . NodeId . newInstance ( "n1" , 1 ) , org . apache . hadoop . yarn . api . records . Resource . newInstance ( 10 , 0 ) ) ; mgr . activateNode... | org . junit . Assert . assertEquals ( 4 , infos . size ( ) ) |
isVisible_nodeHasNoFeature_nodeIsVisible ( ) { "<AssertPlaceHolder>" ; } isVisible ( com . vaadin . flow . internal . StateNode ) { throw new java . lang . UnsupportedOperationException ( ) ; } | org . junit . Assert . assertTrue ( tree . isVisible ( node ) ) |
testBreadthFirstTraversal ( ) { java . lang . String [ ] output = new java . lang . String [ ] { "Root" , "Leaf1" , "Child1" , "Child2" , "Leaf2" , "Child1Leaf" , "Child2Leaf1" , "Child2Leaf2" } ; int i = 0 ; for ( edu . illinois . cs . cogcomp . core . datastructures . trees . Tree < java . lang . String > t : edu . i... | org . junit . Assert . assertEquals ( output [ ( i ++ ) ] , t . getLabel ( ) ) |
applyHandlersWithLocal ( ) { java . util . concurrent . atomic . AtomicReference < java . util . Optional < java . lang . Integer > > localValue = new java . util . concurrent . atomic . AtomicReference ( ) ; io . trane . future . Local < java . lang . Integer > l = io . trane . future . Local . apply ( ) ; l . update ... | org . junit . Assert . assertEquals ( java . util . Optional . of ( 1 ) , localValue . get ( ) ) |
testEnabledConsumerTypeCountByPoolExcludesExpiredPools ( ) { org . candlepin . model . ConsumerType type = consumerTypeCurator . getByLabel ( "system" ) ; pool1 . setAttribute ( Pool . Attributes . ENABLED_CONSUMER_TYPES , type . getLabel ( ) ) ; pool1 . setEndDate ( org . candlepin . util . Util . yesterday ( ) ) ; ow... | org . junit . Assert . assertEquals ( expectedPoolCount , info . getEnabledConsumerTypeCountByPool ( ) ) |
toSortedArray ( ) { super . toSortedArray ( ) ; org . eclipse . collections . api . set . primitive . MutableByteSet set = this . newWith ( ( ( byte ) ( 0 ) ) , ( ( byte ) ( 1 ) ) , ( ( byte ) ( 31 ) ) , ( ( byte ) ( - 1 ) ) , ( ( byte ) ( - 123 ) ) , ( ( byte ) ( - 53 ) ) ) ; "<AssertPlaceHolder>" ; } toSortedArray ( ... | org . junit . Assert . assertArrayEquals ( new byte [ ] { ( ( byte ) ( - 123 ) ) , ( ( byte ) ( - 53 ) ) , ( ( byte ) ( - 1 ) ) , ( ( byte ) ( 0 ) ) , ( ( byte ) ( 1 ) ) , ( ( byte ) ( 31 ) ) } , set . toSortedArray ( ) ) |
fromStringNullYieldsBasic ( ) { "<AssertPlaceHolder>" ; } fromString ( java . lang . String ) { if ( ( s == null ) || ( ( s . length ( ) ) == 0 ) ) return com . rackspacecloud . blueflood . types . RollupType . BF_BASIC ; try { return com . rackspacecloud . blueflood . types . RollupType . valueOf ( s . toUpperCase ( )... | org . junit . Assert . assertEquals ( RollupType . BF_BASIC , com . rackspacecloud . blueflood . types . RollupType . fromString ( null ) ) |
testGetEventTypesInRangeNoEvents ( ) { java . util . Map < java . lang . String , java . lang . Long > result = org . eclipse . tracecompass . tmf . ctf . core . tests . temp . statistics . TmfStatisticsTest . backend . getEventTypesInRange ( org . eclipse . tracecompass . tmf . ctf . core . tests . temp . statistics .... | org . junit . Assert . assertEquals ( 0 , count ) |
testGetStorageLocation ( ) { java . lang . String expResult = "file:///tmp/files/tmp/dataset/Dataset" ; java . lang . String result = datasetAccess . getStorageLocation ( ) ; "<AssertPlaceHolder>" ; } getStorageLocation ( ) { if ( edu . harvard . iq . dataverse . dataaccess . SwiftAccessIO . isDirectAccess ( ) ) { retu... | org . junit . Assert . assertEquals ( expResult , result ) |
shouldTrace_WhenRandomNextIntIsUnderTheSamplingLevel_ShouldReturnTrue ( ) { victim . setSamplingLevel ( 500 ) ; when ( threadLocalRandom . nextInt ( 0 , 1000 ) ) . thenReturn ( 499 ) ; "<AssertPlaceHolder>" ; } shouldTrace ( ) { return ( ( samplingLevel ) > 0 ) && ( ( com . betfair . cougar . modules . zipkin . impl . ... | org . junit . Assert . assertTrue ( victim . shouldTrace ( ) ) |
testMethodWithHandlerAsyncResultListNullJsonObject ( ) { io . vertx . rx . java . test . gen . AsyncResultChecker checker = new io . vertx . rx . java . test . gen . AsyncResultChecker ( ) ; obj . methodWithListNullableJsonObjectHandlerAsyncResult ( checker . asyncExpectedResult ( EXPECTED ) ) ; "<AssertPlaceHolder>" ;... | org . junit . Assert . assertEquals ( 1 , checker . count ) |
testHeadURL ( ) { com . sun . jersey . api . client . Client client = createTestClient ( ) ; com . sun . jersey . api . client . WebResource webResource = client . resource ( base_url ) ; com . sun . jersey . api . client . ClientResponse response = webResource . type ( MediaType . APPLICATION_JSON ) . head ( ) ; "<Ass... | org . junit . Assert . assertEquals ( 200 , response . getStatus ( ) ) |
readCsvFileTest ( ) { org . hillview . table . api . ITable t = this . readTable ( org . hillview . test . storage . CsvFileTest . ontimeFolder , org . hillview . test . storage . CsvFileTest . csvFile ) ; "<AssertPlaceHolder>" ; } readTable ( java . lang . String , java . lang . String ) { java . nio . file . Path pat... | org . junit . Assert . assertNotNull ( t ) |
shouldParseValidObject ( ) { subject . parse ( "placeholder<sp>location" , ProvisioningCmsCertificateBuilderTest . TEST_CMS_CERT . getEncoded ( ) ) ; "<AssertPlaceHolder>" ; } getCertificate ( ) { return certificate ; } | org . junit . Assert . assertEquals ( ProvisioningCmsCertificateBuilderTest . TEST_CMS_CERT , subject . getCertificate ( ) ) |
testGetStatusFromStateTranslated ( ) { net . sf . okapi . common . resource . TextContainer target = org . mockito . Mockito . mock ( net . sf . okapi . common . resource . TextContainer . class ) ; org . mockito . Mockito . when ( target . getProperty ( com . box . l10n . mojito . okapi . Property . STATE ) ) . thenRe... | org . junit . Assert . assertEquals ( expResult , result ) |
checkMatchesResourceType ( ) { final org . uberfire . backend . vfs . Path path = mock ( org . uberfire . backend . vfs . Path . class ) ; when ( path . getFileName ( ) ) . thenReturn ( ( "file." + ( resourceType . getSuffix ( ) ) ) ) ; "<AssertPlaceHolder>" ; } supports ( org . uberfire . backend . vfs . Path ) { retu... | org . junit . Assert . assertTrue ( helper . supports ( path ) ) |
addSalePositionTest ( ) { System . out . print ( "-><sp>addSalePosition()<sp>-<sp>" ) ; ua . com . alexcoffee . model . order . Order order = ua . com . alexcoffee . model . order . Order . getBuilder ( ) . build ( ) ; order . addSalePosition ( new ua . com . alexcoffee . model . position . SalePosition ( ) ) ; "<Asser... | org . junit . Assert . assertEquals ( order . getSalePositions ( ) . size ( ) , 1 ) |
testNoFilteringIfNotOverlapping ( ) { java . util . List < org . languagetool . rules . patterns . PatternToken > fakePatternTokens = new java . util . ArrayList ( ) ; org . languagetool . rules . patterns . PatternRule rule1 = new org . languagetool . rules . patterns . PatternRule ( "id1" , org . languagetool . rules... | org . junit . Assert . assertEquals ( 2 , filteredMatches . size ( ) ) |
testLeadNodesHaveNoChildren ( ) { org . jsoup . nodes . Document doc = org . jsoup . Jsoup . parse ( "<div>Hello<sp>there</div>" ) ; org . jsoup . nodes . Element div = doc . select ( "div" ) . first ( ) ; org . jsoup . nodes . TextNode tn = ( ( org . jsoup . nodes . TextNode ) ( div . childNode ( 0 ) ) ) ; java . util... | org . junit . Assert . assertEquals ( 0 , nodes . size ( ) ) |
testHasAllowedSubgroupAllowedNoSubgroups ( ) { org . opengrok . indexer . configuration . Group g = getAllowedGroupWithoutSubgroups ( ) ; "<AssertPlaceHolder>" ; } hasAllowedSubgroup ( org . opengrok . indexer . configuration . Group ) { java . lang . Boolean val ; java . util . Map < java . lang . String , java . lang... | org . junit . Assert . assertFalse ( helper . hasAllowedSubgroup ( g ) ) |
testFetchByPrimaryKeysWithMultiplePrimaryKeysWhereNoPrimaryKeysExist ( ) { long pk1 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; long pk2 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; java . util . Set < java . io . Serializable > primaryKeys = ne... | org . junit . Assert . assertTrue ( dlFileShortcuts . isEmpty ( ) ) |
testIngeschrevenePersoonJongerDanZestienJaarOud ( ) { final nl . bzk . brp . model . algemeen . attribuuttype . kern . DatumAttribuut geboorteDatum = nl . bzk . brp . model . algemeen . attribuuttype . kern . DatumAttribuut . vandaag ( ) ; geboorteDatum . voegJaarToe ( ( - ( nl . bzk . brp . model . algemeen . attribuu... | org . junit . Assert . assertEquals ( 1 , overtreders . size ( ) ) |
testFindByDeleted ( ) { java . util . List < org . apache . griffin . core . job . entity . AbstractJob > jobs = jobRepo . findByDeleted ( false ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( jobs . size ( ) , 4 ) |
should_get_description ( ) { fr . norad . visuwall . providers . teamcity . resource . TeamCityBuildType buildType = new fr . norad . visuwall . providers . teamcity . resource . TeamCityBuildType ( ) ; buildType . setDescription ( "description" ) ; when ( teamCity . findBuildType ( anyString ( ) ) ) . thenReturn ( bui... | org . junit . Assert . assertEquals ( "description" , description ) |
testGetOfflinePublishQueueBound ( ) { com . amazonaws . mobileconnectors . iot . AWSIotMqttManager testClient = new com . amazonaws . mobileconnectors . iot . AWSIotMqttManager ( "test-client" , com . amazonaws . regions . Region . getRegion ( Regions . US_EAST_1 ) , com . amazonaws . mobileconnectors . iot . AWSIotMqt... | org . junit . Assert . assertEquals ( 100 , ( ( int ) ( testClient . getOfflinePublishQueueBound ( ) ) ) ) |
null_revision_should_be_considered_new ( ) { testDoc_1 . setRevision ( null ) ; "<AssertPlaceHolder>" ; } isNew ( java . lang . Object ) { return ( org . ektorp . util . Documents . getRevision ( document ) ) == null ; } | org . junit . Assert . assertTrue ( org . ektorp . util . Documents . isNew ( testDoc_1 ) ) |
testYamlMultiValueWithSingleQuoteFlowStyleFormatMultiValueInSquareBrackets ( ) { org . apache . ambari . server . controller . internal . BlueprintConfigurationProcessor . YamlMultiValuePropertyDecorator yamlMultiValuePropertyDecorator = new org . apache . ambari . server . controller . internal . BlueprintConfiguratio... | org . junit . Assert . assertEquals ( expectedValue , newValue ) |
testSetHorizontalAlignment_returnsCell ( ) { org . eclipse . rap . rwt . template . Cell cell = new org . eclipse . rap . rwt . template . TestCell ( template , "foo" ) ; org . eclipse . rap . rwt . template . Cell actualCell = cell . setHorizontalAlignment ( SWT . CENTER ) ; "<AssertPlaceHolder>" ; } setHorizontalAlig... | org . junit . Assert . assertSame ( cell , actualCell ) |
testFullTextTerm ( ) { org . infinispan . query . dsl . QueryFactory qf = org . infinispan . all . embeddedquery . QueryDslConditionsTest . getQueryFactory ( ) ; org . infinispan . query . dsl . Query q = qf . create ( ( ( "from<sp>" + ( org . infinispan . all . embeddedquery . QueryDslConditionsTest . getModelFactory ... | org . junit . Assert . assertEquals ( 1 , list . size ( ) ) |
testTypeInfoCompleteness ( ) { int len = 0 ; try ( java . sql . Connection conn = dataSourceFactory . getSharedDataSource ( ) . getConnection ( ) ) { java . sql . DatabaseMetaData md = conn . getMetaData ( ) ; try ( java . sql . ResultSet rs = md . getTypeInfo ( ) ) { while ( rs . next ( ) ) { len ++ ; } } } int actual... | org . junit . Assert . assertTrue ( ( len <= actualLen ) ) |
setPixel ( ) { org . smurn . jsift . Image target = new org . smurn . jsift . Image ( 2 , 2 ) ; target . setPixel ( 1 , 0 , 0.5F ) ; float [ ] [ ] expected = new float [ ] [ ] { new float [ ] { 0 , 0 } , new float [ ] { 0.5F , 0 } } ; "<AssertPlaceHolder>" ; } toArray ( ) { return toArray ( true ) ; } | org . junit . Assert . assertArrayEquals ( expected , target . toArray ( ) ) |
testQuery ( ) { java . sql . ResultSet resultSet = dataSource . getConnection ( ) . createStatement ( ) . executeQuery ( "SELECT<sp>1" ) ; java . lang . String result = null ; java . lang . String expected = "1" ; while ( resultSet . next ( ) ) { result = resultSet . getString ( 1 ) ; } "<AssertPlaceHolder>" ; } equals... | org . junit . Assert . assertTrue ( result . equals ( expected ) ) |
containsOrderedPutTest ( ) { eu . danieldk . dictomaton . collections . ImmutableStringObjectMap . OrderedBuilder < java . lang . String > builder = new eu . danieldk . dictomaton . collections . ImmutableStringObjectMap . OrderedBuilder < > ( ) ; for ( Map . Entry < java . lang . String , java . lang . String > e : ne... | org . junit . Assert . assertTrue ( test . containsKey ( entry . getKey ( ) ) ) |
equalsFalseOtherNull ( ) { annis . model . TestDataObject . A a = new annis . model . TestDataObject . A ( annis . model . TestDataObject . S1 ) ; annis . model . TestDataObject . C c1 = new annis . model . TestDataObject . C ( a ) ; annis . model . TestDataObject . C c2 = new annis . model . TestDataObject . C ( null ... | org . junit . Assert . assertFalse ( c1 . equals ( c2 ) ) |
getVendorRoleForPaymentConfiguration_Reseller ( ) { org . oscm . domobjects . Organization org = new org . oscm . domobjects . Organization ( ) ; org . oscm . test . data . Organizations . grantOrganizationRole ( org , OrganizationRoleType . RESELLER ) ; "<AssertPlaceHolder>" ; } getVendorRoleForPaymentConfiguration ( ... | org . junit . Assert . assertEquals ( OrganizationRoleType . RESELLER , org . getVendorRoleForPaymentConfiguration ( ) ) |
testGetEnzymeFamily ( ) { java . lang . String expResult = "Oxidoreductases" ; java . lang . String result = instance . getEnzymeFamily ( ) ; "<AssertPlaceHolder>" ; } getEnzymeFamily ( ) { return enzymeFamily ; } | org . junit . Assert . assertEquals ( expResult , result ) |
test_ips_warmup_post ( ) { com . sendgrid . SendGrid sg = new com . sendgrid . SendGrid ( "SENDGRID_API_KEY" , true ) ; sg . setHost ( "localhost:4010" ) ; sg . addRequestHeader ( "X-Mock" , "200" ) ; com . sendgrid . Request request = new com . sendgrid . Request ( ) ; request . setMethod ( Method . POST ) ; request .... | org . junit . Assert . assertEquals ( 200 , response . getStatusCode ( ) ) |
testDynamicQueryByProjectionMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . portal . kernel . model . PluginSetting . class , _dynamicQueryClassLoader ) ; dynamicQuery . setProjecti... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
shouldFindAdditionalMethodParameterParsersInBDDDotParse ( ) { java . lang . String [ ] value = new java . lang . String [ ] { "x" } ; java . lang . Class < ? > [ ] type = new java . lang . Class < ? > [ ] { org . givwenzen . parse . CustomObjectForParsing . class } ; java . lang . Object object = new org . givwenzen . ... | org . junit . Assert . assertEquals ( new org . givwenzen . parse . CustomObjectForParsing ( "x" ) , object ) |
testByteArrayEquality ( ) { byte [ ] a0 = new byte [ ] { 1 , 2 , 3 , 4 } ; byte [ ] b0 = new byte [ ] { 1 , 2 , 3 , 4 } ; org . apache . beam . sdk . schemas . Schema schema = org . apache . beam . sdk . schemas . Schema . of ( Schema . Field . of ( "bytes" , Schema . FieldType . BYTES ) ) ; org . apache . beam . sdk .... | org . junit . Assert . assertEquals ( a , b ) |
testConvertToAvro ( ) { int expected = 123 ; org . talend . daikon . avro . converter . AvroConverter < java . lang . Byte , java . lang . Integer > converter = new org . talend . codegen . converter . ByteIntegerConverter ( ) ; int actual = converter . convertToAvro ( ( ( byte ) ( 123 ) ) ) ; "<AssertPlaceHolder>" ; }... | org . junit . Assert . assertEquals ( expected , actual ) |
shouldAlwaysPassIfTheTechnologyIsInDraftState ( ) { given ( stateChangeContext . getOwner ( ) ) . willReturn ( technology ) ; given ( technology . getDataDefinition ( ) ) . willReturn ( dataDefinition ) ; given ( technology . getStringField ( "state" ) ) . willReturn ( "01draft" ) ; boolean isValid = technologyStateCha... | org . junit . Assert . assertTrue ( isValid ) |
testIsSatisfied ( ) { org . apache . commons . math . genetics . FixedGenerationCount fgc = new org . apache . commons . math . genetics . FixedGenerationCount ( 20 ) ; int cnt = 0 ; org . apache . commons . math . genetics . Population pop = new org . apache . commons . math . genetics . Population ( ) { public void a... | org . junit . Assert . assertEquals ( 20 , cnt ) |
testShouldNotDisplayWhenHookDisable ( ) { when ( settingsService . getHook ( repository ) ) . thenReturn ( repoHook ) ; when ( repoHook . isEnabled ( ) ) . thenReturn ( false ) ; "<AssertPlaceHolder>" ; } shouldDisplay ( java . util . Map ) { final com . atlassian . bitbucket . repository . Repository repository = getR... | org . junit . Assert . assertFalse ( condition . shouldDisplay ( context ) ) |
nextDown6 ( ) { org . diirt . graphene . TimeScales . TimePeriod period = org . diirt . graphene . TimeScales . nextDown ( new org . diirt . graphene . TimeScales . TimePeriod ( SECOND , 30 ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertThat ( period , equalTo ( new org . diirt . graphene . TimeScales . TimePeriod ( SECOND , 15 ) ) ) |
canBindNewFactoriesAtRunTime ( ) { org . openqa . selenium . grid . session . ActiveSession session = org . mockito . Mockito . mock ( org . openqa . selenium . grid . session . ActiveSession . class ) ; org . openqa . selenium . remote . server . ActiveSessionFactory sessionFactory = new org . openqa . selenium . remo... | org . junit . Assert . assertSame ( session , created ) |
testMe ( ) { "<AssertPlaceHolder>" ; try { org . jboss . as . test . integration . ejb . mdb . cdi . MDBProxy mdbProxy = ( ( org . jboss . as . test . integration . ejb . mdb . cdi . MDBProxy ) ( org . jboss . as . test . integration . ejb . mdb . cdi . MDBRAScopeCdiIntegrationTestCase . getInitialContext ( ) . lookup ... | org . junit . Assert . assertNotNull ( getModelControllerClient ( ) ) |
testOperatorFactorial2 ( ) { net . objecthunter . exp4j . operator . Operator factorial = new net . objecthunter . exp4j . operator . Operator ( "!" , 1 , true , ( ( net . objecthunter . exp4j . operator . Operator . PRECEDENCE_POWER ) + 1 ) ) { @ net . objecthunter . exp4j . Override public double apply ( double ... a... | org . junit . Assert . assertFalse ( e . validate ( ) . isValid ( ) ) |
registerMicroservice ( ) { org . apache . servicecomb . serviceregistry . ServiceRegistry serviceRegistry = org . apache . servicecomb . serviceregistry . registry . ServiceRegistryFactory . createLocal ( ) ; serviceRegistry . init ( ) ; serviceRegistry . run ( ) ; org . apache . servicecomb . serviceregistry . api . r... | org . junit . Assert . assertEquals ( serviceId , remoteMicroservice . getServiceId ( ) ) |
testRefKeySameAsName ( ) { java . util . Map < java . lang . String , org . eclipse . jgit . lib . Ref > allRefs = db . getAllRefs ( ) ; for ( java . util . Map . Entry < java . lang . String , org . eclipse . jgit . lib . Ref > e : allRefs . entrySet ( ) ) { "<AssertPlaceHolder>" ; } } getKey ( ) { return toMapKey ( r... | org . junit . Assert . assertEquals ( e . getKey ( ) , e . getValue ( ) . getName ( ) ) |
testExtraFieldInWriteRawRecord ( ) { final java . util . List < org . apache . nifi . serialization . record . RecordField > fields = new java . util . ArrayList ( ) ; fields . add ( new org . apache . nifi . serialization . record . RecordField ( "id" , RecordFieldType . STRING . getDataType ( ) ) ) ; final org . apac... | org . junit . Assert . assertEquals ( expected , output ) |
levelTest ( ) { org . apache . rocketmq . logging . inner . Level info = org . apache . rocketmq . logging . inner . Level . toLevel ( "info" ) ; org . apache . rocketmq . logging . inner . Level error = org . apache . rocketmq . logging . inner . Level . toLevel ( 3 ) ; "<AssertPlaceHolder>" ; } toLevel ( java . lang ... | org . junit . Assert . assertTrue ( ( ( error != null ) && ( info != null ) ) ) |
testConvert ( ) { java . lang . Integer priority = 1 ; java . lang . String name = "name" ; org . lnu . is . domain . benefit . BenefitType source = new org . lnu . is . domain . benefit . BenefitType ( ) ; source . setName ( name ) ; source . setPriority ( priority ) ; org . lnu . is . resource . benefit . type . Bene... | org . junit . Assert . assertEquals ( expected , actual ) |
testIntersection2 ( ) { tl . lin . data . array . ArrayListOfInts a = new tl . lin . data . array . ArrayListOfInts ( ) ; a . add ( 5 ) ; tl . lin . data . array . ArrayListOfInts b = new tl . lin . data . array . ArrayListOfInts ( ) ; b . add ( 0 ) . add ( 1 ) . add ( 2 ) . add ( 3 ) ; tl . lin . data . array . ArrayL... | org . junit . Assert . assertTrue ( ( ( c . size ( ) ) == 0 ) ) |
fileClosedTimePropagated ( ) { org . apache . accumulo . server . replication . proto . Replication . Status stat1 = org . apache . accumulo . server . replication . proto . Replication . Status . newBuilder ( ) . setBegin ( 10 ) . setEnd ( 20 ) . setClosed ( true ) . setInfiniteEnd ( false ) . setCreatedTime ( 50 ) . ... | org . junit . Assert . assertEquals ( stat1 , combined ) |
basicTest ( ) { javax . ws . rs . core . Response response = org . jboss . resteasy . test . resource . param . RESTEasyParamBasicTest . client . target ( generateURL ( "/basic/a/pathParam0/pathParam1/pathParam2/pathParam3" ) ) . queryParam ( "queryParam0" , "queryParam0" ) . queryParam ( "cookieParam3" 7 , "cookiePara... | org . junit . Assert . assertEquals ( "Success" , 200 , response . getStatus ( ) ) |
testEncodeHash ( ) { com . github . prasanthj . hll . HLLSparseRegister reg = new com . github . prasanthj . hll . HLLSparseRegister ( 14 , 25 , 6 ) ; int got = reg . encodeHash ( input ) ; "<AssertPlaceHolder>" ; } encodeHash ( long ) { int x = ( ( int ) ( hashcode & ( mask ) ) ) ; if ( x == 0 ) { int ntr = ( java . l... | org . junit . Assert . assertEquals ( expected , got ) |
subst_null ( ) { com . alibaba . citrus . util . regex . Substitution subs = new com . alibaba . citrus . util . regex . MatchResultSubstitution ( r1 ) ; "<AssertPlaceHolder>" ; } substitute ( java . lang . String ) { return ( ( resourceName . substring ( 0 , lastSubstitution . getMatch ( ) . start ( ) ) ) + ( lastSubs... | org . junit . Assert . assertEquals ( null , subs . substitute ( null ) ) |
colonFollowedByDollar ( ) { java . lang . String input = "a:${b}" ; ch . qos . logback . core . subst . Tokenizer tokenizer = new ch . qos . logback . core . subst . Tokenizer ( input ) ; java . util . List < ch . qos . logback . core . subst . Token > tokenList = tokenizer . tokenize ( ) ; witnessList . add ( new ch .... | org . junit . Assert . assertEquals ( witnessList , tokenList ) |
testGetOutputLength ( ) { net . sf . ntru . encrypt . EncryptionParameters [ ] paramSets = new net . sf . ntru . encrypt . EncryptionParameters [ ] { net . sf . ntru . encrypt . EncryptionParameters . APR2011_439 , net . sf . ntru . encrypt . EncryptionParameters . APR2011_439_FAST , net . sf . ntru . encrypt . Encrypt... | org . junit . Assert . assertEquals ( params . getOutputLength ( ) , encrypted . length ) |
testWriteContentsToPath ( ) { java . io . File templateDir = com . google . common . io . Files . createTempDir ( ) ; java . io . File testFile = new java . io . File ( templateDir , "test.file" ) ; com . google . common . io . Files . write ( "hello<sp>world" . getBytes ( ) , testFile ) ; com . facebook . buck . testu... | org . junit . Assert . assertEquals ( "bye<sp>world" , workspace . getFileContents ( "test.file" ) ) |
fromRollupMetricYieldsBasic ( ) { com . rackspacecloud . blueflood . types . Rollup rollup = new com . rackspacecloud . blueflood . types . RollupTypeTest . MetricImplementsRollup ( null , 123L , 0 , new com . rackspacecloud . blueflood . utils . TimeValue ( 456L , java . util . concurrent . TimeUnit . SECONDS ) , null... | org . junit . Assert . assertEquals ( RollupType . BF_BASIC , com . rackspacecloud . blueflood . types . RollupType . fromRollup ( rollup ) ) |
test2 ( ) { java . lang . String splitRegex = "hi" ; java . lang . String splitAttrName = edu . uci . ics . texera . api . constants . test . TestConstantsRegexSplit . DESCRIPTION ; java . util . List < java . lang . String > splitResult = new java . util . ArrayList ( ) ; splitResult . add ( "banana" ) ; splitResult .... | org . junit . Assert . assertEquals ( splitResult , splitStrings ) |
validate_requiredSetAndStatusNotAccepted_returnTrue ( ) { boolean expected = true ; eu . chargetime . ocpp . model . basic . types . test . GetVariableResultType sut = createSut ( ) ; sut . setAttributeStatus ( GetVariableStatusEnumType . Rejected ) ; boolean result = sut . validate ( ) ; "<AssertPlaceHolder>" ; } vali... | org . junit . Assert . assertEquals ( expected , result ) |
testGetSettings ( ) { net . holmes . core . business . configuration . ConfigurationManager configurationManager = createMock ( net . holmes . core . business . configuration . ConfigurationManager . class ) ; com . google . common . eventbus . EventBus eventBus = createMock ( com . google . common . eventbus . EventBu... | org . junit . Assert . assertNotNull ( settings ) |
testEquals_AsFlowDefault ( ) { "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( obj == ( this ) ) { return true ; } if ( ! ( obj instanceof org . o3project . odenos . remoteobject . event . EventSubscription ) ) { return false ; } org . o3project . odenos . remoteobject . event . EventSubscription event... | org . junit . Assert . assertThat ( target . equals ( flow ) , org . hamcrest . CoreMatchers . is ( false ) ) |
testVectorLength ( ) { edu . ucla . sspace . wordsi . psd . ContextExtractor extractor = new edu . ucla . sspace . wordsi . psd . PseudoWordContextExtractor ( new edu . ucla . sspace . wordsi . psd . PseudoWordContextExtractorTest . MockGenerator ( ) , 5 , new java . util . HashMap < java . lang . String , java . lang ... | org . junit . Assert . assertEquals ( 4 , extractor . getVectorLength ( ) ) |
generalStructure ( ) { ezvcard . VCard vcard = new ezvcard . VCard ( ) ; vcard . setFormattedName ( "John<sp>Doe" ) ; vcard . setProductId ( "ez-vcard" ) ; java . io . StringWriter sw = new java . io . StringWriter ( ) ; ezvcard . io . text . VCardWriter vcw = new ezvcard . io . text . VCardWriter ( sw , ezvcard . VCar... | org . junit . Assert . assertEquals ( actual , expected ) |
testToStringMethodOfCyTable ( ) { table . createColumn ( "l" , org . cytoscape . model . Long . class , false ) ; attrs . set ( "l" , 13L ) ; "<AssertPlaceHolder>" ; } toString ( ) { return name ; } | org . junit . Assert . assertTrue ( ( ( table . toString ( ) . length ( ) ) > 0 ) ) |
testDstu3UsesLatestDefinitions ( ) { java . lang . String input = org . apache . commons . io . IOUtils . toString ( org . hl7 . fhir . dstu3 . hapi . validation . FhirInstanceValidatorDstu3Test . class . getResourceAsStream ( "/bug703.json" ) , Charsets . UTF_8 ) ; ca . uhn . fhir . validation . ValidationResult resul... | org . junit . Assert . assertThat ( outcome , org . hamcrest . Matchers . empty ( ) ) |
testGetPrimaryCardinalitySqlPLFM_4857 ( ) { java . lang . String expected = "SELECT<sp>P0.ID,<sp>1<sp>+<sp>T0.CARD<sp>+<sp>T1.CARD<sp>AS<sp>CARD" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( "<sp>FROM<sp>V2_WIKI_PAGE<sp>AS<sp>P0" + "<sp>JOIN" ) + "<sp>WHERE<sp>P.ID<sp>>=<sp>:BMINID<sp>AND<sp>P.ID<sp><=<sp>:BMAXID<sp>GROUP<sp>BY<sp>P.... | org . junit . Assert . assertEquals ( expected , sql ) |
testSetThrottle ( ) { final int throttleValue = 1234 ; uk . gov . nationalarchives . droid . profile . throttle . SubmissionThrottle throttle = mock ( uk . gov . nationalarchives . droid . profile . throttle . SubmissionThrottle . class ) ; uk . gov . nationalarchives . droid . profile . ProfileInstance profile = new u... | org . junit . Assert . assertEquals ( throttleValue , profile . getThrottle ( ) ) |
getSnappyShim ( ) { org . pentaho . hadoop . shim . spi . HadoopShim hadoopShim = new org . pentaho . hadoop . shim . spi . MockHadoopShim ( ) ; org . pentaho . hadoop . shim . spi . SnappyShim snappyShim = new org . pentaho . hadoop . shim . spi . MockSnappyShim ( ) ; org . pentaho . hadoop . shim . HadoopConfiguratio... | org . junit . Assert . assertEquals ( snappyShim , c . getSnappyShim ( ) ) |
purgeConceptReferenceTerm_shouldPurgeTheGivenConceptReferenceTerm ( ) { java . lang . Integer conceptReferenceTermId = 11 ; org . openmrs . ConceptReferenceTerm refTerm = conceptService . getConceptReferenceTerm ( conceptReferenceTermId ) ; conceptService . purgeConceptReferenceTerm ( refTerm ) ; "<AssertPlaceHolder>" ... | org . junit . Assert . assertNull ( conceptService . getConceptReferenceTerm ( conceptReferenceTermId ) ) |
testReadBooleanTrue ( ) { write ( "t<sp>ru<sp>e<sp>" ) ; "<AssertPlaceHolder>" ; } readBoolean ( ) { return org . kocakosm . pitaya . util . Booleans . valueOf ( org . kocakosm . pitaya . io . Scanf . readString ( ) ) ; } | org . junit . Assert . assertEquals ( true , org . kocakosm . pitaya . io . Scanf . readBoolean ( ) ) |
shouldRejectWhenEqualToAndEqualToIsFalse ( ) { final uk . gov . gchq . gaffer . sketches . datasketches . cardinality . predicate . HllSketchIsLessThan filter = new uk . gov . gchq . gaffer . sketches . datasketches . cardinality . predicate . HllSketchIsLessThan ( 18 ) ; boolean accepted = filter . test ( uk . gov . g... | org . junit . Assert . assertFalse ( accepted ) |
testIsOrdered02 ( ) { java . util . List < org . dresdenocl . modelinstancetype . types . IModelInstanceString > elements01 ; elements01 = new java . util . ArrayList < org . dresdenocl . modelinstancetype . types . IModelInstanceString > ( ) ; elements01 . add ( org . dresdenocl . modelinstancetype . types . base . Ba... | org . junit . Assert . assertTrue ( modelInstanceCollection01 . isOrdered ( ) ) |
testGetLastProfile_ProfileType_3G ( ) { com . att . aro . core . preferences . UserPreferences userPrefs = com . att . aro . core . preferences . MockUserPreferencesFactory . getInstance ( ) . create ( ) ; com . att . aro . core . preferences . IPreferenceHandler mockPrefHandler = userPrefs . getPreferenceHandler ( ) ;... | org . junit . Assert . assertEquals ( expectedProfile , actualProfile ) |
testIsVMRunningInvalidJson ( ) { java . lang . String json = "{\"listvirtualmachinesresponse\":{\"count\":1,\"virtualmachine\"83-190ecf726ba4\",\"name" ; "<AssertPlaceHolder>" ; } getNestedVMPowerState ( java . lang . String ) { if ( com . google . common . base . Strings . isNullOrEmpty ( jsonResponse ) ) { return Out... | org . junit . Assert . assertEquals ( driver . getNestedVMPowerState ( json ) , OutOfBandManagement . PowerState . Unknown ) |
testFalseGeenPersoonVerzoek ( ) { setup ( true , true ) ; org . mockito . Mockito . when ( persoon . getGeslachtsaanduiding ( ) ) . thenReturn ( Geslachtsaanduiding . VROUW ) ; final nl . bzk . migratiebrp . bericht . model . sync . impl . VerwerkToevalligeGebeurtenisVerzoekBericht verzoek = new nl . bzk . migratiebrp ... | org . junit . Assert . assertFalse ( subject . controleer ( persoon , verzoek ) ) |
testCompletable ( ) { io . vertx . core . Future < java . lang . Void > fut = io . vertx . core . Future . future ( ) ; try { io . reactivex . Completable complete = io . reactivex . Completable . complete ( ) ; io . reactivex . plugins . RxJavaPlugins . setOnCompletableAssembly ( ( single ) -> complete ) ; io . reacti... | org . junit . Assert . assertSame ( completable , complete ) |
whenGrepWithSimpleString_thenCorrect ( ) { int expectedLineCount = 4 ; java . util . List < org . unix4j . line . Line > lines = org . unix4j . Unix4j . grep ( "NINETEEN" , fileToGrep ) . toLineList ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return elements . size ( ) ; } | org . junit . Assert . assertEquals ( expectedLineCount , lines . size ( ) ) |
testPriorityValid ( ) { for ( java . lang . String test : org . kie . workbench . common . stunner . bpmn . definition . property . connectors . SequenceFlowPriorityTest . PRIORITY_VALID ) { org . kie . workbench . common . stunner . bpmn . definition . property . connectors . Priority priority = new org . kie . workbe... | org . junit . Assert . assertTrue ( violations . isEmpty ( ) ) |
testGetInitializationErrorWithMissingBinaries ( ) { edu . illinois . library . cantaloupe . config . Configuration . getInstance ( ) . setProperty ( Key . KAKADUDEMOPROCESSOR_PATH_TO_BINARIES , "/bogus/bogus/bogus" ) ; edu . illinois . library . cantaloupe . processor . KakaduDemoProcessor . resetInitialization ( ) ; "... | org . junit . Assert . assertNotNull ( instance . getInitializationError ( ) ) |
testFileExistence ( ) { "<AssertPlaceHolder>" ; } getSourceDistribution ( ) { return new java . io . File ( "." , ( ( "target/pmd-src-" + ( net . sourceforge . pmd . PMDVersion . VERSION ) ) + ".zip" ) ) ; } | org . junit . Assert . assertTrue ( getSourceDistribution ( ) . exists ( ) ) |
testSearchByAlias ( ) { java . util . Collection < org . guvnor . structure . repositories . Repository > result = searchService . searchByAlias ( "Item" , 10 , true ) ; "<AssertPlaceHolder>" ; } size ( ) { return fileAttrs . size ( ) ; } | org . junit . Assert . assertEquals ( result . size ( ) , 2 ) |
testWithLockType ( ) { final org . apache . druid . indexing . common . task . Task task = org . apache . druid . indexing . common . task . NoopTask . create ( ) ; final org . apache . druid . indexing . common . actions . LockTryAcquireAction action = new org . apache . druid . indexing . common . actions . LockTryAc... | org . junit . Assert . assertNotNull ( lock ) |
testGzipFallbackCompressed ( ) { short [ ] [ ] array = new short [ ] [ ] { new short [ ] { 1000 , - 2000 , 3000 , - 3000 , 4000 } , new short [ ] { 1000 , - 2000 , 3000 , - 3000 , 4000 } , new short [ ] { 1000 , - 2000 , 3000 , - 3000 , 4000 } , new short [ ] { 1000 , - 2000 , 3000 , - 3000 , 4000 } , new short [ ] { 1... | org . junit . Assert . assertArrayEquals ( array , actualShortArray ) |
testGetMaxOrder ( ) { java . math . BigInteger expResult = java . math . BigInteger . valueOf ( 2 ) ; java . math . BigInteger result = ch . bfh . unicrypt . math . algebra . general . classes . BooleanSet . getInstance ( ) . getOrderUpperBound ( ) ; "<AssertPlaceHolder>" ; } getOrderUpperBound ( ) { if ( ( this . uppe... | org . junit . Assert . assertEquals ( expResult , result ) |
canRollForwardDateTwoMonthsToMatchWeekOfMonthAndDayOfWeekWhenStartingOneWeekAndDayAhead ( ) { scheduledEvent = new org . mifos . domain . builders . ScheduledEventBuilder ( ) . every ( 2 ) . months ( ) . onWeekOfMonth ( 1 ) . on ( org . mifos . calendar . DayOfWeek . tuesday ( ) ) . build ( ) ; org . joda . time . Date... | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( tuesdayOnFirstWeekOneMonthFrom ( wednesday7thOfApril ) . plusMonths ( 1 ) ) ) |
testGetJenkinsInstance ( ) { System . out . println ( "getJenkinsInstance" ) ; jenkins . model . Jenkins expResult = jenkins . model . Jenkins . getInstance ( ) ; jenkins . model . Jenkins result = com . microsoftopentechnologies . windowsazurestorage . helper . Utils . getJenkinsInstance ( ) ; "<AssertPlaceHolder>" ; ... | org . junit . Assert . assertEquals ( expResult , result ) |
testVerifyFailsForUnknownAction ( ) { final org . apache . qpid . proton . message . Message msg = org . eclipse . hono . service . credentials . CredentialsMessageFilterTest . givenAValidMessageWithoutBody ( CredentialsConstants . CredentialsAction . unknown ) ; msg . setBody ( new org . apache . qpid . proton . amqp ... | org . junit . Assert . assertFalse ( filterResult ) |
saySomethingWhenTheDefaultTtsIsSetButItIsNotARegisteredService ( ) { voiceManager . say ( "hello" , null , sink . getId ( ) ) ; "<AssertPlaceHolder>" ; } getIsStreamProcessed ( ) { return isStreamProcessed ; } | org . junit . Assert . assertFalse ( sink . getIsStreamProcessed ( ) ) |
shouldFailFindOrCreateChildWithNullParentNameType ( ) { try { tools . findOrCreateChild ( NULL_NODE , "childNode" , org . modeshape . jcr . JcrToolsTest . DEF_TYPE ) ; } catch ( java . lang . Exception e ) { "<AssertPlaceHolder>" ; } } findOrCreateChild ( javax . jcr . Node , java . lang . String , java . lang . String... | org . junit . Assert . assertTrue ( ( e instanceof java . lang . IllegalArgumentException ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.