input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testFetchByPrimaryKeyMissing ( ) { long pk = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; com . liferay . blogs . model . BlogsEntry missingBlogsEntry = _persistence . fetchByPrimaryKey ( pk ) ; "<AssertPlaceHolder>" ; } fetchByPrimaryKey ( long ) { return com . liferay . adaptive . m... | org . junit . Assert . assertNull ( missingBlogsEntry ) |
executeWithCityAndCountryWithNoCityMatches ( ) { com . gisgraphy . webapp . action . GeocodingAction action = new com . gisgraphy . webapp . action . GeocodingAction ( ) ; com . gisgraphy . fulltext . IFullTextSearchEngine fullTextSearchEngine = org . easymock . EasyMock . createMock ( com . gisgraphy . fulltext . IFul... | org . junit . Assert . assertEquals ( Action . SUCCESS , action . execute ( ) ) |
testDeleteProcessDefinitionsByKeyWithCustomListenersSkipped ( ) { org . camunda . bpm . engine . test . api . runtime . util . IncrementCounterListener . counter = 0 ; for ( int i = 0 ; i < 3 ; i ++ ) { deployTwoProcessDefinitions ( ) ; } runtimeService . startProcessInstanceByKey ( "processOne" ) ; repositoryService .... | org . junit . Assert . assertThat ( IncrementCounterListener . counter , org . hamcrest . Matchers . is ( 0 ) ) |
selfWithTerm ( ) { final com . b2international . index . query . Expression actual = eval ( java . lang . String . format ( "%s|SNOMED<sp>CT<sp>Root|" , com . b2international . snowowl . snomed . core . ql . SnomedQueryEvaluationRequestTest . ROOT_ID ) ) ; final com . b2international . index . query . Expression expect... | org . junit . Assert . assertEquals ( expected , actual ) |
shouldSaveState ( ) { org . apache . camel . impl . MemoryStateRepository repository = new org . apache . camel . impl . MemoryStateRepository ( ) ; repository . setState ( "key" , "value" ) ; "<AssertPlaceHolder>" ; } getState ( java . lang . String ) { if ( key . contains ( org . apache . camel . component . kafka . ... | org . junit . Assert . assertEquals ( "value" , repository . getState ( "key" ) ) |
testGetSettings ( ) { final com . atlassian . bitbucket . setting . Settings settings = mock ( com . atlassian . bitbucket . setting . Settings . class ) ; com . atlassian . bitbucket . user . EscalatedSecurityContext escalatedSecurityContext = mock ( com . atlassian . bitbucket . user . EscalatedSecurityContext . clas... | org . junit . Assert . assertEquals ( settings , returnValue ) |
testDynamicQueryByProjectionMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . portal . kernel . model . Contact . class , _dynamicQueryClassLoader ) ; dynamicQuery . setProjection ( c... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
testCheckNullRequestMethod ( ) { org . apache . catalina . filters . TesterHttpServletRequest request = new org . apache . catalina . filters . TesterHttpServletRequest ( ) ; request . setHeader ( CorsFilter . REQUEST_HEADER_ORIGIN , "http://tomcat.apache.org" ) ; request . setMethod ( null ) ; org . apache . catalina ... | org . junit . Assert . assertEquals ( CorsFilter . CORSRequestType . INVALID_CORS , requestType ) |
testInputCoalesce ( ) { java . util . Map < java . lang . String , java . lang . Object > configMap = com . google . common . collect . Maps . newHashMap ( ) ; configMap . put ( ( ( ( DataStep . INPUT_TYPE ) + "." ) + ( com . cloudera . labs . envelope . input . InputFactory . TYPE_CONFIG_NAME ) ) , com . cloudera . la... | org . junit . Assert . assertEquals ( numPartitions , 5 ) |
testRewritePomWithReleasedParent ( ) { java . util . List < org . apache . maven . project . MavenProject > reactorProjects = createReactorProjects ( "pom-with-released-parent" ) ; org . apache . maven . shared . release . config . ReleaseDescriptorBuilder builder = createDescriptorFromProjects ( reactorProjects , "pom... | org . junit . Assert . assertTrue ( comparePomFiles ( reactorProjects ) ) |
testBepalenDatumLaatsteBericht ( ) { final java . sql . Timestamp opgehaaldeDatumLaatsteBericht = geefQueryResultaat ( ( "select<sp>max(tijdstip)<sp>from<sp>mig_bericht<sp>where<sp>process_instance_id<sp>=<sp>" + ( nl . bzk . migratiebrp . isc . opschoner . dao . impl . MigDaoImplTest . PROCES_ID ) ) , java . sql . Tim... | org . junit . Assert . assertEquals ( opgehaaldeDatumLaatsteBericht , datumLaatsteBericht ) |
shouldReturnTrueWhenThereAreDraftDocuments ( ) { com . qcadoo . mes . materialFlowResources . service . DraftDocumentsNotificationService spy = spy ( draftDocumentsNotificationService ) ; given ( securityService . getCurrentUserId ( ) ) . willReturn ( com . qcadoo . mes . materialFlowResources . service . DraftDocument... | org . junit . Assert . assertTrue ( result ) |
noEventsShouldBeFetchedFromEmptyTree ( ) { com . graphaware . module . timetree . domain . TimeInstant timeInstant1 = com . graphaware . module . timetree . domain . TimeInstant . instant ( dateToMillis ( 2012 , 11 , 1 ) ) . with ( Resolution . MILLISECOND ) ; com . graphaware . module . timetree . domain . TimeInstant... | org . junit . Assert . assertEquals ( 0 , events . size ( ) ) |
shouldNotMatchWhenIndexesDiffer ( ) { final org . pitest . mutationtest . engine . MutationIdentifier a = org . pitest . mutationtest . LocationMother . aMutationId ( ) . withIndex ( 1 ) . build ( ) ; final org . pitest . mutationtest . engine . MutationIdentifier b = org . pitest . mutationtest . LocationMother . aMut... | org . junit . Assert . assertFalse ( a . matches ( b ) ) |
shouldReturnResponse ( ) { logFile . log ( "" , "left=1,<sp>right=2,<sp>rotate=3,<sp>drop" ) ; logFile . readNextStep ( ) ; "<AssertPlaceHolder>" ; } getCurrentResponse ( ) { return currentLine . split ( "\\@" ) [ 1 ] ; } | org . junit . Assert . assertEquals ( "left=1,<sp>right=2,<sp>rotate=3,<sp>drop" , logFile . getCurrentResponse ( ) ) |
testGetRowKeys ( ) { org . jfree . data . category . DefaultIntervalCategoryDataset empty = new org . jfree . data . category . DefaultIntervalCategoryDataset ( new double [ 0 ] [ 0 ] , new double [ 0 ] [ 0 ] ) ; java . util . List keys = empty . getRowKeys ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return queue . size... | org . junit . Assert . assertEquals ( 0 , keys . size ( ) ) |
getServicesFirstCategory_NoData ( ) { givenEmptyModel ( ) ; "<AssertPlaceHolder>" ; } getServicesFirstCategory ( ) { return this . entriesOfCateogry0 ; } | org . junit . Assert . assertNull ( model . getServicesFirstCategory ( ) ) |
testSerialize ( ) { java . util . List < java . lang . String > m = createList ( ) ; m . add ( "a" ) ; m . add ( "b" ) ; if ( m instanceof java . io . Serializable ) { byte [ ] data = org . ujmp . core . util . SerializationUtil . serialize ( ( ( java . io . Serializable ) ( m ) ) ) ; java . util . List < java . lang .... | org . junit . Assert . assertEquals ( getLabel ( ) , m , m2 ) |
toAffiliationTest ( ) { org . orcid . pojo . ajaxForm . AffiliationForm f1 = getAffiliationForm ( ) ; org . orcid . jaxb . model . v3 . rc2 . record . Affiliation aff = getAffiliation ( ) ; "<AssertPlaceHolder>" ; } toAffiliation ( ) { org . orcid . jaxb . model . v3 . release . record . Affiliation affiliation = null ... | org . junit . Assert . assertEquals ( aff , f1 . toAffiliation ( ) ) |
testMessageBoxes ( ) { com . github . bordertech . wcomponents . test . selenium . driver . SeleniumWComponentsWebDriver driver = getDriver ( ) ; com . github . bordertech . wcomponents . test . selenium . element . SeleniumWMessagesWebElement messages = driver . findWMessages ( byWComponentPath ( "WMessages[0]" ) ) ; ... | org . junit . Assert . assertEquals ( 4 , messageBoxes . size ( ) ) |
testResourceInjected ( ) { final com . google . inject . Module module = new com . google . inject . Module ( ) { @ org . jboss . resteasy . plugins . guice . Override public void configure ( final com . google . inject . Binder binder ) { binder . bind ( java . lang . String . class ) . toInstance ( "injected-name" ) ... | org . junit . Assert . assertEquals ( "injected-name" , resource . getName ( ) ) |
testGetAllRoutes ( ) { java . util . List < org . onebusaway . gtfs . model . Route > routes = org . onebusaway . gtfs . impl . HibernateGtfsRelationalDaoImplCaltrainTest . _dao . getAllRoutes ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return size ; } | org . junit . Assert . assertEquals ( 3 , routes . size ( ) ) |
toJsonElementPreservesNullReportedProperties ( ) { com . microsoft . azure . sdk . iot . deps . twin . TwinState twinState = new com . microsoft . azure . sdk . iot . deps . twin . TwinState ( null , tests . unit . com . microsoft . azure . sdk . iot . deps . twin . TwinStateTest . PROPERTIES , tests . unit . com . mic... | org . junit . Assert . assertTrue ( jsonElement . toString ( ) . contains ( tests . unit . com . microsoft . azure . sdk . iot . deps . twin . TwinStateTest . PROPERTIES_WITH_NULL_VALUES . toString ( ) ) ) |
testComputeFileContentHash_Null ( ) { java . lang . String hash = org . peerbox . watchservice . PathUtils . computeFileContentHash ( null ) ; "<AssertPlaceHolder>" ; } computeFileContentHash ( java . nio . file . Path ) { java . lang . String newHash = "" ; if ( ( path != null ) && ( ( path . toFile ( ) ) != null ) ) ... | org . junit . Assert . assertEquals ( hash , "" ) |
skip ( ) { final byte [ ] data = new byte [ ] { 1 , 2 , 3 , 4 } ; final java . io . ByteArrayInputStream stream = new java . io . ByteArrayInputStream ( data ) ; final com . flagstone . transform . coder . LittleDecoder fixture = new com . flagstone . transform . coder . LittleDecoder ( stream ) ; fixture . skip ( 2 ) ... | org . junit . Assert . assertEquals ( 3 , fixture . readByte ( ) ) |
testAddAllIntListOfRdn006 ( ) { java . util . LinkedList < javax . naming . ldap . Rdn > test = new java . util . LinkedList < javax . naming . ldap . Rdn > ( ) ; javax . naming . ldap . LdapName ln = new javax . naming . ldap . LdapName ( "t=test" ) ; ln . addAll ( 0 , test ) ; "<AssertPlaceHolder>" ; } toString ( ) {... | org . junit . Assert . assertEquals ( "t=test" , ln . toString ( ) ) |
packageDirectories_singleEntryWithSubEntries_canUnzip ( ) { java . io . File output = tempFolder . newFile ( "output.zip" ) ; java . io . File inputRootFolder = tempFolder . newFolder ( "inputRootFolder" ) ; java . io . File inputSubFolder = new java . io . File ( inputRootFolder , "inputSubFolder" ) ; org . apache . c... | org . junit . Assert . assertTrue ( canUnzip ( output , outputFolder ) ) |
testSyncTokenToJsonNullUuid ( ) { java . lang . String expected = "{\"t\":\"2015-11-25T11:25:28.000Z\",\"u\":null}" ; java . lang . String result = org . openmrs . projectbuendia . webservices . rest . SyncTokenUtils . syncTokenToJson ( new org . projectbuendia . openmrs . api . SyncToken ( new java . util . Date ( 144... | org . junit . Assert . assertEquals ( expected , result ) |
utestCountTestedAtomTypes ( ) { org . openscience . cdk . config . AtomTypeFactory factory = org . openscience . cdk . config . AtomTypeFactory . getInstance ( "org/openscience/cdk/config/data/structgen_atomtypes.xml" , org . openscience . cdk . silent . SilentChemObjectBuilder . getInstance ( ) ) ; org . openscience .... | org . junit . Assert . assertEquals ( errorMessage , factory . getAllAtomTypes ( ) . length , org . openscience . cdk . atomtype . StructGenMatcherTest . testedAtomTypes . size ( ) ) |
testGetAdapterPatientDiscoveryDeferredReqQueueProcessOrchImpl ( ) { gov . hhs . fha . nhinc . patientdiscovery . adapter . deferred . request . queue . AdapterPatientDiscoveryDeferredReqQueueProcessImpl deferredProcessImpl = new gov . hhs . fha . nhinc . patientdiscovery . adapter . deferred . request . queue . Adapter... | org . junit . Assert . assertNotNull ( processImpl ) |
testIntegerDataSource ( ) { com . vaadin . server . VaadinSession . setCurrent ( new com . vaadin . tests . util . AlwaysLockedVaadinSession ( null ) ) ; com . vaadin . v7 . ui . Label l = new com . vaadin . v7 . ui . Label ( "Foo" ) ; com . vaadin . v7 . data . Property ds = new com . vaadin . v7 . data . util . Metho... | org . junit . Assert . assertEquals ( java . lang . String . valueOf ( com . vaadin . tests . data . bean . Person . createTestPerson1 ( ) . getAge ( ) ) , l . getValue ( ) ) |
testFilterSuccess ( ) { com . mozilla . bagheera . http . ContentLengthFilter filter = new com . mozilla . bagheera . http . ContentLengthFilter ( 4 ) ; byte [ ] contentBytes = new java . lang . String ( "foo" ) . getBytes ( ) ; boolean success = false ; try { filter . messageReceived ( ctx , createMockEvent ( ctx . ge... | org . junit . Assert . assertTrue ( success ) |
testWithoutSettingsObject ( ) { "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( driver ) |
testCorrectnessOfOutOfScopeActivityPort1 ( ) { org . apache . taverna . scufl2 . api . profiles . ProcessorBinding pb = new org . apache . taverna . scufl2 . api . profiles . ProcessorBinding ( ) ; org . apache . taverna . scufl2 . api . core . Processor processor = new org . apache . taverna . scufl2 . api . core . Pr... | org . junit . Assert . assertTrue ( problem ) |
testIgnoreWhitespaceChars ( ) { java . lang . String query = "<sp>(<sp>)<sp>a\nb<sp>\rc<sp>+-/=,^<sp>@." ; java . util . List < com . facebook . buck . query . Lexer . Token > tokens = com . facebook . buck . query . Lexer . scan ( query . toCharArray ( ) ) ; java . util . List < com . facebook . buck . query . Lexer .... | org . junit . Assert . assertThat ( tokens , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . equalTo ( expected ) ) ) |
non_strict_with_skipped_scenarios ( ) { java . lang . Runtime runtime = createNonStrictRuntime ( ) ; bus . send ( testCaseFinishedWithStatus ( Result . Type . SKIPPED ) ) ; "<AssertPlaceHolder>" ; } exitStatus ( ) { return exitStatus . exitStatus ( ) ; } | org . junit . Assert . assertEquals ( 0 , runtime . exitStatus ( ) ) |
When_creating_entity_Should_not_affect_subscriptions_before_processing ( ) { execute ( new com . artemis . EntityComponentLifecycleIntegrationTest . LifecycleTestingSystem ( ) { @ com . artemis . Override protected void processSystem ( ) { if ( ( timesProcessed ) == 0 ) { world . create ( ) ; "<AssertPlaceHolder>" ; do... | org . junit . Assert . assertEquals ( 0 , allMembers ( ) ) |
shouldUseCustomComputerUsingEasyMock ( ) { final int EXPECTED_RESULT = 1 ; com . octo . android . sample . ui . HelloAndroidActivity activityUnderTest = org . robolectric . Robolectric . buildActivity ( com . octo . android . sample . ui . HelloAndroidActivity . class ) . create ( ) . get ( ) ; com . octo . android . s... | org . junit . Assert . assertThat ( textViewHelloString , org . hamcrest . CoreMatchers . equalTo ( java . lang . String . valueOf ( EXPECTED_RESULT ) ) ) |
testGetCatalogFilterInclude ( ) { classUnderTest . setCatalogFilterInclude ( "aTestString" ) ; "<AssertPlaceHolder>" ; } getCatalogFilterInclude ( ) { return _catalogFilterInclude ; } | org . junit . Assert . assertEquals ( "aTestString" , classUnderTest . getCatalogFilterInclude ( ) ) |
fetchShouldNotFetchTagsFromOtherBranches ( ) { remoteGit . commit ( ) . setMessage ( "commit" ) . call ( ) ; remoteGit . checkout ( ) . setName ( "other" ) . setCreateBranch ( true ) . call ( ) ; remoteGit . commit ( ) . setMessage ( "commit2" ) . call ( ) ; remoteGit . tag ( ) . setName ( "foo" ) . call ( ) ; org . ec... | org . junit . Assert . assertNull ( db . resolve ( "foo" ) ) |
testFactory ( ) { uk . gov . dstl . baleen . mallet . ClassifierTrainerFactory factory = new uk . gov . dstl . baleen . mallet . ClassifierTrainerFactory ( "MaxEnt,gaussianPriorVariance=10.0,numIterations=20" ) ; cc . mallet . classify . ClassifierTrainer < ? > trainer = factory . createTrainer ( ) ; "<AssertPlaceHolde... | org . junit . Assert . assertNotNull ( trainer ) |
shouldReturnErrorWhenNoResourcesAndProductNotInTrackingOperations ( ) { given ( recordInProduct2 . getDecimalField ( TrackingOperationProductInComponentFields . USED_QUANTITY ) ) . willReturn ( BigDecimal . TEN ) ; given ( recordOutProduct . getBelongsToField ( TrackingOperationProductInComponentFields . PRODUCT ) ) . ... | org . junit . Assert . assertEquals ( false , enoughResources ) |
shouldCalculatePercentageOfOneQuestionWithSomeWrongAnswers ( ) { java . lang . String questionId = this . addQuestion ( "lecture" , 10 ) ; for ( int i = 0 ; i < 99 ; i ++ ) { this . addAnswer ( questionId , ( "user" + i ) , 10 ) ; } this . addAnswer ( questionId , "user-with-a-wrong-answer" , 0 ) ; int expected = 99 ; ... | org . junit . Assert . assertEquals ( expected , actual ) |
itShouldNotRenderUnusedLeftAndRightHistogramLevels ( ) { io . datakernel . jmx . ValueStats stats = io . datakernel . jmx . ValueStats . create ( io . datakernel . jmx . ValueStatsTest . SMOOTHING_WINDOW ) . withHistogram ( new int [ ] { 5 , 10 , 15 , 20 , 25 , 30 , 35 } ) ; stats . recordValue ( 12 ) ; stats . recordV... | org . junit . Assert . assertEquals ( expected , stats . getHistogram ( ) ) |
gregor_hohpe_updates ( ) { final java . lang . String rulebase = "rules/reloaded/hohpe_dynamic_discovery.prova" ; java . util . concurrent . atomic . AtomicInteger count = new java . util . concurrent . atomic . AtomicInteger ( ) ; java . util . Map < java . lang . String , java . lang . Object > globals = new java . u... | org . junit . Assert . assertEquals ( 1 , count . get ( ) ) |
normalizeWithReservedChar ( ) { final java . lang . String [ ] TEST_NAMES = new java . lang . String [ ] { "test?.txt" , "?test.txt" , "test.txt?" , "?test?txt?" } ; final java . lang . String [ ] EXPECTED_NAMES = new java . lang . String [ ] { "test%3F.txt" , "%3Ftest.txt" , "test.txt%3F" , "%3Ftest%3Ftxt%3F" } ; for ... | org . junit . Assert . assertEquals ( EXPECTED_NAMES [ i ] , org . apache . tika . io . FilenameUtils . normalize ( TEST_NAMES [ i ] ) ) |
testEndWithoutAcl ( ) { "<AssertPlaceHolder>" ; importer . end ( accessControlledTree ) ; } start ( org . apache . jackrabbit . oak . spi . whiteboard . Whiteboard ) { checkState ( ( ( tracker ) == ( stopped ) ) ) ; tracker = whiteboard . track ( type ) ; } | org . junit . Assert . assertFalse ( importer . start ( accessControlledTree ) ) |
isTaskPendingForUser_should_be_true_when_mapped_using_actor ( ) { final org . bonitasoft . engine . identity . model . SUser expectedUser = repository . add ( aUser ( ) . build ( ) ) ; org . bonitasoft . engine . actor . mapping . model . SActor actor = repository . add ( anActor ( ) . build ( ) ) ; org . bonitasoft . ... | org . junit . Assert . assertThat ( taskPendingForUser ) |
testGetActiveEmrClusterIdAssertReturnActualClusterIdWhenClusterIdSpecifiedAndClusterStateActiveAndNameMatch ( ) { org . finra . herd . dao . EmrDao originalEmrDao = emrHelper . getEmrDao ( ) ; org . finra . herd . dao . EmrDao mockEmrDao = mock ( org . finra . herd . dao . EmrDao . class ) ; emrHelper . setEmrDao ( moc... | org . junit . Assert . assertEquals ( expectedEmrClusterId , emrHelper . getActiveEmrClusterId ( emrClusterId , emrClusterName , null ) ) |
treeAwareUpdates3 ( ) { final java . lang . String doc = "<a><b/></a>" ; final org . basex . query . up . AtomicUpdateCache auc = org . basex . query . up . AtomicUpdatesTest . atomics ( doc ) ; final org . basex . query . up . MemData md = new org . basex . query . up . MemData ( context . options ) ; auc . addReplace... | org . junit . Assert . assertEquals ( 2 , auc . updatesSize ( ) ) |
testGetActionInfo ( ) { com . myjeeva . digitalocean . pojo . Action action = apiClient . getActionInfo ( 28336352 ) ; "<AssertPlaceHolder>" ; log . info ( action . toString ( ) ) ; } getActionInfo ( java . lang . Integer ) { checkNullAndThrowError ( actionId , "Missing<sp>required<sp>parameter<sp>-<sp>actionId" ) ; ja... | org . junit . Assert . assertNotNull ( action ) |
testIsDoubleDataRateSupportedOk ( ) { "<AssertPlaceHolder>" ; } isDoubleDataRateSupported ( ) { final java . lang . String value = this . properties . get ( org . sump . device . logicsniffer . profile . DeviceProfile . DEVICE_SUPPORTS_DDR ) ; return java . lang . Boolean . parseBoolean ( value ) ; } | org . junit . Assert . assertTrue ( this . profile . isDoubleDataRateSupported ( ) ) |
testGetAll ( ) { headers . delegate ( ) . add ( "header" , "value1" , "value2" ) ; "<AssertPlaceHolder>" ; } getAll ( java . lang . CharSequence ) { return new java . util . ArrayList < java . lang . CharSequence > ( delegate . getAll ( name ) ) ; } | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( "value1" , "value2" ) , headers . getAll ( "header" ) ) |
refinementIntegerLessThan ( ) { generateDrugHierarchy ( ) ; generateDrugWithIntegerStrengthOfValueOne ( ) ; final com . b2international . index . query . Expression actual = eval ( java . lang . String . format ( "<%s:<sp>%s<sp><<sp>#1" , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationReques... | org . junit . Assert . assertEquals ( expected , actual ) |
testService_ExecutorShutdownNow_2 ( ) { final java . lang . String MESSAGE = "Shutting<sp>down<sp>executor<sp>[" 0 ; org . apache . axis2 . jaxws . sample . parallelasync . server . AsyncService service = getService ( null ) ; org . apache . axis2 . jaxws . sample . parallelasync . server . AsyncPort port = getPort ( s... | org . junit . Assert . assertTrue ( "Shutting<sp>down<sp>executor<sp>[" 7 , gotException ) |
matchTimeOnlyTestClosedEndedIntervalRangeInclusive ( ) { org . dcm4che3 . data . Attributes testAttrs = new org . dcm4che3 . data . Attributes ( ) ; java . lang . String tmString = "121212.000-121212.999" ; java . util . List < org . dcm4chee . archive . entity . Study > studies = createTimeRangeQuery ( testAttrs , tmS... | org . junit . Assert . assertThat ( studies . size ( ) , org . hamcrest . CoreMatchers . is ( 1 ) ) |
invalidIntegerLengthConstraintShouldCreateViolations ( ) { java . util . Set < javax . validation . ConstraintViolation < org . alien4cloud . tosca . model . definitions . PropertyDefinition > > violations = validator . validate ( createLenghtDefinition ( ToscaTypes . INTEGER . toString ( ) , 2 ) , alien4cloud . tosca ... | org . junit . Assert . assertEquals ( 2 , violations . size ( ) ) |
testReencodeImages ( ) { try ( javax . imageio . stream . ImageInputStream iis = javax . imageio . ImageIO . createImageInputStream ( getClassLoaderResource ( "/tiff/fivepages-scan-causingerrors.tif" ) . openStream ( ) ) ) { javax . imageio . ImageReader reader = javax . imageio . ImageIO . getImageReaders ( iis ) . ne... | org . junit . Assert . assertArrayEquals ( originalData , reencodedData ) |
getHostNameReturnsHostNameIfHostNameOverridden ( ) { final com . typesafe . config . Config config = com . typesafe . config . ConfigFactory . parseMap ( java . util . Collections . singletonMap ( "host-name" , "foobar.example.net" ) ) ; final org . graylog . collector . utils . CollectorHostNameConfiguration hostNameC... | org . junit . Assert . assertEquals ( "foobar.example.net" , hostNameConfiguration . getHostName ( ) ) |
testAdditems_moreThanMax ( ) { when ( delegate . execute ( PingLevel . BASIC ) ) . thenReturn ( new nl . trifork . healthcheck . api . PingResult ( "mock" , nl . trifork . healthcheck . api . SystemStatus . OK , "nothing" ) ) ; for ( int i = 0 ; i < 15 ; i ++ ) { wrapper . execute ( ) ; } nl . trifork . healthcheck . a... | org . junit . Assert . assertEquals ( 10 , items . length ) |
toJSON_axisWithUnits_TimeUnitMultiplesCorrectlySerialized ( ) { com . vaadin . addon . charts . model . YAxis yaxis = new com . vaadin . addon . charts . model . YAxis ( ) ; com . vaadin . addon . charts . model . TimeUnitMultiples unitMillisecond = new com . vaadin . addon . charts . model . TimeUnitMultiples ( com . ... | org . junit . Assert . assertEquals ( expected , toJSON ( yaxis ) ) |
testEmptyInitialization ( ) { org . databene . contiperf . WaitTimer timer = org . databene . contiperf . timer . ConstantTimer . class . newInstance ( ) ; timer . init ( new double [ 0 ] ) ; for ( int i = 0 ; i < 1000 ; i ++ ) { "<AssertPlaceHolder>" ; } } getWaitTime ( ) { return ( min ) + ( random . nextInt ( range ... | org . junit . Assert . assertEquals ( 1000 , timer . getWaitTime ( ) ) |
testVerifyKeyCertificateEntry ( ) { com . emc . storageos . security . keystore . impl . KeyCertificatePairGenerator gen = new com . emc . storageos . security . keystore . impl . KeyCertificatePairGenerator ( ) ; gen . setKeyCertificateAlgorithmValuesHolder ( defaultValues ) ; com . emc . storageos . security . keysto... | org . junit . Assert . assertTrue ( exceptionThrown ) |
encodeEmpty ( ) { "<AssertPlaceHolder>" ; } encode ( java . lang . String ) { return com . github . underscore . lodash . Base32 . INSTANCE . encodeInternal ( data . getBytes ( com . github . underscore . lodash . Base32 . UTF_8 ) ) ; } | org . junit . Assert . assertEquals ( "" , com . github . underscore . lodash . Base32 . encode ( "" ) ) |
getNameServiceId ( ) { org . apache . hadoop . hdfs . HdfsConfiguration conf = new org . apache . hadoop . hdfs . HdfsConfiguration ( ) ; conf . set ( org . apache . hadoop . hdfs . DFSConfigKeys . DFS_NAMESERVICE_ID , "nn1" ) ; "<AssertPlaceHolder>" ; } getNamenodeNameServiceId ( org . apache . hadoop . conf . Configu... | org . junit . Assert . assertEquals ( "nn1" , org . apache . hadoop . hdfs . DFSUtil . getNamenodeNameServiceId ( conf ) ) |
testSlice4 ( ) { com . ibm . wala . ipa . callgraph . AnalysisScope scope = com . ibm . wala . core . tests . slicer . SlicerTest . findOrCreateAnalysisScope ( ) ; com . ibm . wala . ipa . cha . IClassHierarchy cha = com . ibm . wala . core . tests . slicer . SlicerTest . findOrCreateCHA ( scope ) ; java . lang . Itera... | org . junit . Assert . assertEquals ( slice . toString ( ) , 4 , slice . size ( ) ) |
testParseWikipediaLinksFr ( ) { java . util . Map < java . lang . String , java . lang . String > expected = reader . readCsv ( dictionary . WikipediaLinksParserTest . SAMPLE_OUTPUT_FR ) ; java . util . Map < java . lang . String , java . lang . String > actual = wikipediaLinks . parse ( dictionary . WikipediaLinksPars... | org . junit . Assert . assertEquals ( expected , actual ) |
testFetchByPrimaryKeyExisting ( ) { com . liferay . blade . samples . jndiservicebuilder . model . Region newRegion = addRegion ( ) ; com . liferay . blade . samples . jndiservicebuilder . model . Region existingRegion = _persistence . fetchByPrimaryKey ( newRegion . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } addR... | org . junit . Assert . assertEquals ( existingRegion , newRegion ) |
hashCodeB ( ) { annis . model . TestDataObject . B b = new annis . model . TestDataObject . B ( annis . model . TestDataObject . S1 , annis . model . TestDataObject . C1 ) ; int expected = new org . apache . commons . lang3 . builder . HashCodeBuilder ( ) . append ( annis . model . TestDataObject . C1 ) . append ( anni... | org . junit . Assert . assertThat ( b . hashCode ( ) , org . hamcrest . Matchers . is ( expected ) ) |
oneByteInt_writenAsUIntBase128_thenInputStreamReadsCorrectly ( ) { int oneByteInt = 99 ; org . mabb . fontverter . woff . WoffOutputStream out = new org . mabb . fontverter . woff . WoffOutputStream ( ) ; out . writeUIntBase128 ( oneByteInt ) ; byte [ ] data = out . toByteArray ( ) ; int readerResult = readUIntBase128 ... | org . junit . Assert . assertEquals ( oneByteInt , readerResult ) |
testSingleEmptyPartition ( ) { de . hub . cs . dbis . aeolus . spouts . TestOrderedFileInputSpout spout = new de . hub . cs . dbis . aeolus . spouts . TestOrderedFileInputSpout ( ) ; backtype . storm . Config conf = new backtype . storm . Config ( ) ; conf . put ( TestOrderedFileInputSpout . NUMBER_OF_PARTITIONS , new ... | org . junit . Assert . assertEquals ( 0 , col . output . size ( ) ) |
checkNextStatus_ConflictingOperation ( ) { boolean isNextStatusDefined = baseProvisioningProcessor . checkNextStatus ( org . oscm . app . iaas . BaseProvisioningProcessorTest . CONTROLLER_ID , "instanceId" , FlowState . VSERVER_CREATING , paramHandler ) ; "<AssertPlaceHolder>" ; verify ( platformService , times ( 1 ) )... | org . junit . Assert . assertFalse ( isNextStatusDefined ) |
convert_array_to_set_java ( ) { java . lang . String [ ] abcs = new java . lang . String [ ] { "a" , "b" , "c" , "d" } ; java . util . Set < java . lang . String > abcSet = new java . util . HashSet ( java . util . Arrays . asList ( abcs ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( ( ( abcSet . size ( ) ) == 4 ) ) |
implicitlyDisabledElement_updateIsAllowedBySynchronizeProperty_updateIsDone ( ) { com . vaadin . flow . dom . Element element = com . vaadin . flow . dom . ElementFactory . createDiv ( ) ; com . vaadin . flow . component . UI ui = new com . vaadin . flow . component . UI ( ) ; ui . getElement ( ) . appendChild ( elemen... | org . junit . Assert . assertEquals ( com . vaadin . flow . server . communication . rpc . MapSyncRpcHandlerTest . NEW_VALUE , element . getPropertyRaw ( com . vaadin . flow . server . communication . rpc . MapSyncRpcHandlerTest . TEST_PROPERTY ) ) |
testGetNameWhenUndefined ( ) { "<AssertPlaceHolder>" ; } getValue ( ) { return asString ( getNode ( ) , getPropertyKeys ( ) , com . openshift . internal . restclient . model . VALUE ) ; } | org . junit . Assert . assertEquals ( "" , param . getValue ( ) ) |
testRandomStrings ( ) { org . apache . parquet . column . values . deltalengthbytearray . DeltaLengthByteArrayValuesWriter writer = getDeltaLengthByteArrayValuesWriter ( ) ; org . apache . parquet . column . values . deltalengthbytearray . DeltaLengthByteArrayValuesReader reader = new org . apache . parquet . column . ... | org . junit . Assert . assertEquals ( org . apache . parquet . io . api . Binary . fromString ( values [ i ] ) , bin [ i ] ) |
shouldGetAllDepartments ( ) { org . egov . infra . admin . master . entity . Department department1 = new org . egov . builder . entities . DepartmentBuilder ( ) . withName ( "test1" ) . withCode ( "test1" ) . build ( ) ; org . egov . infra . admin . master . entity . Department department2 = new org . egov . builder .... | org . junit . Assert . assertEquals ( list . size ( ) , 2 ) |
testPauseJob ( ) { java . lang . String jobId = "jobId" ; org . pentaho . platform . web . http . api . resources . JobRequest mockJobRequest = mock ( org . pentaho . platform . web . http . api . resources . JobRequest . class ) ; doReturn ( jobId ) . when ( mockJobRequest ) . getJobId ( ) ; org . pentaho . platform .... | org . junit . Assert . assertEquals ( mockResponse , testResult ) |
testSessionId ( ) { io . atomix . primitive . session . SessionId sessionId = io . atomix . primitive . session . SessionId . from ( 1 ) ; "<AssertPlaceHolder>" ; } valueOf ( int ) { return java . util . stream . Stream . of ( io . atomix . cluster . messaging . impl . ProtocolVersion . values ( ) ) . filter ( ( v ) ->... | org . junit . Assert . assertEquals ( java . lang . Long . valueOf ( 1 ) , sessionId . id ( ) ) |
testIsShutdown ( ) { this . mockCtx . checking ( new org . jmock . Expectations ( ) { { oneOf ( workers . get ( 0 ) ) . isShutdown ( ) ; will ( returnValue ( true ) ) ; } } ) ; "<AssertPlaceHolder>" ; } isShutdown ( ) { return this . workers . get ( 0 ) . isShutdown ( ) ; } | org . junit . Assert . assertTrue ( this . pool . isShutdown ( ) ) |
testLoopInstructionTransaction ( ) { org . teiid . query . processor . proc . LoopInstruction loop = new org . teiid . query . processor . proc . LoopInstruction ( new org . teiid . query . processor . proc . Program ( false ) { @ org . teiid . query . optimizer . proc . Override public org . teiid . query . optimizer ... | org . junit . Assert . assertNull ( loop . requiresTransaction ( true ) ) |
testSetSelectionIndex_IgnoredForTooSmallValue ( ) { dropDown . setItems ( org . eclipse . rap . rwt . widgets . DropDown_Test . FOUR_ITEMS ) ; dropDown . setSelectionIndex ( 2 ) ; dropDown . setSelectionIndex ( ( - 2 ) ) ; "<AssertPlaceHolder>" ; } getSelectionIndex ( ) { checkWidget ( ) ; int result = - 1 ; if ( cellS... | org . junit . Assert . assertEquals ( 2 , dropDown . getSelectionIndex ( ) ) |
testSingleItemIteratorRemoval ( ) { if ( ! ( doesCollectionsIteratorSupportRemove ( ) ) ) return ; java . util . Collection list = createEmptyCollection ( ) ; org . glassfish . hk2 . testing . collections . TestCollectionElement one = getElement ( org . glassfish . hk2 . testing . collections . AbstractCollectionTest .... | org . junit . Assert . assertTrue ( list . isEmpty ( ) ) |
testGetEnergyScore ( ) { org . openscience . cdk . smiles . SmilesParser sp = new org . openscience . cdk . smiles . SmilesParser ( org . openscience . cdk . DefaultChemObjectBuilder . getInstance ( ) ) ; org . openscience . cdk . interfaces . IAtomContainer target = sp . parseSmiles ( "C\\C=C/Nc1cccc(c1)N(O)\\C=C\\C\\... | org . junit . Assert . assertEquals ( score , smsd1 . getEnergyScore ( 0 ) ) |
testDecoratorsInWebInfClasses ( ) { java . util . List < java . lang . String > expected = new java . util . ArrayList < java . lang . String > ( ) ; expected . add ( org . jboss . weld . tests . decorators . ordering . global . ThirdPartyDecorator . class . getSimpleName ( ) ) ; expected . add ( org . jboss . weld . t... | org . junit . Assert . assertEquals ( expected , actual ) |
testAssumeRule ( ) { org . apache . lucene . util . junitcompat . TestReproduceMessage . type = SoreType . ASSUMPTION ; org . apache . lucene . util . junitcompat . TestReproduceMessage . where = SorePoint . RULE ; "<AssertPlaceHolder>" ; } runAndReturnSyserr ( ) { org . junit . runner . JUnitCore . runClasses ( org . ... | org . junit . Assert . assertEquals ( "" , runAndReturnSyserr ( ) ) |
typedObjectFromDoubleAndInteger ( ) { com . pardot . rhombus . cobject . CField field = new com . pardot . rhombus . cobject . CField ( "test" , "int" ) ; double jsonValue = 1234.5678901234567 ; java . lang . Integer expected = 1234 ; java . lang . Object result = com . pardot . rhombus . util . JsonUtil . typedObjectF... | org . junit . Assert . assertEquals ( expected , result ) |
testScrollToWithThreeArguments ( ) { final elemental2 . dom . HTMLElement target = mock ( elemental2 . dom . HTMLElement . class ) ; final elemental2 . dom . HTMLElement container = mock ( elemental2 . dom . HTMLElement . class ) ; target . offsetTop = 8 ; container . offsetTop = 4 ; scrollHelper . scrollTo ( target , ... | org . junit . Assert . assertEquals ( expectedScrollTop , actualScrollTop ) |
testFlow_ensure_should_return_a_promise ( ) { com . englishtown . promises . Promise < java . lang . Object > p = resolved ( null ) . ensure ( null ) ; "<AssertPlaceHolder>" ; } ensure ( java . lang . Runnable ) { if ( handler == null ) { return this ; } return this . then ( ( x ) -> { handler . run ( ) ; return this ;... | org . junit . Assert . assertNotNull ( p ) |
testVisibleWhenHiddenFacetSetToAlways ( ) { testMember . addFacet ( new org . apache . isis . core . metamodel . facets . members . hidden . method . HideForContextFacetNone ( testMember ) ) ; testMember . addFacet ( new org . apache . isis . core . metamodel . facets . members . hidden . HiddenFacetAbstract ( org . ap... | org . junit . Assert . assertTrue ( visible . isAllowed ( ) ) |
setWrongSubstringShouldFalseSearch ( ) { chapter1 . finaltask . SubString testContains = new chapter1 . finaltask . SubString ( ) ; java . lang . String origin = "fdfdfg" ; java . lang . String sub = "fdg" ; boolean result = testContains . contains ( origin , sub ) ; boolean testResult = false ; "<AssertPlaceHolder>" ;... | org . junit . Assert . assertThat ( result , org . hamcrest . core . Is . is ( testResult ) ) |
testGetInputStream ( ) { java . lang . String message = "message" ; org . lnu . is . web . filter . logging . ResettableStreamHttpServletRequest unit = new org . lnu . is . web . filter . logging . ResettableStreamHttpServletRequest ( request ) ; java . io . InputStream is = new java . io . ByteArrayInputStream ( messa... | org . junit . Assert . assertNotNull ( actual ) |
testFilter_okMultiStatus ( ) { org . eclipse . core . runtime . IStatus multi = com . google . cloud . tools . eclipse . util . status . StatusUtil . multi ( com . google . cloud . tools . eclipse . util . status . StatusUtil . class , "test<sp>multi<sp>msg" ) ; "<AssertPlaceHolder>" ; } filter ( org . eclipse . core .... | org . junit . Assert . assertThat ( com . google . cloud . tools . eclipse . util . status . StatusUtil . filter ( multi ) , org . hamcrest . CoreMatchers . is ( org . eclipse . core . runtime . Status . OK_STATUS ) ) |
testDeleteInstanceConcurrencyNoConflict ( ) { final java . lang . String instanceId = createService ( ProvisioningStatus . WAITING_FOR_SYSTEM_MODIFICATION ) ; doReturn ( new org . oscm . provisioning . data . BaseResult ( ) ) . when ( provServiceMock ) . deleteInstance ( eq ( instanceId ) , anyString ( ) , anyString ( ... | org . junit . Assert . assertEquals ( 0 , result . getRc ( ) ) |
testGetBerichtViaAndereConstructor ( ) { final nl . bzk . brp . model . bericht . ber . BerichtBericht bericht = new nl . bzk . brp . model . bevraging . bijhouding . GeefDetailsPersoonBericht ( ) ; final nl . bzk . brp . business . regels . context . BerichtRegelContext berichtRegelContext = new nl . bzk . brp . busin... | org . junit . Assert . assertEquals ( bericht , berichtBericht ) |
pointIsEqualIfDataIsSameObject ( ) { com . rackspacecloud . blueflood . types . SimpleNumber item = new com . rackspacecloud . blueflood . types . SimpleNumber ( 42 ) ; long timestamp = 1234L ; com . rackspacecloud . blueflood . types . Points . Point < com . rackspacecloud . blueflood . types . SimpleNumber > point = ... | org . junit . Assert . assertTrue ( isEqual ) |
getMasterUrl_WhenMasterApiRootNotGivenAndPortNNotGiven_ThenProduceCorrectUrl ( ) { final com . github . ywilkof . sparkrestclient . SparkRestClient subject = new com . github . ywilkof . sparkrestclient . SparkRestClient ( ) ; subject . setMasterHost ( "host" ) ; "<AssertPlaceHolder>" ; } getMasterUrl ( ) { final java ... | org . junit . Assert . assertEquals ( "host" , subject . getMasterUrl ( ) ) |
doubleMapping ( ) { com . airhacks . enhydrator . in . Row input = getRow ( ) ; this . cut . addMapping ( 0 , Datatype . DOUBLE ) ; com . airhacks . enhydrator . in . Row output = this . cut . execute ( input ) ; "<AssertPlaceHolder>" ; } getColumnByIndex ( int ) { return this . columnByIndex . get ( index ) ; } | org . junit . Assert . assertTrue ( ( ( output . getColumnByIndex ( 0 ) . getValue ( ) ) instanceof java . lang . Double ) ) |
getL2Msg ( ) { com . github . cjm0000000 . mmt . shared . message . local . LocalMsgBean mb = msgBeanMapper . getL2Msg ( 1 , "key" ) ; "<AssertPlaceHolder>" ; } getL2Msg ( int , java . lang . String ) { return ( msgBeanMapper . getL2Msg ( cust_id , msg ) ) == null ? null : msgBeanMapper . getL2Msg ( cust_id , msg ) . g... | org . junit . Assert . assertNotNull ( mb ) |
getNumberSet_empty ( ) { software . amazon . awssdk . services . dynamodb . document . Item item = new software . amazon . awssdk . services . dynamodb . document . Item ( ) ; item . with ( "test" , new software . amazon . awssdk . services . dynamodb . document . utils . FluentArrayList < java . math . BigDecimal > ( ... | org . junit . Assert . assertTrue ( ( ( ss . size ( ) ) == 0 ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.