input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
doesNotConsiderParametersWhichChangedAfterTestInstantiation ( ) { java . util . List < java . lang . Object > parameters = java . util . Arrays . < java . lang . Object > asList ( "dummy<sp>parameter" ) ; org . junit . runners . parameterized . TestWithParameters test = new org . junit . runners . parameterized . TestW... | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( "dummy<sp>parameter" ) , test . getParameters ( ) ) |
testGetPropertyValue ( ) { java . lang . System . setProperty ( "key" , "value" ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { return org . restnext . util . SystemPropertyUtils . get ( key , null ) ; } | org . junit . Assert . assertEquals ( "value" , org . restnext . util . SystemPropertyUtils . get ( "key" ) ) |
givenBaeldungReader_whenReadNext_thenNextArticleRead ( ) { mockArticleReader = mock ( com . baeldung . easymock . ArticleReader . class ) ; baeldungReader = new com . baeldung . easymock . BaeldungReader ( mockArticleReader ) ; expect ( mockArticleReader . next ( ) ) . andReturn ( null ) ; replay ( mockArticleReader ) ... | org . junit . Assert . assertEquals ( null , article ) |
testQuasiClosedToClosed ( ) { final org . apache . hadoop . hdds . scm . container . ContainerReportHandler reportHandler = new org . apache . hadoop . hdds . scm . container . ContainerReportHandler ( nodeManager , containerManager ) ; final java . util . Iterator < org . apache . hadoop . hdds . protocol . DatanodeDe... | org . junit . Assert . assertEquals ( LifeCycleState . CLOSED , containerOne . getState ( ) ) |
testParseInput ( ) { when ( view . getPattern ( ) ) . thenReturn ( "val" ) ; presenter . viewUpdated ( ) ; "<AssertPlaceHolder>" ; } getPattern ( ) { return searchPatternTextBox . getText ( ) ; } | org . junit . Assert . assertEquals ( presenter . getPattern ( ) , "val" ) |
testGetObjectInstance ( ) { config . setAcquireIncrement ( 5 ) ; config . setMinConnectionsPerPartition ( 30 ) ; config . setMaxConnectionsPerPartition ( 100 ) ; config . setPartitionCount ( 1 ) ; javax . naming . Reference mockRef = createNiceMock ( javax . naming . Reference . class ) ; java . util . Enumeration < ja... | org . junit . Assert . assertEquals ( "abcdefgh" , result . getPassword ( ) ) |
testUpdateMeasureBlankMeasureName ( ) { "<AssertPlaceHolder>" ; mondrian . olap . MondrianDef . Measure measure = new mondrian . olap . MondrianDef . Measure ( ) ; measure . name = org . pentaho . agilebi . modeler . models . annotations . util . MondrianSchemaHandlerTestIT . TEST_MEASURE_NAME ; measure . aggregator = ... | org . junit . Assert . assertTrue ( ( ( schemaDocument ) != null ) ) |
test_isWaterFreezing ( ) { com . levelup . java . exercises . beginner . FreezingAndBoilingPoints freezeAndBoilingPoints = new com . levelup . java . exercises . beginner . FreezingAndBoilingPoints ( ) ; com . levelup . java . exercises . beginner . FreezingAndBoilingPoints . FreezeAndBoiling freezeAndBoiling = freezeA... | org . junit . Assert . assertTrue ( freezeAndBoiling . isWaterFreezing ( ) ) |
testResolveClass01 ( ) { javax . el . ImportHandler handler = new javax . el . ImportHandler ( ) ; java . lang . Class < ? > result = handler . resolveClass ( "String" ) ; "<AssertPlaceHolder>" ; } resolveClass ( java . lang . String ) { java . lang . Class < ? > result = clazzes . get ( name ) ; if ( result == null ) ... | org . junit . Assert . assertEquals ( java . lang . String . class , result ) |
testConvertEmlUserIdWithUnrecognizedScheme ( ) { org . gbif . metadata . eml . UserId userId1 = new org . gbif . metadata . eml . UserId ( "http://unrecognized.org" , "0000-0099-6824-9999" ) ; org . gbif . doi . metadata . datacite . DataCiteMetadata . Creators . Creator . NameIdentifier id = org . gbif . ipt . utils .... | org . junit . Assert . assertNull ( id ) |
shouldNotFailWhenListOfHostAndPortIsEmpty ( ) { org . springframework . data . redis . connection . RedisSentinelConfiguration config = new org . springframework . data . redis . connection . RedisSentinelConfiguration ( "mymaster" , java . util . Collections . < java . lang . String > emptySet ( ) ) ; "<AssertPlaceHol... | org . junit . Assert . assertThat ( config . getSentinels ( ) . size ( ) , org . hamcrest . core . Is . is ( 0 ) ) |
givenContainerAlreadyExistsAndEmptyWhenPurgeContainerThenOK ( ) { storage . createContainer ( fr . gouv . vitam . workspace . common . WorkspaceFileSystemTest . CONTAINER_NAME ) ; storage . purgeContainer ( fr . gouv . vitam . workspace . common . WorkspaceFileSystemTest . CONTAINER_NAME ) ; "<AssertPlaceHolder>" ; } i... | org . junit . Assert . assertTrue ( storage . isExistingContainer ( fr . gouv . vitam . workspace . common . WorkspaceFileSystemTest . CONTAINER_NAME ) ) |
testRestoreAndAddNewItems ( ) { com . orientechnologies . orient . core . storage . impl . local . paginated . List < java . util . concurrent . Future < java . lang . Void > > futures = new com . orientechnologies . orient . core . storage . impl . local . paginated . ArrayList < java . util . concurrent . Future < ja... | org . junit . Assert . assertTrue ( databaseCompare . compare ( ) ) |
getPatientIdentifierTypes_shouldReturnEmptyListGivenDaoReturnsNull ( ) { when ( patientDaoMock . getPatientIdentifierTypes ( any ( ) , any ( ) , any ( ) , any ( ) ) ) . thenReturn ( null ) ; final java . util . List < org . openmrs . PatientIdentifierType > actualIdentifierTypes = patientService . getPatientIdentifierT... | org . junit . Assert . assertEquals ( 0 , actualIdentifierTypes . size ( ) ) |
testCanPrescribeIsFalseNullProvider ( ) { org . oscarehr . common . model . Drug d = getTestDrug ( ) ; d . setProviderNo ( null ) ; "<AssertPlaceHolder>" ; } canPrescribe ( org . oscarehr . common . model . Drug ) { if ( d == null ) { org . oscarehr . managers . RxManager . logger . debug ( "drug<sp>was<sp>null<sp>retu... | org . junit . Assert . assertFalse ( canPrescribe ( d ) ) |
sortCreatedDesc ( ) { java . lang . String sqlite = "SELECT<sp>*<sp>FROM<sp>users<sp>ORDER<sp>BY<sp>created<sp>desc<sp>LIMIT<sp>10" ; java . lang . String api = "select<sp>*<sp>order<sp>by<sp>created<sp>desc" ; org . apache . usergrid . query . validator . QueryRequest request = new org . apache . usergrid . query . va... | org . junit . Assert . assertTrue ( response . toString ( ) , response . result ( ) ) |
verify ( ) { for ( int rounds = 0 ; rounds < 100 ; rounds ++ ) { com . b2international . snowowl . core . events . AsyncRequest < com . b2international . snowowl . snomed . core . domain . SnomedConcepts > eclRequest = com . b2international . snowowl . snomed . datastore . request . SnomedRequests . prepareSearchConcep... | org . junit . Assert . assertNull ( error , error ) |
outputFigureEvents ( ) { org . xwiki . rendering . internal . renderer . event . EventsChainingRenderer renderer = new org . xwiki . rendering . internal . renderer . event . EventsChainingRenderer ( new org . xwiki . rendering . listener . chaining . ListenerChain ( ) ) ; org . xwiki . rendering . renderer . printer .... | org . junit . Assert . assertEquals ( expected , wikiPrinter . toString ( ) ) |
testCreateMessage ( ) { org . apache . qpid . jms . JmsSession session = ( ( org . apache . qpid . jms . JmsSession ) ( connection . createSession ( false , Session . AUTO_ACKNOWLEDGE ) ) ) ; "<AssertPlaceHolder>" ; } createMessage ( ) { try { return getSession ( ) . createMessage ( ) ; } catch ( javax . jms . JMSExcep... | org . junit . Assert . assertNotNull ( session . createMessage ( ) ) |
test_SingleFile ( ) { de . vandermeer . svg2vector . applications . fh . Svg2Vector_FH app = new de . vandermeer . svg2vector . applications . fh . Svg2Vector_FH ( ) ; java . lang . String [ ] args = org . apache . commons . lang3 . ArrayUtils . addAll ( de . vandermeer . svg2vector . applications . fh . Test_Svg2Vecto... | org . junit . Assert . assertEquals ( 0 , app . executeApplication ( args ) ) |
testZSS528 ( ) { getTo ( "/issue3/528-wrap.zul" ) ; org . zkoss . zss . test . selenium . entity . SpreadsheetWidget ss = focusSheet ( ) ; int height = jq ( "@Row:eq(0)" ) . height ( ) ; click ( jq ( "@Row:eq(0)<sp>@Cell:eq(1)" ) ) ; waitUntilProcessEnd ( org . zkoss . zss . test . selenium . Setup . getTimeoutL0 ( ) )... | org . junit . Assert . assertTrue ( ( height > ( jq ( "@Row:eq(0)" ) . height ( ) ) ) ) |
testseptedMsg ( ) { java . lang . String origin = "112aaaasssss2334455@£$¥èéùìòçØøÅåΔ_ΦΓΛΩΠΨΣΘΞ^{}\\[~]|€ÆæßÉ!\"#¤%&\'()*+,-./0123456789:;<=>?¡ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÑܧ¿abcdefghijklmnopqrstuvwxyzäöñüà" ; com . zx . sms . codec . cmpp . msg . CmppSubmitRequestMessage msg = createTestReq ( origin ) ; msg . setMsgCo... | org . junit . Assert . assertEquals ( msg . getMsgContent ( ) , ret . getMsgContent ( ) ) |
readData_FailedToParse ( ) { org . mockito . Mockito . when ( filereader . fileExist ( org . mockito . Mockito . anyString ( ) ) ) . thenReturn ( true ) ; org . mockito . Mockito . when ( filereader . readAllLine ( org . mockito . Mockito . anyString ( ) ) ) . thenReturn ( new java . lang . String [ ] { "1.487031029351... | org . junit . Assert . assertEquals ( 0 , listLocationEvent . size ( ) , 0 ) |
testGetMessageAnnotationUsingReceivedMessageWithoutMessageAnnotationsSection ( ) { org . apache . qpid . proton . amqp . Symbol symbolKeyName = org . apache . qpid . proton . amqp . Symbol . valueOf ( "myTestSymbolName" ) ; org . apache . qpid . proton . message . Message message = org . apache . qpid . proton . Proton... | org . junit . Assert . assertNull ( amqpMessageFacade . getMessageAnnotation ( symbolKeyName ) ) |
testBuildWithParametersWithOrderBy ( ) { org . lnu . is . domain . asset . type . AssetType assetType = new org . lnu . is . domain . asset . type . AssetType ( ) ; org . lnu . is . domain . asset . state . AssetState assetState = new org . lnu . is . domain . asset . state . AssetState ( ) ; org . lnu . is . domain . ... | org . junit . Assert . assertEquals ( expectedSql , actualQuery ) |
deveObterUFAutorizadoraComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . cadastro . NFRetornoConsultaCadastroDados retornoConsultaCadastroDados = new com . fincatto . documentofiscal . nfe400 . classes . cadastro . NFRetornoConsultaCadastroDados ( ) ; retornoConsultaCadastroDados . setUfAu... | org . junit . Assert . assertEquals ( DFUnidadeFederativa . SP , retornoConsultaCadastroDados . getUfAutorizadora ( ) ) |
getDescription ( ) { final org . bonitasoft . engine . data . instance . model . archive . impl . SAXMLObjectDataInstanceImpl saxmlObjectDataInstanceImpl = new org . bonitasoft . engine . data . instance . model . archive . impl . SAXMLObjectDataInstanceImpl ( ) ; saxmlObjectDataInstanceImpl . setDescription ( "plop8" ... | org . junit . Assert . assertEquals ( "plop8" , saxmlObjectDataInstanceImpl . getDescription ( ) ) |
ensureContextCreatedEmptyIsEmpty ( ) { com . epimorphics . lda . support . MultiMap < java . lang . String , java . lang . String > map = com . epimorphics . lda . tests_support . MakeData . parseQueryString ( "" ) ; com . epimorphics . lda . bindings . Bindings cc = com . epimorphics . lda . bindings . Bindings . crea... | org . junit . Assert . assertThat ( cc . parameterNames ( ) , com . epimorphics . lda . tests_support . Matchers . isEmpty ( ) ) |
testIsMatchSizeGreater ( ) { org . sagebionetworks . repo . model . table . ColumnModel model = new org . sagebionetworks . repo . model . table . ColumnModel ( ) ; model . setId ( "123" ) ; model . setColumnType ( ColumnType . STRING ) ; model . setName ( EntityField . name . name ( ) ) ; model . setMaximumSize ( ( ( ... | org . junit . Assert . assertTrue ( EntityField . name . isMatch ( model ) ) |
testUninstallExtensionWithCommonDocumentOnWiki ( ) { install ( this . collisionextension1 , "wiki" , this . contextUser ) ; install ( this . collisionextension2 , "wiki" , this . contextUser ) ; uninstall ( this . collisionextension1 , "wiki" ) ; com . xpn . xwiki . doc . XWikiDocument page = this . oldcore . getSpyXWi... | org . junit . Assert . assertFalse ( page . isNew ( ) ) |
testExec_withValidFilenameAndPassword_PerformsFullFlow ( ) { byte [ ] backupZipBytes = "Test<sp>zip<sp>bytes" . getBytes ( ) ; org . osc . core . broker . service . request . BackupRequest request = new org . osc . core . broker . service . request . BackupRequest ( ) ; org . osc . core . broker . service . BackupData ... | org . junit . Assert . assertTrue ( response . isSuccess ( ) ) |
testSetPositionLocalizable ( ) { final long [ ] initial = new long [ ] { 532 , 632 , 987421 } ; final long [ ] displacement = new long [ ] { 85 , 8643 , - 973 } ; final net . imglib2 . Point p = new net . imglib2 . Point ( initial ) ; final net . imglib2 . Point d = new net . imglib2 . Point ( displacement ) ; p . setP... | org . junit . Assert . assertEquals ( p . getLongPosition ( i ) , displacement [ i ] ) |
testRelatieWoonplaatsAanvangActueel ( ) { final java . util . Set < nl . bzk . brp . domain . algemeen . ZoekCriterium > zoekCriteria = new java . util . HashSet ( ) ; nl . bzk . brp . domain . algemeen . ZoekCriterium zoekCriteria1 = new nl . bzk . brp . domain . algemeen . ZoekCriterium ( getAttribuutElement ( Elemen... | org . junit . Assert . assertEquals ( 2 , ids . size ( ) ) |
testRoepValidatieAanMetResultaatConform ( ) { @ nl . bzk . brp . bijhouding . business . service . impl . SuppressWarnings ( "unchecked" ) nl . bzk . brp . bijhouding . business . bedrijfsregel . AbstractValidatie < nl . bzk . brp . bevraging . business . dto . verzoek . BerichtVerzoek < nl . bzk . brp . bevraging . bu... | org . junit . Assert . assertSame ( null , fout ) |
interBuilderTest ( ) { com . google . common . collect . Interner < java . lang . Integer > interners = com . google . common . collect . Interners . < java . lang . Integer > newBuilder ( ) . concurrencyLevel ( 2 ) . strong ( ) . < java . lang . Integer > build ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( interners ) |
shouldActivateBatch ( ) { org . camunda . bpm . engine . batch . Batch batch = helper . migrateProcessInstancesAsync ( 1 ) ; managementService . suspendBatchById ( batch . getId ( ) ) ; managementService . activateBatchById ( batch . getId ( ) ) ; batch = managementService . createBatchQuery ( ) . batchId ( batch . get... | org . junit . Assert . assertFalse ( batch . isSuspended ( ) ) |
testRemoveIdentities ( ) { java . lang . System . setProperty ( "drools.removeIdentities" , "true" ) ; try { org . drools . core . impl . InternalKnowledgeBase kBase = ( ( org . drools . core . impl . InternalKnowledgeBase ) ( org . drools . core . impl . KnowledgeBaseFactory . newKnowledgeBase ( ) ) ) ; kBase . addPac... | org . junit . Assert . assertEquals ( 12 , this . values . size ( ) ) |
shouldEscapeStringsWithEmbeddedQuotesAndBackslashes ( ) { java . lang . String original = "three\"blind\\\"mice" ; java . lang . String expected = "three\\\"blind\\\\\\\"mice" ; "<AssertPlaceHolder>" ; } escape ( java . lang . String ) { java . lang . String replace1 = org . apache . kafka . connect . data . Values . T... | org . junit . Assert . assertEquals ( expected , org . apache . kafka . connect . data . Values . escape ( original ) ) |
testToLongArray ( ) { "<AssertPlaceHolder>" ; } toLongArray ( com . liferay . portal . kernel . json . JSONArray , java . lang . String ) { if ( jsonArray == null ) { return new long [ 0 ] ; } java . util . List < java . lang . Long > values = com . liferay . portal . kernel . json . JSONUtil . toLongList ( jsonArray ,... | org . junit . Assert . assertArrayEquals ( new long [ ] { 1 , 2 } , com . liferay . portal . kernel . json . JSONUtil . toLongArray ( com . liferay . portal . kernel . json . JSONUtil . put ( 1 , 2 ) ) ) |
test_simple_map ( ) { java . lang . String str = "{name:\"张志昊\"}" ; java . util . Map < java . lang . String , java . lang . String > map = ( ( java . util . Map < java . lang . String , java . lang . String > ) ( org . nutz . json . Json . fromJson ( str ) ) ) ; java . lang . String json = org . nutz . json . Json . t... | org . junit . Assert . assertEquals ( str , json ) |
testGetElapsedTimeInHours ( ) { org . openscience . cdk . smsd . tools . TimeManager instance = new org . openscience . cdk . smsd . tools . TimeManager ( ) ; double expResult = 1.0E-4 ; myMethod ( 360 ) ; double result = instance . getElapsedTimeInHours ( ) ; "<AssertPlaceHolder>" ; } getElapsedTimeInHours ( ) { doubl... | org . junit . Assert . assertEquals ( expResult , result , 1.0E-4 ) |
forwardCompatibilityWorksWithGetTests ( ) { junit . framework . JUnit4TestAdapter adapter = new junit . framework . JUnit4TestAdapter ( org . junit . tests . running . classes . SuiteTest . All . class ) ; java . util . List < ? extends junit . framework . Test > tests = adapter . getTests ( ) ; "<AssertPlaceHolder>" ;... | org . junit . Assert . assertEquals ( 2 , tests . size ( ) ) |
testGetInclNoLocationClassesTrue ( ) { org . jacoco . core . runtime . AgentOptions options = new org . jacoco . core . runtime . AgentOptions ( "inclnolocationclasses=true" ) ; "<AssertPlaceHolder>" ; } getInclNoLocationClasses ( ) { return getOption ( org . jacoco . core . runtime . AgentOptions . INCLNOLOCATIONCLASS... | org . junit . Assert . assertTrue ( options . getInclNoLocationClasses ( ) ) |
testMessageAnnotationExistsUsingReceivedMessageWithoutMessageAnnotationsSection ( ) { org . apache . qpid . proton . amqp . Symbol symbolKeyName = org . apache . qpid . proton . amqp . Symbol . valueOf ( "myTestSymbolName" ) ; org . apache . qpid . proton . message . Message message = org . apache . qpid . proton . Pro... | org . junit . Assert . assertFalse ( amqpMessageFacade . messageAnnotationExists ( symbolKeyName ) ) |
testEnforceIntegerReturningNull ( ) { final org . apache . kafka . connect . data . SchemaBuilder schemaBuilder = org . apache . kafka . connect . data . SchemaBuilder . struct ( ) . field ( "int" , org . apache . kafka . connect . data . SchemaBuilder . int32 ( ) ) ; final io . confluent . ksql . util . GenericRowValu... | org . junit . Assert . assertNull ( genericRowValueTypeEnforcer . enforceFieldType ( 0 , null ) ) |
testUncommentedProperty ( ) { io . vertx . codegen . DataObjectModel model = new io . vertx . test . codegen . GeneratorHelper ( ) . generateDataObject ( io . vertx . test . codegen . UncommentedProperty . class ) ; io . vertx . codegen . PropertyInfo propertyInfo = model . getPropertyMap ( ) . get ( "theProperty" ) ; ... | org . junit . Assert . assertNull ( propertyInfo . getDoc ( ) ) |
invalidInputForNoObjectFactoryGenerationCase2 ( ) { java . io . File wsdl = getCodegenQEDataFileInput ( "AdcommerceConfigGroupMarketV1.wsdl" ) ; java . lang . String [ ] testArgs = new java . lang . String [ ] { "-dest" 0 , "-dest" 8 , "-genType" , "-dest" 5 , "-wsdl" , wsdl . getAbsolutePath ( ) , "-dest" 7 , "http://... | org . junit . Assert . assertTrue ( file . exists ( ) ) |
testSearchTwoFields3 ( ) { customer . setProvince ( "Ontario" ) ; customer . setF_Name ( "Igor" ) ; data = manager . search ( ) ; "<AssertPlaceHolder>" ; } search ( ) { java . lang . String selectStatement = "select<sp>*<sp>from<sp>users<sp>where<sp>" ; int size = selectStatement . length ( ) ; values = new java . util... | org . junit . Assert . assertTrue ( ( ( data . size ( ) ) == 1 ) ) |
testAppendEmpty ( ) { io . craft . atom . util . ByteArrayBuffer buffer = new io . craft . atom . util . ByteArrayBuffer ( 8 ) ; buffer . append ( new byte [ ] { } ) ; "<AssertPlaceHolder>" ; System . out . println ( java . lang . String . format ( "[CRAFT-ATOM-UTIL]<sp>(^_^)<sp><%s><sp>Case<sp>-><sp>test<sp>append<sp>... | org . junit . Assert . assertEquals ( 0 , buffer . length ( ) ) |
testCLCPBImplNullEnv ( ) { java . util . Map < java . lang . String , org . apache . hadoop . yarn . api . records . LocalResource > localResources = java . util . Collections . emptyMap ( ) ; java . util . Map < java . lang . String , java . lang . String > environment = new java . util . HashMap < java . lang . Strin... | org . junit . Assert . assertEquals ( "" , clcProto . getEnvironment ( ) . get ( "testCLCPBImplNullEnv" ) ) |
getObject ( ) { org . json . JSONObject task = index . addObject ( new org . json . JSONObject ( ) . put ( "firstname" , "Jimmie" ) . put ( "lastname" , "Barninger" ) . put ( "followers" , 93 ) . put ( "company" , "California<sp>Paint" ) , "a/go/?" ) ; index . waitTask ( task . getLong ( "taskID" ) ) ; org . json . JSO... | org . junit . Assert . assertEquals ( "Jimmie" , object . getString ( "firstname" ) ) |
testRevert ( ) { double tolerancePerc = 1 ; int nSamples = 500 ; int nFeatures = 3 ; org . nd4j . linalg . factory . Nd4j . getRandom ( ) . setSeed ( 12345 ) ; org . nd4j . linalg . api . ndarray . INDArray featureSet = org . nd4j . linalg . factory . Nd4j . rand ( nSamples , nFeatures ) ; org . nd4j . linalg . api . n... | org . junit . Assert . assertTrue ( ( maxdeltaPerc < tolerancePerc ) ) |
shouldDeleteAConceptDescription ( ) { int before = service . getConceptByUuid ( conceptUuid ) . getDescriptions ( ) . size ( ) ; handle ( newDeleteRequest ( ( ( ( getURI ( ) ) + "/" ) + ( getUuid ( ) ) ) , new org . openmrs . module . webservices . rest . web . v1_0 . controller . openmrs1_9 . Parameter ( "reason" , "t... | org . junit . Assert . assertEquals ( ( before - 1 ) , after ) |
shouldFindLastIndexOfEachValue ( ) { for ( int i = 0 ; i != ( data . length ) ; ++ i ) { java . lang . String value = data [ i ] ; int lastIndex = list . lastIndexOf ( value ) ; "<AssertPlaceHolder>" ; } } lastIndexOf ( java . lang . Object ) { return values . lastIndexOf ( o ) ; } | org . junit . Assert . assertThat ( lastIndex , org . hamcrest . core . Is . is ( i ) ) |
testGetSchema ( ) { org . talend . codegen . enforcer . IndexMapper indexMapper = new org . talend . codegen . enforcer . IndexMapperByIndex ( org . talend . codegen . enforcer . OutgoingSchemaEnforcerTest . talend6Schema ) ; org . talend . codegen . enforcer . OutgoingSchemaEnforcer enforcer = new org . talend . codeg... | org . junit . Assert . assertThat ( actualSchema , org . hamcrest . Matchers . equalTo ( org . talend . codegen . enforcer . OutgoingSchemaEnforcerTest . talend6Schema ) ) |
testGetState_Dead2 ( ) { java . util . Set < org . apache . accumulo . server . master . state . TServerInstance > liveServers = new java . util . HashSet ( ) ; liveServers . add ( future ) ; tls = new org . apache . accumulo . server . master . state . TabletLocationState ( keyExtent , null , current , last , null , o... | org . junit . Assert . assertEquals ( TabletState . ASSIGNED_TO_DEAD_SERVER , tls . getState ( liveServers ) ) |
testUnresolved ( ) { org . apache . tuscany . sca . contribution . resolver . ExtensibleModelResolverTestCase . Model x = new org . apache . tuscany . sca . contribution . resolver . ExtensibleModelResolverTestCase . Model ( "a" ) ; org . apache . tuscany . sca . contribution . resolver . ExtensibleModelResolverTestCas... | org . junit . Assert . assertTrue ( ( x == y ) ) |
testNoType ( ) { com . ibm . ws . microprofile . openapi . impl . model . security . SecuritySchemeImpl noType = new com . ibm . ws . microprofile . openapi . impl . model . security . SecuritySchemeImpl ( ) ; com . ibm . ws . microprofile . openapi . test . utils . TestValidationHelper vh = new com . ibm . ws . microp... | org . junit . Assert . assertEquals ( 1 , vh . getEventsSize ( ) ) |
testResolvePackageWithNonProjectPath ( ) { final javax . enterprise . inject . spi . Bean moduleServiceBean = ( ( javax . enterprise . inject . spi . Bean ) ( beanManager . getBeans ( org . kie . workbench . common . services . shared . project . KieModuleService . class ) . iterator ( ) . next ( ) ) ) ; final javax . ... | org . junit . Assert . assertNull ( result ) |
shouldRejectIpv4CidrAddress ( ) { org . openstack . atlas . api . validation . results . ValidatorResult result = validator . validate ( node , org . openstack . atlas . api . validation . validators . POST ) ; "<AssertPlaceHolder>" ; } passedValidation ( ) { return expectationResultList . isEmpty ( ) ; } | org . junit . Assert . assertTrue ( result . passedValidation ( ) ) |
testSimpleRoundTrip ( ) { final com . fasterxml . jackson . databind . ObjectMapper objectMapper = new com . fasterxml . jackson . databind . ObjectMapper ( ) ; final java . lang . String roundTripJson = objectMapper . writeValueAsString ( objectMapper . readValue ( simpleJson , com . metamx . datatypes . mmx . MmxAuct... | org . junit . Assert . assertEquals ( simpleJson , roundTripJson ) |
setToTest ( ) { int [ ] values = new int [ ] { 1 , 0 , 3 , 2 } ; org . openscience . cdk . group . Permutation a = new org . openscience . cdk . group . Permutation ( values ) ; org . openscience . cdk . group . Permutation b = new org . openscience . cdk . group . Permutation ( values . length ) ; a . setTo ( b ) ; "<... | org . junit . Assert . assertTrue ( a . isIdentity ( ) ) |
getIntDefaultValueWithPropertValueIsNotInt ( ) { java . lang . System . setProperty ( "key" , "NotInt" ) ; "<AssertPlaceHolder>" ; } getInt ( java . lang . String , int ) { java . lang . String value = org . restnext . util . SystemPropertyUtils . get ( key ) ; if ( value == null ) { return def ; } value = value . trim... | org . junit . Assert . assertEquals ( 1 , org . restnext . util . SystemPropertyUtils . getInt ( "key" , 1 ) ) |
shouldUnwrapEdge ( ) { final uk . gov . gchq . gaffer . data . element . Edge edge = new uk . gov . gchq . gaffer . data . element . Edge . Builder ( ) . build ( ) ; final uk . gov . gchq . gaffer . data . element . ElementValueLoader edgeLoader = mock ( uk . gov . gchq . gaffer . data . element . ElementValueLoader . ... | org . junit . Assert . assertSame ( edge , result ) |
testGetProperties ( ) { System . out . println ( "getProperties" ) ; fish . payara . nucleus . microprofile . config . source . EnvironmentConfigSource instance = new fish . payara . nucleus . microprofile . config . source . EnvironmentConfigSource ( ) ; java . util . Map < java . lang . String , java . lang . String ... | org . junit . Assert . assertEquals ( environment . get ( string ) , instance . getValue ( string ) ) |
testConfigurationForwarding ( ) { org . apache . flink . configuration . Configuration configuration = new org . apache . flink . configuration . Configuration ( ) ; configuration . setString ( "foobar" , "foobar" ) ; org . apache . flink . api . scala . FlinkILoop flinkILoop = new org . apache . flink . api . scala . ... | org . junit . Assert . assertEquals ( configuration , forwardedConfiguration ) |
createKeyedBundleKeyed ( ) { org . apache . beam . runners . direct . portable . CommittedBundle < org . apache . beam . sdk . values . KV < java . lang . String , java . lang . Integer > > keyedBundle = bundleFactory . < java . lang . String , org . apache . beam . sdk . values . KV < java . lang . String , java . lan... | org . junit . Assert . assertThat ( keyedBundle . getKey ( ) . getKey ( ) , org . hamcrest . Matchers . equalTo ( "foo" ) ) |
when_shipmentroute_pastMaxLoatAtAct1ShouldBe10 ( ) { stateManager . informInsertionStarts ( java . util . Arrays . asList ( shipment_route ) , java . util . Collections . < jsprit . core . algorithm . state . Job > emptyList ( ) ) ; jsprit . core . algorithm . state . Capacity atAct1 = stateManager . getActivityState (... | org . junit . Assert . assertEquals ( 10 , atAct1 . get ( 0 ) ) |
isValidLoraGatewayReturnsFalseForTooLowLoraPort ( ) { final io . vertx . core . json . JsonObject gateway = getValidGateway ( ) ; final io . vertx . core . json . JsonObject loraConfig = org . eclipse . hono . adapter . lora . providers . LoraUtils . getLoraConfigFromLoraGatewayDevice ( gateway ) ; loraConfig . put ( "... | org . junit . Assert . assertFalse ( org . eclipse . hono . adapter . lora . providers . LoraUtils . isValidLoraGateway ( gateway ) ) |
getHighBoundary ( ) { final org . kie . dmn . feel . runtime . Range . RangeBoundary highBoundary = Range . RangeBoundary . CLOSED ; final org . kie . dmn . feel . runtime . impl . RangeImpl rangeImpl = new org . kie . dmn . feel . runtime . impl . RangeImpl ( Range . RangeBoundary . OPEN , 10 , 15 , highBoundary ) ; "... | org . junit . Assert . assertEquals ( highBoundary , rangeImpl . getHighBoundary ( ) ) |
testFailure ( ) { cc . blynk . server . core . model . auth . User user = new cc . blynk . server . core . model . auth . User ( ) ; user . email = "test" ; user . appName = cc . blynk . utils . AppNameUtil . BLYNK ; cc . blynk . server . workers . ReportingWorker reportingWorker = new cc . blynk . server . workers . R... | org . junit . Assert . assertTrue ( map . isEmpty ( ) ) |
testTrashNotfound ( ) { ch . cyberduck . core . Local l = new ch . cyberduck . core . Local ( java . lang . System . getProperty ( "java.io.tmpdir" ) , java . util . UUID . randomUUID ( ) . toString ( ) ) ; "<AssertPlaceHolder>" ; new ch . cyberduck . core . local . WorkspaceTrashFeature ( ) . trash ( l ) ; } exists ( ... | org . junit . Assert . assertFalse ( l . exists ( ) ) |
case8 ( ) { org . openstack . atlas . usagerefactor . List < org . openstack . atlas . service . domain . usage . entities . LoadBalancerMergedHostUsage > mergedRecords = usagePollerHelper . processExistingEvents ( lbHostMap ) ; "<AssertPlaceHolder>" ; org . openstack . atlas . usagerefactor . junit . AssertLoadBalance... | org . junit . Assert . assertEquals ( 1 , mergedRecords . size ( ) ) |
testGetNoFilename ( ) { final java . io . File expectedFile = testFolder . newFile ( "test.txt" ) ; org . apache . commons . io . FileUtils . write ( expectedFile , "asdf" , StandardCharsets . UTF_8 ) ; expectedFile . deleteOnExit ( ) ; org . opencastproject . workingfilerepository . api . WorkingFileRepository repo = ... | org . junit . Assert . assertEquals ( expectedFile , resultingFile ) |
runTest ( ) { boolean result = checkNoError ( "Social_Community_Get_Community_Data_By_Entity" ) ; "<AssertPlaceHolder>" ; } getNoErrorMsg ( ) { return noErrorMsg ; } | org . junit . Assert . assertTrue ( getNoErrorMsg ( ) , result ) |
onGivenRequestFieldResourcesGetShouldHandleIt ( ) { io . katharsis . core . internal . dispatcher . path . JsonPath jsonPath = pathBuilder . buildPath ( "/users/1/assignedProjects" ) ; io . katharsis . core . internal . dispatcher . controller . FieldResourceGet sut = new io . katharsis . core . internal . dispatcher .... | org . junit . Assert . assertNotNull ( response ) |
testSetNpi ( ) { for ( byte npi : org . smpp . pdu . AddressTest . NPIS ) { address . setNpi ( npi ) ; "<AssertPlaceHolder>" ; } } getNpi ( ) { return npi ; } | org . junit . Assert . assertEquals ( npi , address . getNpi ( ) ) |
shouldExportPhraseQueryWithAllOptions ( ) { com . couchbase . client . java . search . queries . PhraseQuery fts = com . couchbase . client . java . search . SearchQuery . phrase ( "salty" , "beers" ) . boost ( 1.5 ) . field ( "field" ) ; com . couchbase . client . java . search . SearchQuery query = new com . couchbas... | org . junit . Assert . assertEquals ( expected , query . export ( ) ) |
longArrayCopyOf2 ( ) { int [ ] array = new int [ ] { 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 } ; org . diirt . util . array . ListNumber coll = new org . diirt . util . array . ArrayInt ( array ) ; long [ ] array2 = org . diirt . util . array . CollectionNumbers . longArrayCopyOf ( coll ) ; "<AssertPlaceHolder>" ; } long... | org . junit . Assert . assertThat ( array2 , equalTo ( new long [ ] { 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 } ) ) |
testToByteFromByte ( ) { java . lang . Object result = com . orientechnologies . orient . core . metadata . schema . OType . convert ( ( ( byte ) ( 10 ) ) , com . orientechnologies . orient . core . metadata . schema . Byte . class ) ; "<AssertPlaceHolder>" ; } convert ( java . lang . Object , java . lang . Class ) { i... | org . junit . Assert . assertEquals ( result , ( ( byte ) ( 10 ) ) ) |
testDefaultTokenizer3 ( ) { java . lang . String toTokenize = "Mary<sp>had<sp>a<sp>little<sp>lamb." ; org . deeplearning4j . text . tokenization . tokenizerfactory . TokenizerFactory t = new org . deeplearning4j . text . tokenization . tokenizerfactory . DefaultTokenizerFactory ( ) ; org . deeplearning4j . text . token... | org . junit . Assert . assertEquals ( tok1 , tok2 ) |
deveObterDescricaoMunicipioComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . NFEndereco endereco = new com . fincatto . documentofiscal . nfe400 . classes . NFEndereco ( ) ; endereco . setDescricaoMunicipio ( "Fr3gSvoAeKbGpQD3r98KFeB50P3Gq14XBVsv5fpiaBvJ3HTOpREiwYGs20Xw" ) ; "<AssertPlaceH... | org . junit . Assert . assertEquals ( "Fr3gSvoAeKbGpQD3r98KFeB50P3Gq14XBVsv5fpiaBvJ3HTOpREiwYGs20Xw" , endereco . getDescricaoMunicipio ( ) ) |
build_calledResizer_returnsGivenResizer ( ) { net . coobird . thumbnailator . ThumbnailParameter param = new net . coobird . thumbnailator . builders . ThumbnailParameterBuilder ( ) . scale ( 0.5 ) . resizer ( Resizers . BICUBIC ) . build ( ) ; "<AssertPlaceHolder>" ; } getResizer ( ) { return resizer ; } | org . junit . Assert . assertEquals ( Resizers . BICUBIC , param . getResizer ( ) ) |
nullCont_ContOnly ( ) { com . tesora . dve . sql . schema . SchemaContext db = buildBasicSchema ( "using<sp>container<sp>testcont<sp>(null)" ) ; "<AssertPlaceHolder>" ; com . tesora . dve . sql . schema . PEStorageGroup group = db . getCurrentDatabase ( ) . getDefaultStorage ( db ) ; stmtTest ( db , "/*<sp>nullCont_Con... | org . junit . Assert . assertNull ( db . getCurrentTenant ( ) . get ( db ) ) |
testJPQL ( ) { javax . persistence . EntityManager em = org . meri . jpa . simplest . LoadEntityTest . factory . createEntityManager ( ) ; javax . persistence . Query query = em . createQuery ( "SELECT<sp>x<sp>FROM<sp>Person<sp>x" ) ; java . util . List < org . meri . jpa . simplest . entities . Person > allUsers = que... | org . junit . Assert . assertEquals ( allUsers . get ( 0 ) , person ) |
smallLongDivision ( ) { long a = org . teavm . vm . LongTest . id ( ( - 1 ) ) ; long b = 3 ; "<AssertPlaceHolder>" ; } id ( long ) { return value ; } | org . junit . Assert . assertEquals ( 0 , ( a / b ) ) |
givenAcceptingAllCertificatesUsing4_4_whenHttpsUrlIsConsumedUsingRestTemplate_thenCorrect ( ) { final org . apache . http . impl . client . CloseableHttpClient httpClient = org . apache . http . impl . client . HttpClients . custom ( ) . setSSLHostnameVerifier ( new org . apache . http . conn . ssl . NoopHostnameVerifi... | org . junit . Assert . assertThat ( response . getStatusCode ( ) . value ( ) , org . hamcrest . Matchers . equalTo ( 200 ) ) |
addingVersion ( ) { boolean addRelease = true ; jiraIssueMigrator = spy ( new hudson . plugins . jira . JiraIssueMigrator ( hudson . plugins . jira . JiraIssueMigratorTest . PROJECT_KEY , hudson . plugins . jira . JiraIssueMigratorTest . RELEASE , hudson . plugins . jira . JiraIssueMigratorTest . QUERY , null , addRele... | org . junit . Assert . assertTrue ( result ) |
testRegistryStoredQuery_StableAndOnDemandDocs ( ) { gov . hhs . fha . nhinc . docregistry . adapter . AdapterComponentDocRegistryOrchImpl orchImpl = createAdapterComponentDocRegistryOrchImpl ( ) ; oasis . names . tc . ebxml_regrep . xsd . query . _3 . AdhocQueryRequest request = createAdhocQueryRequestForStableAndOnDem... | org . junit . Assert . assertEquals ( 3 , objectList . size ( ) ) |
testPriorityLevel22 ( ) { int n = jannovar . common . VariantType . priorityLevel ( VariantType . UPSTREAM ) ; "<AssertPlaceHolder>" ; } priorityLevel ( jannovar . common . VariantType ) { switch ( vt ) { case FS_DELETION : case FS_INSERTION : case NON_FS_SUBSTITUTION : case FS_SUBSTITUTION : case MISSENSE : case NON_F... | org . junit . Assert . assertEquals ( 8 , n ) |
testGetTypeByNameDuplicate ( ) { setupType ( de . metas . document . refid . api . impl . ReferenceNoDAOTests . Gen1 . class ) ; setupType ( de . metas . document . refid . api . impl . ReferenceNoDAOTests . Gen1 . class ) ; final de . metas . document . refid . api . impl . PlainReferenceNoDAO dao = new de . metas . d... | org . junit . Assert . assertThat ( dao . retrieveReferenceNoTypes ( ) . size ( ) , org . hamcrest . Matchers . is ( 2 ) ) |
testDeserializationWithRepeatableField ( ) { com . liferay . dynamic . data . mapping . model . DDMForm ddmForm = com . liferay . dynamic . data . mapping . test . util . DDMFormTestUtil . createDDMForm ( ) ; ddmForm . addDDMFormField ( com . liferay . dynamic . data . mapping . test . util . DDMFormTestUtil . createTe... | org . junit . Assert . assertEquals ( ddmFormFieldValues . toString ( ) , 3 , ddmFormFieldValues . size ( ) ) |
getGroupsForUserWithValidUser ( ) { java . lang . String user = "vmmuser1" ; com . ibm . websphere . simplicity . log . Log . info ( com . ibm . ws . security . wim . adapter . ldap . fat . FATTestADwithSSL . c , "getGroupsForUserWithValidUser" , "Checking<sp>with<sp>a<sp>valid<sp>user." ) ; java . util . List < java .... | org . junit . Assert . assertTrue ( list . isEmpty ( ) ) |
testConnectionPropertiesContainExpectedMetaData ( ) { try ( org . apache . qpid . jms . test . testpeer . TestAmqpPeer testPeer = new org . apache . qpid . jms . test . testpeer . TestAmqpPeer ( ) ) { org . hamcrest . Matcher < ? > connPropsMatcher = org . hamcrest . Matchers . allOf ( org . hamcrest . Matchers . hasEn... | org . junit . Assert . assertNull ( testPeer . getThrowable ( ) ) |
validFindForProduct ( ) { org . candlepin . model . ProductCertificate cert = new org . candlepin . model . ProductCertificate ( ) ; cert . setProduct ( product ) ; cert . setKey ( "key" ) ; cert . setCert ( "cert" ) ; productCertificateCurator . create ( cert ) ; "<AssertPlaceHolder>" ; } findForProduct ( org . candle... | org . junit . Assert . assertEquals ( cert , productCertificateCurator . findForProduct ( product ) ) |
testEmailWithNormalCss ( ) { java . lang . String input = "<html>" + ( ( ( ( ( ( ( ( "<sp><head>" + "<sp><style>" ) + "<sp>span<sp>{font-size:<sp>10px;}" ) + "<sp></style>" ) + "<sp></head>" ) + "<sp><body>" ) + "<sp><span<sp>style='color:<sp>red;'>Red<sp>text</span>" ) + "<sp></body>" ) + "</html>" ) ; java . lang . S... | org . junit . Assert . assertEquals ( clean ( input ) , output ) |
consistencyLabels ( ) { org . opencb . commons . datastore . core . QueryResponse < java . lang . String > queryResponse = cellBaseClient . getClinicalClient ( ) . consistencyLabels ( ) ; "<AssertPlaceHolder>" ; } consistencyLabels ( ) { org . opencb . commons . datastore . core . QueryResponse < java . lang . String >... | org . junit . Assert . assertTrue ( ( ( queryResponse . allResults ( ) . size ( ) ) > 0 ) ) |
readMissingFile ( ) { java . io . File file = new java . io . File ( "src/test/resources/cpus/does-not-exist" ) ; "<AssertPlaceHolder>" ; } readCPUMask ( io . vertx . core . impl . cpu . File ) { if ( ( file == null ) || ( ! ( file . exists ( ) ) ) ) { return - 1 ; } final io . vertx . core . impl . cpu . FileInputStre... | org . junit . Assert . assertThat ( io . vertx . core . impl . cpu . CpuCoreSensor . readCPUMask ( file ) , org . hamcrest . core . Is . is ( ( - 1 ) ) ) |
testSerializeAndDeserialize ( ) { org . bson . types . ObjectId expected = new org . bson . types . ObjectId ( ) ; java . lang . String json = com . streamreduce . core . model . dto . ObjectIdDeserializerTest . mapper . writeValueAsString ( expected ) ; org . bson . types . ObjectId actual = com . streamreduce . core ... | org . junit . Assert . assertEquals ( expected , actual ) |
testCreateBusinessObjectDefinitionSubjectMatterExpertLowerCaseParameters ( ) { businessObjectDefinitionDaoTestHelper . createBusinessObjectDefinitionEntity ( org . finra . herd . service . BDEF_NAMESPACE , org . finra . herd . service . BDEF_NAME , org . finra . herd . service . DATA_PROVIDER_NAME , org . finra . herd ... | org . junit . Assert . assertEquals ( new org . finra . herd . model . api . xml . BusinessObjectDefinitionSubjectMatterExpert ( resultBusinessObjectDefinitionSubjectMatterExpert . getId ( ) , new org . finra . herd . model . api . xml . BusinessObjectDefinitionSubjectMatterExpertKey ( BDEF_NAMESPACE , BDEF_NAME , org ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.