input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
shouldMatchObjectsBasedOnKeyFunctions ( ) { uk . gov . gchq . gaffer . types . TypeSubTypeValue testValue = new uk . gov . gchq . gaffer . types . TypeSubTypeValue ( "myType" , "mySubType" , "30" ) ; java . util . List < java . lang . Long > testList = com . google . common . collect . Lists . newArrayList ( 100L , 200... | org . junit . Assert . assertEquals ( expected , match . matching ( testValue ) ) |
testGetDiscount_DiscountNotExisting ( ) { org . oscm . ui . model . Discount result = discountBean . getDiscount ( org . oscm . ui . beans . DiscountBeanTest . SERVICE_KEY_DISCOUNT_NOT_EXISTING ) ; "<AssertPlaceHolder>" ; } getDiscount ( long ) { org . oscm . ui . model . Discount discount = null ; try { org . oscm . i... | org . junit . Assert . assertNull ( result ) |
testRestoreRegistryInstances ( ) { java . io . File heliumConf = new java . io . File ( tmpDir , "helium.conf" ) ; org . apache . zeppelin . helium . Helium helium = new org . apache . zeppelin . helium . Helium ( heliumConf . getAbsolutePath ( ) , localRegistryPath . getAbsolutePath ( ) , null , null , null , null ) ;... | org . junit . Assert . assertEquals ( 2 , helium . getAllPackageInfo ( ) . size ( ) ) |
testTaggedCachedGauge ( ) { taggedMetric = new com . github . sps . metrics . TaggedCachedGauge < java . lang . Integer > ( 1 , java . util . concurrent . TimeUnit . DAYS ) { @ com . github . sps . metrics . Override public java . util . Map < java . lang . String , java . lang . String > getTags ( ) { return tags ; } ... | org . junit . Assert . assertEquals ( tags , taggedMetric . getTags ( ) ) |
testGetBranch ( ) { org . eluder . coveralls . maven . plugin . domain . Job job = new org . eluder . coveralls . maven . plugin . domain . Job ( ) . withBranch ( "master" ) ; "<AssertPlaceHolder>" ; } getBranch ( ) { if ( ( ( ( branch ) != null ) && ( ( getGit ( ) ) != null ) ) && ( ( getGit ( ) . getRemotes ( ) ) != ... | org . junit . Assert . assertEquals ( "master" , job . getBranch ( ) ) |
testNoProcessApplicationIsDeployed ( ) { java . util . Set < java . lang . String > registeredPAs = org . camunda . bpm . BpmPlatform . getProcessApplicationService ( ) . getProcessApplicationNames ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return deletedCache . isEmpty ( ) ; } | org . junit . Assert . assertTrue ( registeredPAs . isEmpty ( ) ) |
testCommitTx ( ) { com . google . appengine . api . datastore . AsyncDatastoreService service = com . google . appengine . api . datastore . DatastoreServiceFactory . getAsyncDatastoreService ( ) ; com . google . appengine . api . datastore . Transaction tx = waitOnFuture ( service . beginTransaction ( TransactionOptio... | org . junit . Assert . assertNotNull ( getSingleEntity ( service , key ) ) |
testMaxConnections ( ) { final int MIN_CONNECTIONS = 2 ; final int MAX_CONNECTIONS = 2 ; java . util . Map < java . lang . String , java . io . Serializable > params = new java . util . HashMap < java . lang . String , java . io . Serializable > ( this . connectionParameters ) ; params . put ( org . geotools . arcsde .... | org . junit . Assert . assertEquals ( expected , session ) |
testWritePageWithoutVariables ( ) { java . lang . String templateWithoutVariables = "<html<sp>page/>" ; org . eclipse . rap . rwt . internal . service . StartupPageTemplate template = new org . eclipse . rap . rwt . internal . service . StartupPageTemplate ( templateWithoutVariables ) ; template . writePage ( printWrit... | org . junit . Assert . assertEquals ( templateWithoutVariables , getWrittenOutput ( ) ) |
testFetchByPrimaryKeyMissing ( ) { long pk = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; com . liferay . knowledge . base . model . KBArticle missingKBArticle = _persistence . fetchByPrimaryKey ( pk ) ; "<AssertPlaceHolder>" ; } fetchByPrimaryKey ( long ) { return com . liferay . ada... | org . junit . Assert . assertNull ( missingKBArticle ) |
testNonSSLSessionHasPayload ( ) { com . att . aro . core . packetanalysis . pojo . PacketAnalyzerResult pktAnalyzerResult = sessionPacketsPayloadTestSetup ( 1 , 0 , 1 , 1 ) ; httpsUsageResult = ( ( com . att . aro . core . bestpractice . pojo . HttpsUsageResult ) ( httpsUsageImpl . runTest ( pktAnalyzerResult ) ) ) ; h... | org . junit . Assert . assertEquals ( 2 , httpsUsageEntries . size ( ) ) |
deleteEmployee ( ) { try { jpaworkshop . test . EmployeeTest . logger . info ( "deleteEmployee" ) ; jpaworkshop . test . EmployeeTest . em . getTransaction ( ) . begin ( ) ; jpaworkshop . model . Employee emp = new jpaworkshop . model . Employee ( ) ; emp . setName ( "Peter<sp>Muster" ) ; emp . setSalary ( 90000 ) ; jp... | org . junit . Assert . assertNull ( emp ) |
testSheetName_missingInFile ( ) { java . io . File f = new java . io . File ( "src/test/resources/sheets.xlsx" ) ; try ( org . apache . poi . ss . usermodel . Workbook wb = com . monitorjbl . xlsx . StreamingReader . builder ( ) . open ( f ) ) { wb . getSheet ( "asdfasdfasdf" ) ; org . junit . Assert . fail ( "Should<s... | org . junit . Assert . assertTrue ( f . exists ( ) ) |
testGetNumBands ( ) { "<AssertPlaceHolder>" ; } getNumBands ( ) { return 0 ; } | org . junit . Assert . assertEquals ( 0 , metadata . getNumBands ( ) ) |
testEvaluationAdjacentFailedThreeTerms ( ) { java . lang . String query = buildFunction ( ContentFunctions . CONTENT_ADJACENT_FUNCTION_NAME , Constants . TERM_OFFSET_MAP_JEXL_VARIABLE_NAME , "'dog'" , "'cat'" , "'rat'" ) ; org . apache . commons . jexl2 . Expression expr = datawave . query . jexl . functions . ContentF... | org . junit . Assert . assertTrue ( datawave . query . jexl . functions . ContentFunctionsTest . expect ( o , false ) ) |
mergeAddsPropertiesFromSystemPropertiesWithPrefix ( ) { systemProperties = org . gradle . util . GUtil . map ( ( ( IGradlePropertiesLoader . SYSTEM_PROJECT_PROPERTIES_PREFIX ) + "systemProp" ) , "system<sp>value" , "ignoreMe" , "ignored" ) ; gradlePropertiesLoader . loadProperties ( settingsDir , startParameter , syste... | org . junit . Assert . assertEquals ( "system<sp>value" , properties . get ( "systemProp" ) ) |
atomStereoLeft ( ) { org . openscience . cdk . isomorphism . matchers . Expr actual = org . openscience . cdk . smarts . SmartsExprReadTest . getAtomExpr ( "[@]" ) ; org . openscience . cdk . isomorphism . matchers . Expr expected = org . openscience . cdk . smarts . SmartsExprReadTest . expr ( org . openscience . cdk ... | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( expected ) ) |
testCommandServiceSetup ( ) { for ( org . kie . server . services . api . KieServerExtension extension : ( ( org . kie . server . services . impl . KieServerImpl ) ( kieServer ) ) . getServerExtensions ( ) ) { org . kie . server . services . api . KieContainerCommandService < ? > tmp = extension . getAppComponents ( or... | org . junit . Assert . assertNotNull ( tmp ) |
testGetJobExecutionsPastEnd ( ) { java . util . List < org . springframework . batch . core . JobExecution > jobExecutions = dao . getJobExecutions ( "job" , 100 , 100 ) ; "<AssertPlaceHolder>" ; } size ( ) { return count . get ( ) ; } | org . junit . Assert . assertEquals ( 0 , jobExecutions . size ( ) ) |
shouldBeValidWithGlobalHC ( ) { io . gravitee . management . model . api . ApiEntity api = mock ( io . gravitee . management . model . api . ApiEntity . class ) ; io . gravitee . definition . model . services . healthcheck . HealthCheckService hcSrv = mock ( io . gravitee . definition . model . services . healthcheck .... | org . junit . Assert . assertTrue ( valid ) |
testAddJavaFacetToBatch_facetExitsInProject ( ) { when ( mockFacetedProject . hasProjectFacet ( JavaFacet . FACET ) ) . thenReturn ( true ) ; when ( mockFacetedProject . hasProjectFacet ( JavaFacet . VERSION_1_7 ) ) . thenReturn ( true ) ; when ( mockFacetedProject . getProjectFacetVersion ( JavaFacet . FACET ) ) . the... | org . junit . Assert . assertEquals ( 0 , facetUtil . facetInstallSet . size ( ) ) |
testAutoDupTreeWithListLabels ( ) { java . lang . String grammar = "grammar<sp>T;\n" + ( ( ( ( "options<sp>{output=AST;}\n" + "a<sp>:<sp>ID<sp>INT<sp>-><sp>^(ID<sp>INT);\n" ) + "ID<sp>:<sp>\'a\'..\'z\'+<sp>;\n" ) + "a" 1 ) + "a" 2 ) ; java . lang . String treeGrammar = "a" 0 + ( ( "options<sp>{output=AST;<sp>ASTLabelTy... | org . junit . Assert . assertEquals ( "a" 4 , found ) |
testOfferProducerWithAddressDoesNotGrantNegativeCredit ( ) { org . mockito . Mockito . when ( manager . getServer ( ) ) . thenReturn ( server ) ; org . mockito . Mockito . when ( server . getPagingManager ( ) ) . thenReturn ( pagingManager ) ; org . mockito . Mockito . when ( pagingManager . getPageStore ( any ( org . ... | org . junit . Assert . assertNotNull ( argument . getValue ( ) ) |
speedTest ( ) { fiji . plugin . trackmate . tracking . oldlap . hungarian . MunkresKuhnAlgorithm munkresKuhn = new fiji . plugin . trackmate . tracking . oldlap . hungarian . MunkresKuhnAlgorithm ( ) ; fiji . plugin . trackmate . tracking . oldlap . hungarian . JonkerVolgenantAlgorithm jonkerVolgenant = new fiji . plug... | org . junit . Assert . assertTrue ( ( ( end1 - start1 ) > ( end2 - start2 ) ) ) |
testReusableEntityEndOfStream ( ) { org . mockito . Mockito . when ( inStream . read ( ) ) . thenReturn ( ( - 1 ) ) ; org . mockito . Mockito . when ( entity . isStreaming ( ) ) . thenReturn ( true ) ; org . mockito . Mockito . when ( execRuntime . isConnectionReusable ( ) ) . thenReturn ( true ) ; final java . io . In... | org . junit . Assert . assertEquals ( ( - 1 ) , content . read ( ) ) |
testColumnToValueTimestampInvalid ( ) { com . google . api . services . bigquery . model . TableFieldSchema column = new com . google . api . services . bigquery . model . TableFieldSchema ( ) . setName ( invalidTimestampField ) . setType ( "TIMESTAMP" ) ; org . apache . avro . generic . GenericData . Record record = g... | org . junit . Assert . assertTrue ( isThrown ) |
testInternedString1 ( ) { java . lang . String s = new java . lang . String ( "1" ) ; s . intern ( ) ; java . lang . String s2 = "1" ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertThat ( ( s2 == s ) , org . hamcrest . Matchers . is ( false ) ) |
testFindingMultipleElementsByEmptyTagNameShouldThrow ( ) { driver . get ( pages . formPage ) ; java . util . List < org . openqa . selenium . WebElement > elements = driver . findElements ( org . openqa . selenium . By . tagName ( "" ) ) ; "<AssertPlaceHolder>" ; } size ( ) { java . lang . Object response = executeMeth... | org . junit . Assert . assertThat ( elements . size ( ) , org . hamcrest . Matchers . is ( 0 ) ) |
testGeldigeAutorisatieSoortAutorisatieVerplichtGeenOnderzoekZoeken ( ) { final nl . bzk . brp . domain . element . AttribuutElement attribuutElement = getAttribuutElement ( Element . ONDERZOEK_DATUMAANVANG . getId ( ) ) ; final nl . bzk . brp . service . bevraging . zoekpersoongeneriek . AbstractZoekPersoonVerzoek bevr... | org . junit . Assert . assertEquals ( 1 , meldingen . size ( ) ) |
testAutoGenerateWithGetMethod ( ) { System . out . println ( "testAutoGenerateWithGetMethod()" ) ; cz . metacentrum . perun . core . api . Attribute attribute = new cz . metacentrum . perun . core . api . Attribute ( cz . metacentrum . perun . core . impl . modules . attributes . urn_perun_user_attribute_def_virt_login... | org . junit . Assert . assertEquals ( "879a224546cf11fe53863737de037d2d39640258@elixir-europe.org" , output . getValue ( ) ) |
shouldBeTrueHasNextWhenOneLine ( ) { logFile . log ( "request" , "response" ) ; "<AssertPlaceHolder>" ; } readNextStep ( ) { if ( ! ( openRead ) ) { try { openRead ( ) ; } catch ( net . tetris . online . service . FileNotFoundException e ) { net . tetris . online . service . GameLogFile . logger . warn ( ( ( "Requested... | org . junit . Assert . assertTrue ( logFile . readNextStep ( ) ) |
testId ( ) { org . apache . olingo . odata2 . ref . model . Employee employee1 = new org . apache . olingo . odata2 . ref . model . Employee ( 1 , null ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; } | org . junit . Assert . assertNotNull ( employee1 . getId ( ) ) |
testGetNodeIdsOfSecondaryIndexKey ( ) { insertKeys ( getHive ( ) ) ; org . hivedb . meta . directory . Directory d = getDirectory ( ) ; for ( java . lang . String pkey : getPrimaryIndexOrResourceKeys ( ) ) { org . hivedb . meta . Collection skeys = d . getSecondaryIndexKeysOfResourceId ( nameIndex , pkey ) ; for ( java... | org . junit . Assert . assertTrue ( ( ( d . getKeySemaphoresOfSecondaryIndexKey ( nameIndex , skey ) . size ( ) ) > 0 ) ) |
testDoesMarketplaceAssignedToTenantExist ( ) { doReturn ( 2L ) . when ( tenantDao ) . doesMarketplaceAssignedToTenantExist ( any ( org . oscm . domobjects . Tenant . class ) ) ; boolean result = tenantServiceLocalBean . doesMarketplaceAssignedToTenantExist ( new org . oscm . domobjects . Tenant ( ) ) ; "<AssertPlaceHol... | org . junit . Assert . assertTrue ( result ) |
testVerAlumnoPaquete ( ) { log . debug ( "test<sp>ver<sp>alumnoPaquete" ) ; mx . edu . um . mateo . general . model . Usuario usuario = obtieneUsuario ( ) ; mx . edu . um . mateo . inscripciones . model . Paquete paquete = new mx . edu . um . mateo . inscripciones . model . Paquete ( "Test" , "Test1" , new java . math ... | org . junit . Assert . assertNotNull ( alumnoPaquete . getId ( ) ) |
resetWithoutMarkReturnsToStart ( ) { final byte [ ] data = new byte [ ] { 1 , 2 , 3 , 4 } ; final java . io . ByteArrayInputStream stream = new java . io . ByteArrayInputStream ( data ) ; final com . flagstone . transform . coder . SWFDecoder fixture = new com . flagstone . transform . coder . SWFDecoder ( stream ) ; f... | org . junit . Assert . assertEquals ( 1 , fixture . readByte ( ) ) |
shouldParseWriteOptionMaskExpression ( ) { java . lang . String scriptFragment = "write<sp>option<sp>mask<sp>${maskingKey}" ; org . kaazing . k3po . lang . internal . parser . ScriptParserImpl parser = new org . kaazing . k3po . lang . internal . parser . ScriptParserImpl ( ) ; javax . el . ExpressionFactory factory = ... | org . junit . Assert . assertEquals ( expected , actual ) |
testNaughtyService ( ) { org . apache . felix . http . jetty . internal . RequestLogTracker tracker = new org . apache . felix . http . jetty . internal . RequestLogTracker ( context , null ) ; java . util . concurrent . atomic . AtomicInteger counter = new java . util . concurrent . atomic . AtomicInteger ( 0 ) ; org ... | org . junit . Assert . assertEquals ( 100 , counter . get ( ) ) |
testGetRemoteOriginUrl ( ) { "<AssertPlaceHolder>" ; } getRemoteOriginUrl ( ) { return com . hazelcast . simulator . common . GitInfo . INSTANCE . properties . getProperty ( com . hazelcast . simulator . common . GitInfo . GIT_REMOTE_ORIGIN_URL , com . hazelcast . simulator . common . GitInfo . UNKNOWN ) ; } | org . junit . Assert . assertNotNull ( com . hazelcast . simulator . common . GitInfo . getRemoteOriginUrl ( ) ) |
testUI ( ) { org . eclipse . swtbot . swt . finder . widgets . SWTBotShell [ ] shells = com . packtpub . e4 . junit . plugin . UITest . bot . shells ( ) ; boolean found = false ; for ( int i = 0 ; ( i < ( shells . length ) ) && ( ! found ) ; i ++ ) { if ( shells [ i ] . isVisible ( ) ) { java . lang . String text = she... | org . junit . Assert . assertTrue ( found ) |
testQueryAuditRepositoryOnCriteria ( ) { java . lang . String eUserId = "UnitTest1" ; java . lang . String ePatientId = "" ; java . lang . String eCommunityId = "" ; java . util . Date startDate = null ; java . util . Date endDate = null ; java . util . List result = auditDao . queryAuditRepositoryOnCriteria ( eUserId ... | org . junit . Assert . assertNotNull ( result ) |
editModelOK ( ) { final java . lang . String TEST_PROCESS_NAME = "Test<sp>process<sp>name<sp>5" ; createProcessModel ( TEST_PROCESS_NAME ) ; try { clickProcessModel ( TEST_PROCESS_NAME ) ; clickMenuBar ( "File" ) ; clickMenuItem ( "Edit<sp>Model" ) ; driver . findElement ( org . apromore . portal . uitest . By . xpath ... | org . junit . Assert . assertFalse ( isElementPresent ( org . apromore . portal . uitest . By . xpath ( EDIT_MODEL_DIALOG_XPATH ) ) ) |
testGet ( ) { uk . ac . bbsrc . tgac . miso . core . data . InstrumentModel platform = dao . get ( 16L ) ; "<AssertPlaceHolder>" ; } get ( java . lang . Object ) { return map . get ( key ) ; } | org . junit . Assert . assertNotNull ( platform ) |
testIncompatibleDevicePlugin ( ) { org . apache . hadoop . yarn . server . nodemanager . containermanager . resourceplugin . ResourcePluginManager rpm = new org . apache . hadoop . yarn . server . nodemanager . containermanager . resourceplugin . ResourcePluginManager ( ) ; org . apache . hadoop . yarn . server . nodem... | org . junit . Assert . assertEquals ( expectedMessage , actualMessage ) |
shouldNeverValidateNullUserV ( ) { final uk . gov . gchq . gaffer . federatedstore . FederatedAccess access = new uk . gov . gchq . gaffer . federatedstore . FederatedAccess . Builder ( ) . graphAuths ( ( ( java . lang . String [ ] ) ( null ) ) ) . addingUserId ( null ) . build ( ) ; "<AssertPlaceHolder>" ; } isValidTo... | org . junit . Assert . assertFalse ( access . isValidToExecute ( null ) ) |
getDdidTest ( ) { cloud . artik . model . MessageOut messageOut = new cloud . artik . model . MessageOut ( ) ; "<AssertPlaceHolder>" ; } getDdid ( ) { return ddid ; } | org . junit . Assert . assertNull ( messageOut . getDdid ( ) ) |
testShouldBeAbleToFindMultipleLinksByText ( ) { driver . get ( pages . xhtmlTestPage ) ; java . util . List < org . openqa . selenium . WebElement > elements = driver . findElements ( org . openqa . selenium . By . linkText ( "click<sp>me" ) ) ; "<AssertPlaceHolder>" ; } size ( ) { java . lang . Object response = execu... | org . junit . Assert . assertThat ( elements . size ( ) , org . hamcrest . Matchers . is ( 2 ) ) |
testGetOutputStream ( ) { try { out = locationManager . getOutputStream ( "test.properties" ) ; "<AssertPlaceHolder>" ; } catch ( org . hisp . dhis . external . location . LocationManagerException ex ) { org . hisp . dhis . external . location . LocationManagerTest . log . debug ( "External<sp>directory<sp>not<sp>set" ... | org . junit . Assert . assertNotNull ( out ) |
testHigherMajorProtocolVersionsOnRequestSwitchToTunnelBehavior ( ) { request = new org . apache . hc . core5 . http . message . BasicClassicHttpRequest ( "GET" , "/foo" ) ; request . setVersion ( new org . apache . hc . core5 . http . ProtocolVersion ( "HTTP" , 2 , 13 ) ) ; org . easymock . EasyMock . expect ( mockExec... | org . junit . Assert . assertSame ( originResponse , result ) |
uploadPost_givenInvalidFile_displaysUploadViewWithErrors ( ) { org . mockito . Mockito . doThrow ( new org . xml . sax . SAXException ( "Unable<sp>to<sp>process<sp>file" ) ) . when ( importService ) . importData ( any ( java . io . InputStream . class ) , null ) ; java . lang . String view = controller . uploadPost ( f... | org . junit . Assert . assertEquals ( "/custodian/upload" , view ) |
titoRomaDistanceTest ( ) { org . geosdi . geoplatform . support . google . services . DistanceMatrix distanceMatrix = this . gpDistanceMatrixService . getDistanceMatrix ( new java . lang . String [ ] { "Tito" } , new java . lang . String [ ] { "Roma" } ) . mode ( TravelMode . DRIVING ) . language ( "it" ) . await ( ) ;... | org . junit . Assert . assertNotNull ( distanceMatrix ) |
testGetParametersWithEmptyFieldsAnd ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . asset . address . AssetAddress entity = new org . lnu . is . domain . asset . address . AssetAddress ( ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java... | org . junit . Assert . assertEquals ( expected , actual ) |
testAvgWithValidRangeBeginningAtOddTime ( ) { int TIME_BASELINE = ( ( int ) ( ( new java . util . GregorianCalendar ( 2014 , 10 , 10 , 2 , 15 , 0 ) . getTime ( ) . getTime ( ) ) / 1000 ) ) ; int TIME_LIMIT = ( ( int ) ( ( new java . util . GregorianCalendar ( 2014 , 10 , 10 , 4 , 0 , 0 ) . getTime ( ) . getTime ( ) ) /... | org . junit . Assert . assertEquals ( results , avgs ) |
addnode2 ( ) { com . bt . bcos . adapter . AdapterIf bcosAdapter = new org . opennms . xmlclient . bcos . OpenNmsBcosAdapter ( ) ; java . lang . String service = "" ; java . util . HashMap < java . lang . String , java . lang . String > params = new java . util . HashMap < java . lang . String , java . lang . String > ... | org . junit . Assert . assertTrue ( bcosAdapter . add ( service , params ) ) |
collectWithIndexWithTarget ( ) { org . eclipse . collections . api . stack . StackIterable < java . lang . String > stack = this . newStackFromTopToBottom ( "4" , "3" , "2" , "1" ) ; org . eclipse . collections . api . list . MutableList < org . eclipse . collections . api . tuple . primitive . ObjectIntPair < java . l... | org . junit . Assert . assertEquals ( expected , stack . collectWithIndex ( PrimitiveTuples :: pair , Lists . mutable . empty ( ) ) ) |
testHeaders ( ) { com . google . appengine . api . taskqueue . Queue queue = com . google . appengine . api . taskqueue . QueueFactory . getDefaultQueue ( ) ; queue . add ( withHeader ( "header_key" , "header_value" ) ) ; sync ( ) ; com . google . appengine . tck . taskqueue . support . RequestData lastRequest = com . ... | org . junit . Assert . assertEquals ( "header_value" , lastRequest . getHeader ( "header_key" ) ) |
writeWithEmptyDataDoesNothing ( ) { when ( this . patient . getData ( MedicationController . DATA_NAME ) ) . thenReturn ( new org . phenotips . data . IndexedPatientData ( org . phenotips . data . internal . controller . MedicationController . DATA_NAME , java . util . Collections . emptyList ( ) ) ) ; org . json . JSO... | org . junit . Assert . assertEquals ( 0 , json . length ( ) ) |
testCapitalizeWords2 ( ) { java . lang . Object s = "<sp>" ; java . lang . String expResult = "<sp>" ; java . lang . String result = org . thymeleaf . util . StringUtils . capitalizeWords ( s ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( expResult , result ) |
testProcessResponse_ResponseParams ( ) { System . out . println ( "processResponse" ) ; gov . hhs . fha . nhinc . patientdiscovery . response . ResponseParams params = null ; gov . hhs . fha . nhinc . patientdiscovery . response . TrustMode instance = new gov . hhs . fha . nhinc . patientdiscovery . response . TrustMod... | org . junit . Assert . assertEquals ( expResult , result ) |
convert_when_mapMessage_has_JMSCorrelationID ( ) { java . lang . String jmsCorrelationID = "TestJMSCorrelationID" ; javax . jms . MapMessage message = new org . apache . activemq . command . ActiveMQMapMessage ( ) ; message . setJMSCorrelationID ( jmsCorrelationID ) ; javax . jms . MapMessage result = uut . convert ( m... | org . junit . Assert . assertEquals ( jmsCorrelationID , result . getJMSCorrelationID ( ) ) |
testQueryParseRequestForNested ( ) { final fr . gouv . vitam . common . database . parser . request . multiple . InsertParserMultiple request = new fr . gouv . vitam . common . database . parser . request . multiple . InsertParserMultiple ( ) ; request . parse ( fr . gouv . vitam . common . database . parser . request ... | org . junit . Assert . assertNotNull ( request ) |
should_delete_job_node ( ) { com . flow . platform . api . domain . job . Job job = new com . flow . platform . api . domain . job . Job ( com . flow . platform . api . util . CommonUtil . randomId ( ) ) ; com . flow . platform . api . domain . job . NodeResult jobNode = new com . flow . platform . api . domain . job .... | org . junit . Assert . assertEquals ( com . flow . platform . core . exception . NotFoundException . class , e . getClass ( ) ) |
testSerialization ( ) { org . jfree . chart . plot . ThermometerPlot p1 = new org . jfree . chart . plot . ThermometerPlot ( ) ; org . jfree . chart . plot . ThermometerPlot p2 = ( ( org . jfree . chart . plot . ThermometerPlot ) ( org . jfree . chart . TestUtilities . serialised ( p1 ) ) ) ; "<AssertPlaceHolder>" ; } ... | org . junit . Assert . assertTrue ( p1 . equals ( p2 ) ) |
testSeda ( ) { producer . sendBody ( "Hello<sp>Swarm" ) ; org . apache . camel . ConsumerTemplate consumer = camelContext . createConsumerTemplate ( ) ; java . lang . Object body = consumer . receiveBody ( "seda:outbox" , 5000 ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( "Hello<sp>Swarm" , body ) |
testValidateXMLMetadataOk ( ) { java . lang . String metadataOk = com . onelogin . saml2 . util . Util . getFileAsString ( "data/metadata/metadata_settings1.xml" ) ; org . w3c . dom . Document docMetadataOk = com . onelogin . saml2 . util . Util . loadXML ( metadataOk ) ; boolean isValid = com . onelogin . saml2 . util... | org . junit . Assert . assertTrue ( isValid ) |
testBulkPutAdvancesPosition ( ) { int size = 5 ; assert ( ( buffer . position ( ) ) + size ) < ( buffer . limit ( ) ) ; byte [ ] dummy = new byte [ size ] ; int oldPos = buffer . position ( ) ; buffer . get ( dummy , 0 , size ) ; "<AssertPlaceHolder>" ; } position ( ) { return position ; } | org . junit . Assert . assertEquals ( ( oldPos + size ) , buffer . position ( ) ) |
testIsAllSegmentScansFinished ( ) { com . amazonaws . services . dynamodbv2 . model . ScanRequest scan1 = new com . amazonaws . services . dynamodbv2 . model . ScanRequest ( ) . withTableName ( com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . ParallelScanTaskTest . TABLE ) ; java . util . List < com .... | org . junit . Assert . assertTrue ( testTask . isAllSegmentScanFinished ( ) ) |
testHandleChargingStationUnavailableEvent ( ) { io . motown . operatorapi . viewmodel . persistence . entities . ChargingStation cs = new io . motown . operatorapi . viewmodel . persistence . entities . ChargingStation ( io . motown . operatorapi . viewmodel . CHARGING_STATION_ID . getId ( ) ) ; cs . setEvses ( com . g... | org . junit . Assert . assertNotNull ( reservation ) |
canLookInMultipleClassDirectories ( ) { org . infinitest . parser . File newFile = createFileForClass ( org . infinitest . parser . TestFakeProduct . class ) ; org . infinitest . parser . File thisFile = org . infinitest . parser . InfinitestTestUtils . getFileForClass ( getClass ( ) ) ; org . infinitest . parser . Set... | org . junit . Assert . assertThat ( changedFiles ) |
getProductInfoFetchesFromConfig ( ) { final tests . unit . com . microsoft . azure . sdk . iot . device . IotHubClientProtocol protocol = IotHubClientProtocol . AMQPS ; tests . unit . com . microsoft . azure . sdk . iot . device . InternalClient client = tests . unit . com . microsoft . azure . sdk . iot . device . Dee... | org . junit . Assert . assertEquals ( mockedProductInfo , productInfo ) |
testNoOverwrite ( ) { buildRule . executeTarget ( "testnooverwrite" ) ; java . io . File file2 = new java . io . File ( buildRule . getProject ( ) . getBaseDir ( ) , org . apache . tools . ant . taskdefs . ConcatTest . tempFile2 ) ; long size = file2 . length ( ) ; "<AssertPlaceHolder>" ; } length ( ) { return line . l... | org . junit . Assert . assertEquals ( size , 0 ) |
testLijstControleGeenBsnNok ( ) { final nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst dbPersoonslijst = new nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijstBuilder ( ) . build ( ) ; setup ( java . util . Collections . emptyList ( ) , java . util . Collections . singletonList ( d... | org . junit . Assert . assertFalse ( subject . controleer ( new nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext ( null , null , null , null ) ) ) |
testSerializeAndDeserializeDomainEvent_WithDom4JUpcasters ( ) { org . axonframework . serialization . SerializedObject < org . dom4j . Document > serializedEvent = testSubject . serialize ( testEvent , org . dom4j . Document . class ) ; java . lang . Object actualResult = testSubject . deserialize ( serializedEvent ) ;... | org . junit . Assert . assertEquals ( testEvent , actualResult ) |
testBug48616b ( ) { org . apache . catalina . startup . Tomcat tomcat = getTomcatInstance ( ) ; java . io . File appDir = new java . io . File ( "test/webapp" ) ; tomcat . addWebapp ( null , "/test" , appDir . getAbsolutePath ( ) ) ; tomcat . start ( ) ; java . lang . Exception e = null ; try { getUrl ( ( ( "http://loc... | org . junit . Assert . assertNull ( e ) |
shouldGetScoreFromOperationsInParameters ( ) { final java . lang . Integer expectedScore = 8 ; final java . lang . String opName = "otherOp" ; final uk . gov . gchq . gaffer . named . operation . NamedOperation < uk . gov . gchq . gaffer . data . element . Element , java . lang . Iterable < ? extends uk . gov . gchq . ... | org . junit . Assert . assertEquals ( expectedScore , result ) |
testGetVersionString ( ) { System . out . println ( "--><sp>checkVersionString" ) ; java . lang . String result ; appl = OpenRate . OpenRate . getApplicationInstance ( ) ; result = appl . getApplicationVersion ( ) ; java . lang . String expResult = ( ( ( "OpenRate<sp>" + ( OpenRateVersion ) ) + "<sp>(" ) + ( revisionDa... | org . junit . Assert . assertEquals ( expResult , result ) |
testIsNietValideNederlandsGemeenteCode ( ) { final nl . moderniseringgba . migratie . conversie . model . lo3 . element . Lo3GemeenteCode gemeenteCode = new nl . moderniseringgba . migratie . conversie . model . lo3 . element . Lo3GemeenteCode ( "a123" ) ; "<AssertPlaceHolder>" ; } isValideNederlandseGemeenteCode ( ) {... | org . junit . Assert . assertFalse ( gemeenteCode . isValideNederlandseGemeenteCode ( ) ) |
whenAdminServerChannelsNotDefined_exportedNamesIsEmpty ( ) { "<AssertPlaceHolder>" ; } getAdminServerChannelNames ( ) { return ( adminServer ) != null ? adminServer . getChannelNames ( ) : java . util . Collections . emptyList ( ) ; } | org . junit . Assert . assertThat ( domain . getAdminServerChannelNames ( ) , org . hamcrest . Matchers . empty ( ) ) |
shouldGetAllCubes ( ) { java . util . List < java . lang . String > cubeIds = java . util . Arrays . asList ( "tomcat1" , "tomcat2" , "tomcat_46fd2cc1-0084-42a8-9ffd-35f305a08dcc" ) ; for ( java . lang . String cubeId : cubeIds ) { org . arquillian . cube . spi . Cube cube = createCubeMock ( cubeId ) ; cubeRegistry . a... | org . junit . Assert . assertEquals ( cubeIds . size ( ) , cubes . size ( ) ) |
testConvert ( ) { java . util . Date begDate = new java . util . Date ( ) ; java . lang . String birthPlace = "fsd" ; java . lang . String docNum = "gfdsf" ; java . lang . String docSeries = "fdafdsfs" ; java . util . Date endDate = new java . util . Date ( ) ; java . lang . String fatherName = "<sp>fdsfsdfsd" ; java .... | org . junit . Assert . assertEquals ( expected , actual ) |
testLoopValue ( ) { com . ewcms . publication . freemarker . directive . out . article . CategoriesDirectiveOut out = new com . ewcms . publication . freemarker . directive . out . article . CategoriesDirectiveOut ( ) ; java . lang . Object value = new java . lang . Object ( ) ; java . lang . Object loopValue = out . l... | org . junit . Assert . assertEquals ( value , loopValue ) |
testConvertAll ( ) { java . lang . String content = "content" ; boolean isHtml = true ; java . lang . String email = "ivanon2@gmail.com" ; java . lang . String sender = "sender" ; java . lang . String topic = "topic" ; org . lnu . is . mailing . model . Recipient recipient1 = new org . lnu . is . mailing . model . Reci... | org . junit . Assert . assertEquals ( expecteds , actuals ) |
testDoMainNull ( ) { org . eclipse . concierge . Concierge framework = org . eclipse . concierge . Concierge . doMain ( null ) ; "<AssertPlaceHolder>" ; framework . stop ( ) ; } doMain ( java . lang . String [ ] ) { final org . eclipse . concierge . compat . service . XargsFileLauncher xargsLauncher = new org . eclipse... | org . junit . Assert . assertNotNull ( framework ) |
embeddedMapShouldContainCorrectValues ( ) { com . orientechnologies . orient . object . db . entity . Person person = createTestPerson ( ) ; com . orientechnologies . orient . object . db . entity . Person retrievedPerson ; com . orientechnologies . orient . object . db . OObjectDatabaseTx db = new com . orientechnolog... | org . junit . Assert . assertEquals ( person , retrievedPerson ) |
testGetParametersWithDisabledDEfaults ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; java . lang . String name = "AddressN" ; java . lang . String abbrName = "AN" ; org . lnu . is . domain . education . type . EducationType entity = new org . lnu . is . domain . education . type . EducationType ( ) ;... | org . junit . Assert . assertEquals ( expected , actual ) |
testData5 ( ) { java . security . KeyPairGenerator gen = java . security . KeyPairGenerator . getInstance ( "DSA" ) ; java . security . KeyPair keyPair1 = gen . generateKeyPair ( ) ; net . tomp2p . storage . Data data = new net . tomp2p . storage . Data ( 1 , 100000 ) ; data . publicKey ( keyPair1 . getPublic ( ) ) ; n... | org . junit . Assert . assertEquals ( data , newData ) |
testSAML2AttrAssertionCustomAttributeOutbound ( ) { java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; { org . apache . wss4j . stax . ext . WSSSecurityProperties securityProperties = new org . apache . wss4j . stax . ext . WSSSecurityProperties ( ) ; java . util . List < org . apache ... | org . junit . Assert . assertEquals ( nodeList . getLength ( ) , 0 ) |
testVoorvoegselNietLeegNamenReeksJa ( ) { java . util . Set < javax . validation . ConstraintViolation > overtredingen = validate ( bouwGroep ( null , "voor" , null , null , JaNeeAttribuut . JA ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; } | org . junit . Assert . assertEquals ( 2 , overtredingen . size ( ) ) |
testEmptyRecordSelectionByFilter ( ) { final java . lang . String xml = "/net/meisen/dissertation/impl/parser/query/testPersonModel.xml" ; final java . lang . String query = "select<sp>RECORDS<sp>from<sp>testPersonModel<sp>filter<sp>by<sp>PERSON='notavailable'" ; m ( xml ) ; final net . meisen . dissertation . impl . p... | org . junit . Assert . assertEquals ( records . toString ( ) , 0 , ids . length ) |
qualifiedReturnType ( ) { class Woot { @ javax . inject . Named ( "q" ) java . lang . String foo ( ) { return "hi" ; } } tc . oc . commons . core . inject . InjectableMethod < ? > method = tc . oc . commons . core . inject . InjectableMethod . forDeclaredMethod ( new Woot ( ) , "foo" ) ; java . lang . String hi = com .... | org . junit . Assert . assertEquals ( "hi" , hi ) |
testReturnTypeException ( ) { java . lang . Object expected = new java . lang . Object ( ) ; java . lang . Object result = org . slieb . throwables . IntFunctionWithThrowable . castIntFunctionWithThrowable ( ( v1 ) -> { throw new java . lang . Exception ( "expect<sp>exception" ) ; } ) . thatReturnsOnCatch ( expected ) ... | org . junit . Assert . assertEquals ( expected , result ) |
testSetGetSchema ( ) { org . talend . components . jira . avro . IssueAdapterFactory issueRecordConverter = new org . talend . components . jira . avro . IssueAdapterFactory ( ) ; issueRecordConverter . setSchema ( org . talend . components . jira . avro . IssueAdapterFactoryTest . testSchema ) ; "<AssertPlaceHolder>" ... | org . junit . Assert . assertEquals ( org . talend . components . jira . avro . IssueAdapterFactoryTest . testSchema , issueRecordConverter . getSchema ( ) ) |
testUpdateBusinessObjectDataAttributes ( ) { org . finra . herd . model . api . xml . BusinessObjectDataKey businessObjectDataKey = new org . finra . herd . model . api . xml . BusinessObjectDataKey ( BDEF_NAMESPACE , BDEF_NAME , FORMAT_USAGE_CODE , FORMAT_FILE_TYPE_CODE , FORMAT_VERSION , PARTITION_VALUE , SUBPARTITIO... | org . junit . Assert . assertEquals ( businessObjectData , result ) |
testRemoveItemAlsoRemovesContent ( ) { com . eclipsesource . tabris . widgets . swipe . SwipeItem item = mock ( com . eclipsesource . tabris . widgets . swipe . SwipeItem . class ) ; org . eclipse . swt . widgets . Composite content = mock ( org . eclipse . swt . widgets . Composite . class ) ; swipeItemHolder . addIte... | org . junit . Assert . assertNull ( actualContent ) |
createSoyPortlet ( ) { java . lang . String packageName = "test.soy.portlet.maven" ; wizardAction . openNewLiferayModuleWizard ( ) ; wizardAction . newModule . prepareMaven ( project . getName ( ) , com . liferay . ide . ui . portlet . tests . SOY_PORTLET ) ; wizardAction . next ( ) ; wizardAction . newModuleInfo . pre... | org . junit . Assert . assertTrue ( viewAction . project . visibleFileTry ( project . getName ( ) ) ) |
tesNegativeInfinity ( ) { org . hipparchus . geometry . euclidean . threed . Vector3D c = org . hipparchus . geometry . euclidean . threed . Vector3D . NEGATIVE_INFINITY ; java . lang . String expected = "{(-Infinity);<sp>(-Infinity);<sp>(-Infinity)}" ; java . lang . String actual = vector3DFormat . format ( c ) ; "<As... | org . junit . Assert . assertEquals ( expected , actual ) |
testSimpleNoBlock ( ) { org . antlr . v4 . tool . Grammar g = new org . antlr . v4 . tool . Grammar ( ( "parser<sp>grammar<sp>T;\n" + "1:RULE_STOP<sp>0\n" 0 ) ) ; java . lang . String expecting = "max<sp>type<sp>2\n" + ( ( ( ( ( ( ( ( ( ( "1:RULE_STOP<sp>0\n" 3 + "1:RULE_STOP<sp>0\n" ) + "2:BASIC<sp>0\n" ) + "3:BASIC<s... | org . junit . Assert . assertEquals ( expecting , result ) |
onCreateShouldRegisterKeyListenerThatIgnoresOtherEvents ( ) { activityController . create ( ) ; final android . widget . EditText mainChatInput = ( ( android . widget . EditText ) ( controller . findViewById ( R . id . mainChatInput ) ) ) ; mainChatInput . setText ( "Hello" ) ; mainChatInput . dispatchKeyEvent ( new an... | org . junit . Assert . assertEquals ( "Hello" , mainChatInput . getText ( ) . toString ( ) ) |
deleteShouldUseMappedFieldName ( ) { org . springframework . data . solr . ExampleSolrBean bean1 = new org . springframework . data . solr . ExampleSolrBean ( "id-1" , "name1" , null ) ; bean1 . setManufacturerId ( "man-1" ) ; org . springframework . data . solr . ExampleSolrBean bean2 = new org . springframework . dat... | org . junit . Assert . assertThat ( solrTemplate . count ( org . springframework . data . solr . core . COLLECTION_NAME , new org . springframework . data . solr . core . SimpleQuery ( org . springframework . data . solr . core . AnyCriteria . any ( ) ) ) , org . hamcrest . core . Is . is ( 1L ) ) |
testConvert ( ) { java . lang . String strValue = "strValue" ; java . lang . Long markscaleId = 1L ; org . lnu . is . domain . mark . scale . MarkScale markscale = new org . lnu . is . domain . mark . scale . MarkScale ( ) ; markscale . setId ( markscaleId ) ; org . lnu . is . resource . mark . scale . value . MarkScal... | org . junit . Assert . assertEquals ( expected , actual ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.