input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testClearCache ( ) { createCacheLocations ( ) ; fileCacheProvider ( ) . clearCache ( ) ; java . util . List < org . dcm4chee . archive . entity . Location > cacheLocations = selectLocations ( org . dcm4chee . archive . prefetch . PriorsFileCacheProviderIT . PRIORS_STORAGE_SYSTEM_GROUP_ID ) ; for ( int i = 0 ; ( i < 10 ... | org . junit . Assert . assertEquals ( 0 , cacheLocations . size ( ) ) |
testGetTitle ( ) { final java . lang . String errorKey = org . drools . workbench . screens . guided . dtable . client . resources . i18n . GuidedDecisionTableErraiConstants . CalculationTypePage_CalculationType ; final java . lang . String errorMessage = "Title" ; when ( translationService . format ( errorKey ) ) . th... | org . junit . Assert . assertEquals ( errorMessage , title ) |
testFetchByPrimaryKeyExisting ( ) { com . liferay . dynamic . data . mapping . model . DDMStructure newDDMStructure = addDDMStructure ( ) ; com . liferay . dynamic . data . mapping . model . DDMStructure existingDDMStructure = _persistence . fetchByPrimaryKey ( newDDMStructure . getPrimaryKey ( ) ) ; "<AssertPlaceHolde... | org . junit . Assert . assertEquals ( existingDDMStructure , newDDMStructure ) |
testInstanceCreationWithName ( ) { java . lang . String in = "myInstantiatedInstance" ; org . osgi . framework . ServiceReference ref = ipojoHelper . getServiceReferenceByName ( org . apache . felix . ipojo . architecture . Architecture . class . getName ( ) , in ) ; "<AssertPlaceHolder>" ; } getName ( ) { return m_nam... | org . junit . Assert . assertNotNull ( ref ) |
getUsersForOrganization_Admin_Authorized ( ) { java . lang . reflect . Method method = beanClass . getMethod ( "getUsersForOrganization" ) ; boolean isRoleAllowed = isRoleAllowed ( method , UserRoleType . ORGANIZATION_ADMIN ) ; "<AssertPlaceHolder>" ; } isRoleAllowed ( java . lang . reflect . Method , org . oscm . inte... | org . junit . Assert . assertTrue ( isRoleAllowed ) |
testPrimaryKeys ( ) { java . sql . DatabaseMetaData dbmd = con . getMetaData ( ) ; "<AssertPlaceHolder>" ; java . sql . ResultSet rs = dbmd . getPrimaryKeys ( null , null , "pg_class" ) ; rs . close ( ) ; } getMetaData ( ) { checkClosed ( ) ; if ( ( rsMetaData ) == null ) { rsMetaData = createMetaData ( ) ; } return rs... | org . junit . Assert . assertNotNull ( dbmd ) |
testCommitLog ( ) { org . apache . cayenne . commitlog . db . Auditable2 a1 = context . newObject ( org . apache . cayenne . commitlog . db . Auditable2 . class ) ; a1 . setCharProperty1 ( "yy" ) ; a1 . setCharProperty2 ( "zz" ) ; org . apache . cayenne . commitlog . db . Auditable2 a2 = context . newObject ( org . apa... | org . junit . Assert . assertEquals ( 2 , logs . size ( ) ) |
test14 ( ) { org . evosuite . Properties . CLIENT_ON_THREAD = true ; org . evosuite . Properties . PRINT_TO_SYSTEM = true ; org . evosuite . Properties . TIMEOUT = 5000000 ; org . evosuite . testcase . DefaultTestCase tc = org . evosuite . symbolic . SymbolicObserverTest . build_test_input_14 ( ) ; System . out . print... | org . junit . Assert . assertEquals ( 1 , branch_conditions . size ( ) ) |
returnOverwriteTest7 ( ) { soot . jimple . infoflow . IInfoflow infoflow = initInfoflow ( ) ; java . util . List < java . lang . String > epoints = new java . util . ArrayList < java . lang . String > ( ) ; epoints . add ( "<soot.jimple.infoflow.test.OverwriteTestCode:<sp>void<sp>returnOverwrite7()>" ) ; infoflow . com... | org . junit . Assert . assertEquals ( 1 , infoflow . getResults ( ) . size ( ) ) |
should_calculate_parameters_count_from_body_with_two_params ( ) { cucumber . runtime . java8 . Java8StepDefinition java8StepDefinition = cucumber . runtime . java8 . Java8StepDefinition . create ( "I<sp>have<sp>some<sp>step" , StepdefBody . A2 . class , twoParamStep ( ) , typeRegistry ) ; "<AssertPlaceHolder>" ; } getP... | org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 2 ) , java8StepDefinition . getParameterCount ( ) ) |
testMissingFieldInWriteRawRecord ( ) { final java . util . List < org . apache . nifi . serialization . record . RecordField > fields = new java . util . ArrayList ( ) ; fields . add ( new org . apache . nifi . serialization . record . RecordField ( "id" , RecordFieldType . STRING . getDataType ( ) ) ) ; fields . add (... | org . junit . Assert . assertEquals ( expected , output ) |
servletConfigValueForBoolean ( ) { final org . jasig . cas . client . configuration . ConfigurationKey < java . lang . Boolean > key = ConfigurationKeys . ACCEPT_ANY_PROXY ; final java . lang . Boolean value = Boolean . TRUE ; final org . springframework . mock . web . MockServletContext context = ( ( org . springframe... | org . junit . Assert . assertEquals ( value , this . impl . getBoolean ( key ) ) |
managerRemovedOnKill ( ) { jetbrains . jetpad . base . edt . TestEdtManager manager = managers . createEdtManager ( "a" ) ; manager . kill ( ) ; "<AssertPlaceHolder>" ; } getManagers ( ) { return java . util . Collections . unmodifiableList ( managers ) ; } | org . junit . Assert . assertTrue ( managers . getManagers ( ) . isEmpty ( ) ) |
testGetEncryptionMethodNotEncrypted ( ) { org . w3c . dom . Document document = xmlHelpers . getXMLDocumentOfSAMLMessage ( message ) ; org . w3c . dom . NodeList nl = xmlHelpers . getAssertions ( document ) ; "<AssertPlaceHolder>" ; } getEncryptionMethod ( org . w3c . dom . Node ) { if ( ( assertion == null ) || ( ! ( ... | org . junit . Assert . assertEquals ( "no<sp>encryption" , xmlHelpers . getEncryptionMethod ( nl . item ( 0 ) ) ) |
put_Existing_NotSameKey ( ) { long now = java . lang . System . currentTimeMillis ( ) ; java . util . Date key1 = new java . util . Date ( now ) ; java . util . Date value1 = new java . util . Date ( now ) ; cache . put ( key1 , value1 ) ; java . util . Date key2 = new java . util . Date ( now ) ; java . util . Date va... | org . junit . Assert . assertSame ( value2 , cache . get ( key2 ) ) |
testReadRpcInputStreamsOneException ( ) { for ( int jn = 0 ; jn < 2 ; jn ++ ) { org . apache . hadoop . hdfs . qjournal . client . TestQuorumJournalManagerUnit . futureReturns ( getJournaledEditsReponse ( 1 , ( jn + 1 ) ) ) . when ( spyLoggers . get ( jn ) ) . getJournaledEdits ( 1 , QuorumJournalManager . QJM_RPC_MAX_... | org . junit . Assert . assertEquals ( 1 , streams . size ( ) ) |
matchesHasNotBeenSavedWithNullGlobalId ( ) { org . mockito . Mockito . when ( mockObject . editingContext ( ) ) . thenReturn ( mockEditingContext ) ; org . mockito . Mockito . when ( mockEditingContext . globalIDForObject ( mockObject ) ) . thenReturn ( null ) ; boolean result = matcher . matchesSafely ( mockObject ) ;... | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( false ) ) |
shouldFireListenersWhenMessage ( ) { final com . calclab . emite . xtesting . handlers . MessageReceivedTestHandler handler = new com . calclab . emite . xtesting . handlers . MessageReceivedTestHandler ( ) ; room . addMessageReceivedHandler ( handler ) ; final com . calclab . emite . core . stanzas . Message message =... | org . junit . Assert . assertEquals ( message , handler . getLastMessage ( ) ) |
testFormatting ( ) { java . lang . String expectedResult = "ip=hello.wav<sp>dr=no_name_driver<sp>ln=en-US<sp>eik=#<sp>mrt=100<sp>wit=100<sp>pst=50<sp>hw=57616974<sp>in=dtmf_speech<sp>mn=1<sp>mx=1<sp>pr=true" ; org . restcomm . connect . mgcp . AsrSignal asrSignal = new org . restcomm . connect . mgcp . AsrSignal ( driv... | org . junit . Assert . assertEquals ( expectedResult , actualResult ) |
shouldNotAddPropertyIfPropertyNameIsNull ( ) { final uk . gov . gchq . gaffer . data . element . Properties properties = new uk . gov . gchq . gaffer . data . element . Properties ( ) ; properties . put ( null , "propertyValue1" ) ; "<AssertPlaceHolder>" ; } size ( ) { return map . size ( ) ; } | org . junit . Assert . assertEquals ( 0 , properties . size ( ) ) |
testGetSubscribingToComponent0 ( java . lang . String , java . util . Map , org . apache . commons . configuration . Configuration ) { new com . boozallen . cognition . ingest . storm . topology . Expectations ( ) { { boltConf . getInt ( com . boozallen . cognition . ingest . storm . topology . SUBSCRIBE_TO_BOLT , ( - ... | org . junit . Assert . assertThat ( result , org . hamcrest . core . Is . is ( prevComponent ) ) |
testSpace1 ( ) { java . lang . String process = align ( "<sp>" , "foo<sp>bar" ) ; "<AssertPlaceHolder>" ; } align ( java . lang . String , java . lang . String ) { return new osmedile . intellij . stringmanip . align . ColumnAligner ( new osmedile . intellij . stringmanip . align . ColumnAlignerModel ( separator ) ) . ... | org . junit . Assert . assertThat ( process , org . hamcrest . CoreMatchers . is ( "foo<sp>bar" ) ) |
testMaterializeTopicsWithNoPartitions ( ) { java . util . Map < java . lang . String , java . util . List < org . apache . kafka . common . TopicPartition > > materializedTopics = consumeBenchSpec ( java . util . Arrays . asList ( "topic[1-3]" , "secondTopic" ) ) . materializeTopics ( ) ; java . util . Map < java . lan... | org . junit . Assert . assertEquals ( expected , materializedTopics ) |
testInvalidConfig ( ) { com . fasterxml . jackson . databind . ObjectMapper om = new com . fasterxml . jackson . databind . ObjectMapper ( ) ; com . fasterxml . jackson . databind . JsonNode json = om . readTree ( com . google . common . io . Resources . getResource ( org . onosproject . dhcprelay . config . DhcpRelayC... | org . junit . Assert . assertFalse ( config . isValid ( ) ) |
testGetScriptOverrideAnnotation ( ) { java . util . Map < java . lang . Class < ? > , org . richfaces . javascript . LibraryFunction > defaultMapping = com . google . common . collect . ImmutableMap . < java . lang . Class < ? > , org . richfaces . javascript . LibraryFunction > of ( org . richfaces . validator . Valid... | org . junit . Assert . assertSame ( function , script ) |
returnsTrueEvenIfGitDirectoriesAreNotEqual ( ) { java . nio . file . Path neq1 = java . nio . file . Paths . get ( getClass ( ) . getResource ( "/uk/ac/ic/wlgitbridge/snapshot/servermock/util/FileUtilTest/returnsTrueEvenIfGitDirectoriesAreNotEqual/eq1" ) . toURI ( ) ) ; java . nio . file . Path neq2 = java . nio . file... | org . junit . Assert . assertTrue ( uk . ac . ic . wlgitbridge . snapshot . servermock . util . FileUtil . gitDirectoriesAreEqual ( neq1 , neq2 ) ) |
testCreatePost ( ) { com . packtpub . techbuzz . entities . Post post = new com . packtpub . techbuzz . entities . Post ( ) ; post . setTitle ( "Sample<sp>Post" ) ; post . setDescription ( "Sample<sp>Post<sp>description" ) ; post . setUserId ( 1 ) ; post . setCreatedOn ( new java . util . Date ( ) ) ; post . addTag ( n... | org . junit . Assert . assertNotNull ( createdPost ) |
testGetClassName ( ) { java . lang . String className = com . picocontainer . classname . ClassName . class . getName ( ) ; com . picocontainer . classname . ClassName key = new com . picocontainer . classname . ClassName ( className ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( "BuilderNode:<sp>" + ( this ... | org . junit . Assert . assertEquals ( className , key . toString ( ) ) |
addAllIndexNormalTest ( ) { java . util . List < java . lang . Integer > toAddList = new java . util . ArrayList ( 5 ) ; toAddList . add ( 100 ) ; toAddList . add ( 200 ) ; toAddList . add ( 300 ) ; toAddList . add ( 400 ) ; toAddList . add ( 500 ) ; org . threadly . concurrent . collections . ConcurrentArrayList . Dat... | org . junit . Assert . assertTrue ( result . equals ( org . threadly . concurrent . collections . ConcurrentArrayListDataSetTest . makeDataSet ( expectedResult , 0 , expectedResult . length ) ) ) |
testDynamicQueryByProjectionMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . dynamic . data . lists . model . DDLRecord . class , _dynamicQueryClassLoader ) ; dynamicQuery . setProje... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
testExecutePowerUpTaskForDiscverableNodeWrongOSCreds ( ) { System . out . println ( "[TS]:<sp>testExecutePowerUpTaskForDiscverableNodeWrongOSCreds" ) ; com . vmware . vrack . hms . common . notification . TaskResponse TR = new com . vmware . vrack . hms . common . notification . TaskResponse ( new com . vmware . vrack ... | org . junit . Assert . assertTrue ( TR . getNode ( ) . isPowered ( ) ) |
testDeleteProcessInstanceInfoLogByStatus ( ) { int status = pilTestData [ 5 ] . getStatus ( ) ; org . kie . internal . runtime . manager . audit . query . ProcessInstanceLogDeleteBuilder updateBuilder = this . processInstanceLogDelete ( ) . status ( status ) ; int result = updateBuilder . build ( ) . execute ( ) ; "<As... | org . junit . Assert . assertEquals ( 1 , result ) |
testGetItemSpacing ( ) { org . eclipse . rap . rwt . theme . BoxDimensions actual = org . eclipse . rap . rwt . internal . theme . TabFolderThemeAdapter_Test . getThemeAdapter ( folder ) . getItemMargin ( item ) ; "<AssertPlaceHolder>" ; } getItemMargin ( org . eclipse . swt . widgets . TabItem ) { return getCssBoxDime... | org . junit . Assert . assertEquals ( new org . eclipse . rap . rwt . theme . BoxDimensions ( 1 , 1 , 1 , 1 ) , actual ) |
isDynamic ( ) { childResolvers = new java . util . ArrayList ( ) ; childResolvers . add ( getResolver ( null , resolvingContext , false ) ) ; childResolvers . add ( getResolver ( null , resolvingContext , true ) ) ; resolver = createCollectionResolver ( childResolvers ) ; "<AssertPlaceHolder>" ; } isDynamic ( ) { org .... | org . junit . Assert . assertThat ( resolver . isDynamic ( ) , org . hamcrest . CoreMatchers . is ( true ) ) |
test_140_2_17to22 ( ) { final org . osgi . framework . BundleContext context = getBundleContext ( ) ; org . osgi . framework . hooks . service . FindHook findHook = new org . osgi . framework . hooks . service . FindHook ( ) { @ org . eclipse . equinox . http . servlet . tests . Override public void find ( org . osgi .... | org . junit . Assert . assertNull ( sc1 . get ( ) ) |
test_bs_skip_utf32 ( ) { org . jerlang . type . Binary expected = new org . jerlang . type . Binary ( new int [ ] { 'B' } ) ; org . jerlang . type . List params = org . jerlang . type . List . of ( new org . jerlang . type . Binary ( new int [ ] { 0 , 0 , 0 , 65 , 'B' } ) ) ; org . jerlang . type . Term result = org . ... | org . junit . Assert . assertEquals ( expected , result ) |
testParseValueForDatabaseWrite ( ) { java . lang . Long expected = new java . lang . Long ( 123 ) ; java . lang . Object result = parser . parseValueForDatabaseWrite ( "syn123" ) ; "<AssertPlaceHolder>" ; } parseValueForDatabaseWrite ( java . lang . String ) { if ( Boolean . TRUE . toString ( ) . equalsIgnoreCase ( val... | org . junit . Assert . assertEquals ( expected , result ) |
shouldRetrieveLoadBalancerByIdAndAccountId ( ) { org . openstack . atlas . service . domain . services . LoadBalancer dbLoadBalancer = loadBalancerService . create ( loadBalancer ) ; org . openstack . atlas . service . domain . services . LoadBalancer loadBalancer = loadBalancerService . get ( dbLoadBalancer . getId ( ... | org . junit . Assert . assertNotNull ( loadBalancer . getId ( ) ) |
testEqualsUnequal1 ( ) { java . lang . String a = "92948782094488478231212478987482988429808779810457634781384756794987" ; int aScale = - 24 ; java . lang . String b = "7472334223847623782375469293018787918347987234564568" ; int bScale = 13 ; java . math . BigDecimal aNumber = new java . math . BigDecimal ( new java . ... | org . junit . Assert . assertFalse ( aNumber . equals ( bNumber ) ) |
shouldGetCubeByStarredCubeId ( ) { java . lang . String cubeId = "tomcat_46fd2cc1-0084-42a8-9ffd-35f305a08dcc" ; org . arquillian . cube . spi . Cube cube = createCubeMock ( cubeId ) ; cubeRegistry . addCube ( cube ) ; org . arquillian . cube . spi . Cube < ? > resolvedCube = cubeRegistry . getCube ( "tomcat*" ) ; "<As... | org . junit . Assert . assertSame ( cube , resolvedCube ) |
testPrimaryCardinality ( ) { java . lang . String expectedSql = "<sp>(SELECT<sp>P.ID,<sp>+<sp>COUNT(S.ROOT_ID)<sp>AS<sp>CARD" 2 + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "<sp>(SELECT<sp>P.ID,<sp>+<sp>COUNT(S.ROOT_ID)<sp>AS<sp>CARD" 4 + "<sp>JOIN" ) + "<sp>(SELECT<sp>P.ID,<sp>+<sp>COUNT(S.OWNER_ID)<sp>AS<sp>CARD" ) + "<sp>FROM<... | org . junit . Assert . assertEquals ( expectedSql , sql ) |
testSPSShouldNotLeakXattrIfSatisfyStoragePolicyCallOnECFiles ( ) { org . apache . hadoop . fs . StorageType [ ] [ ] diskTypes = new org . apache . hadoop . fs . StorageType [ ] [ ] { new org . apache . hadoop . fs . StorageType [ ] { org . apache . hadoop . fs . StorageType . SSD , org . apache . hadoop . fs . StorageT... | org . junit . Assert . assertEquals ( StorageType . DISK , type ) |
testIsFieldBindingValidWhenBindableNewColumnWithExistingBindingsNoClash ( ) { doReturn ( true ) . when ( plugin ) . isBindable ( ) ; doReturn ( true ) . when ( plugin ) . isNewColumn ( ) ; doReturn ( "$n" ) . when ( plugin ) . getBinding ( ) ; doReturn ( java . util . Collections . singletonList ( mockFactPattern ( "$a... | org . junit . Assert . assertTrue ( plugin . isFieldBindingValid ( ) ) |
canSpecifyMaxSamples ( ) { impl = new org . fishwife . jrugged . SampledQuantile ( 10 ) ; for ( int i = 0 ; i < 20 ; i ++ ) impl . addSample ( 0 ) ; "<AssertPlaceHolder>" ; } getNumSamples ( ) { return samples . size ( ) ; } | org . junit . Assert . assertEquals ( 10 , impl . getNumSamples ( ) ) |
testIsMatching_allFalse ( ) { org . deegree . gml . reference . matcher . MultipleReferencePatternMatcher matcher = new org . deegree . gml . reference . matcher . MultipleReferencePatternMatcher ( ) ; matcher . addMatcherToApply ( mockMatcher ( false ) ) ; matcher . addMatcherToApply ( mockMatcher ( false ) ) ; "<Asse... | org . junit . Assert . assertThat ( matcher . isMatching ( "test" ) , org . hamcrest . CoreMatchers . is ( false ) ) |
mustNotReturnAnyFaultyServices ( ) { byte [ ] buffer = com . offbynull . portmapper . mappers . upnpigd . externalmessages . RootUpnpIgdResponseTest . FAULTY_BUFFER . getBytes ( "US-ASCII" ) ; com . offbynull . portmapper . mappers . upnpigd . externalmessages . RootUpnpIgdResponse resp = new com . offbynull . portmapp... | org . junit . Assert . assertEquals ( 0 , services . size ( ) ) |
executeExpressionValue ( ) { org . springframework . integration . xquery . support . XQueryParameter param = new org . springframework . integration . xquery . support . XQueryParameter ( "paramName" , "headers['numbers'].?[#this<sp>><sp>5]" ) ; java . util . List < java . lang . Integer > numbers = java . util . Arra... | org . junit . Assert . assertEquals ( 2 , coll . size ( ) ) |
testSkipFileInputStreamOffset ( ) { java . io . File f = java . io . File . createTempFile ( "xxx" , "xxx" ) ; f . deleteOnExit ( ) ; java . io . FileOutputStream fout = new java . io . FileOutputStream ( f ) ; fout . write ( "a" . getBytes ( ) ) ; fout . close ( ) ; java . io . FileInputStream fin = new java . io . Fi... | org . junit . Assert . assertEquals ( ( - 1 ) , fin . read ( ) ) |
testDelete ( ) { javax . naming . ldap . LdapContext ctxRoot = getContext ( "uid=admin,ou=system" , getService ( ) , org . apache . directory . server . core . jndi . MixedCaseIT . SUFFIX_DN ) ; java . lang . String dn = "ou=Test" ; javax . naming . directory . Attributes attributes = org . apache . directory . api . l... | org . junit . Assert . assertNotNull ( ctx ) |
test ( ) { org . geotools . renderer . lite . StreamingRenderer renderer = new org . geotools . renderer . lite . StreamingRenderer ( ) ; org . geotools . map . MapContent map = new org . geotools . map . MapContent ( ) ; java . net . URL raster = getClass ( ) . getResource ( ( ( rasterBase ) + ".png" ) ) ; org . geoto... | org . junit . Assert . assertNull ( error . get ( ) ) |
testRDFConfigurationWriter ( ) { org . aksw . limes . core . io . config . Configuration conf = new org . aksw . limes . core . io . config . Configuration ( ) ; conf . addPrefix ( "geom" , "/resources/RDFWriterTestConfig.ttl" 4 ) ; conf . addPrefix ( "geos" , "/resources/RDFWriterTestConfig.ttl" 8 ) ; conf . addPrefix... | org . junit . Assert . assertTrue ( file . exists ( ) ) |
joinCpuLoadBo2List ( ) { java . util . List < com . navercorp . pinpoint . common . server . bo . stat . join . JoinCpuLoadBo > joinCpuLoadBoList = new java . util . ArrayList < com . navercorp . pinpoint . common . server . bo . stat . join . JoinCpuLoadBo > ( ) ; com . navercorp . pinpoint . common . server . bo . st... | org . junit . Assert . assertEquals ( joinCpuLoadBo , JoinCpuLoadBo . EMPTY_JOIN_CPU_LOAD_BO ) |
testSubscriptionReq ( ) { final org . eclipse . hono . adapter . mqtt . CommandSubscription subscription = org . eclipse . hono . adapter . mqtt . CommandSubscription . fromTopic ( "c/tenant/device/qx/#" , null ) ; "<AssertPlaceHolder>" ; } fromTopic ( java . lang . String , org . eclipse . hono . auth . Device ) { try... | org . junit . Assert . assertNull ( subscription ) |
testMaterializeAppEngineFlexFiles_objectifyListenerWithObjectify6 ( ) { com . google . cloud . tools . eclipse . appengine . newproject . AppEngineProjectConfig config = new com . google . cloud . tools . eclipse . appengine . newproject . AppEngineProjectConfig ( ) ; config . setAppEngineLibraries ( java . util . Coll... | org . junit . Assert . assertTrue ( objectifyListenerClassExists ( ) ) |
testEmptyConfigurationsSource ( ) { configureActionProvider ( ) ; actionProvider . setConfigurationAdmin ( configurationAdmin ) ; org . osgi . service . cm . Configuration [ ] configurations = new org . osgi . service . cm . Configuration [ 0 ] ; when ( source . getId ( ) ) . thenReturn ( org . codice . ddf . registry ... | org . junit . Assert . assertThat ( actions . size ( ) , org . hamcrest . Matchers . is ( 0 ) ) |
testReadFinish ( ) { reader = new com . google . cloud . storage . BlobReadChannel ( options , com . google . cloud . storage . BlobReadChannelTest . BLOB_ID , com . google . cloud . storage . BlobReadChannelTest . EMPTY_RPC_OPTIONS ) ; byte [ ] result = new byte [ ] { } ; java . nio . ByteBuffer readBuffer = java . ni... | org . junit . Assert . assertEquals ( ( - 1 ) , reader . read ( readBuffer ) ) |
testScrollingOnRightClick ( ) { openTestURL ( ) ; org . openqa . selenium . WebElement tree = getDriver ( ) . findElement ( org . openqa . selenium . By . id ( TreeScrollingOnRightClick . TREE_ID ) ) ; tree . click ( ) ; for ( int down = 0 ; down < 50 ; down ++ ) { tree . sendKeys ( Keys . ARROW_DOWN ) ; } java . lang ... | org . junit . Assert . assertEquals ( item40Location . getY ( ) , item40Location2 . getY ( ) ) |
sendAStringMessageAndAssertThatListenerIsInvoked ( ) { this . wireTap . preSend ( new org . springframework . integration . message . GenericMessage < org . opencredo . esper . sample . SampleEvent > ( new org . opencredo . esper . sample . SampleEvent ( ) ) , null ) ; "<AssertPlaceHolder>" ; } getNumberOfTimesInvoked ... | org . junit . Assert . assertEquals ( 1 , listener . getNumberOfTimesInvoked ( ) ) |
writeOptional ( ) { org . javacs . lsp . LSP . respond ( writer , 1 , java . util . Optional . of ( 1 ) ) ; org . javacs . lsp . var expected = "Content-Length:<sp>35\r\n\r\n{\"jsonrpc\":\"2.0\",\"id\":1,\"result\":1}" ; "<AssertPlaceHolder>" ; } bufferToString ( ) { try { org . javacs . lsp . var available = buffer . ... | org . junit . Assert . assertThat ( bufferToString ( ) , equalTo ( expected ) ) |
threadPoolRejectionAvailableInGetFallbackUsingExecute ( ) { setUpTenacityCommand ( 1 , 100 ) ; sleepCommand ( 80 ) . observe ( ) ; final int numberOfRejectCommands = 5 ; final java . util . concurrent . ExecutorService executorService = java . util . concurrent . Executors . newFixedThreadPool ( numberOfRejectCommands ... | org . junit . Assert . assertTrue ( rejectionFound ) |
test_that_adapting_page_with_wrong_resourceType_returns_null ( ) { com . day . cq . wcm . api . Page wrongPage = mock ( com . day . cq . wcm . api . Page . class ) ; org . apache . sling . api . resource . Resource wrongContentResource = mock ( org . apache . sling . api . resource . Resource . class ) ; when ( wrongPa... | org . junit . Assert . assertNull ( section ) |
testResourcesCleanup3 ( ) { final int nbThreads = 5 ; final int nbAppend = 10 ; final java . lang . String baseDir = getTestPath ( ) ; System . out . println ( ( "BaseDir<sp>:<sp>" + baseDir ) ) ; System . out . println ( ( "PID<sp>:<sp>" + ( getPID ( ) ) ) ) ; final net . openhft . chronicle . VanillaChronicle chronic... | org . junit . Assert . assertFalse ( new java . io . File ( baseDir ) . exists ( ) ) |
append_validNameValidValue_valueShouldBeAddedToTheMap ( ) { org . geotools . feature . ComplexFeatureBuilder builder = new org . geotools . feature . ComplexFeatureBuilder ( FakeTypes . Mine . MINETYPE_TYPE ) ; org . opengis . feature . ComplexAttribute mineNameProperty = org . geotools . feature . ComplexFeatureBuilde... | org . junit . Assert . assertSame ( mineNameProperty , actualValue ) |
testSetErrors ( ) { final java . util . List < fr . gouv . vitam . common . error . VitamError > errorList = new java . util . ArrayList ( ) ; errorList . add ( fr . gouv . vitam . common . error . VitamErrorTest . vitamError ) ; fr . gouv . vitam . common . error . VitamErrorTest . vitamError . addAllErrors ( errorLis... | org . junit . Assert . assertTrue ( fr . gouv . vitam . common . error . VitamErrorTest . vitamError . getErrors ( ) . contains ( fr . gouv . vitam . common . error . VitamErrorTest . vitamError ) ) |
testModelEmpty ( ) { final org . prop4j . explain . solvers . SatSolver solver = getInstance ( ) ; final java . util . Map < java . lang . Object , java . lang . Boolean > expected = java . util . Collections . emptyMap ( ) ; final java . util . Map < java . lang . Object , java . lang . Boolean > actual = solver . get... | org . junit . Assert . assertEquals ( expected , actual ) |
testDatumEindeIsNietGevuld ( ) { final java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > berichtEntiteits = new nl . bzk . brp . bijhouding . business . regels . impl . bijhouding . huwelijkgeregistreerdpartnerschap . acties . registratieeindehuwelijkpartnerschap . BRBY0443 ( ) . voerRegelUit ( ma... | org . junit . Assert . assertTrue ( berichtEntiteits . isEmpty ( ) ) |
getRuntimeInfo ( ) { org . talend . daikon . runtime . RuntimeInfo runtimeInfo = definition . getRuntimeInfo ( ExecutionEngine . BEAM , null , ConnectorTopology . INCOMING ) ; "<AssertPlaceHolder>" ; } getRuntimeInfo ( org . talend . components . api . component . runtime . ExecutionEngine , org . talend . components .... | org . junit . Assert . assertNotNull ( runtimeInfo ) |
getServletURI_simpleServlet ( ) { final java . lang . String uri = "/servlet" ; mock . checking ( new org . jmock . Expectations ( ) { { allowing ( req ) . getServletPath ( ) ; will ( returnValue ( uri ) ) ; allowing ( req ) . getPathInfo ( ) ; will ( returnValue ( null ) ) ; } } ) ; "<AssertPlaceHolder>" ; } getServle... | org . junit . Assert . assertEquals ( uri , handler . getServletURI ( req ) ) |
testFilesOnlyDoesntCauseRecreate ( ) { buildRule . executeTarget ( "testFilesOnlyDoesntCauseRecreateSetup" ) ; java . io . File testFile = new java . io . File ( buildRule . getOutputDir ( ) , "test3.zip" ) ; org . junit . Assume . assumeTrue ( "Could<sp>not<sp>change<sp>file<sp>modification<sp>time" , testFile . setLa... | org . junit . Assert . assertEquals ( l , testFile . lastModified ( ) ) |
testJarCommand ( ) { com . liferay . osgi . bundle . builder . commands . JarCommand jarCommand = new com . liferay . osgi . bundle . builder . commands . JarCommand ( ) ; java . io . File jarFile = new java . io . File ( _projectDir , "build/com.liferay.blade.authenticator.shiro.jar" ) ; jarCommand . build ( _getOSGiB... | org . junit . Assert . assertTrue ( jarFile . exists ( ) ) |
testDynamicQueryByProjectionMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . dynamic . data . mapping . model . DDMStructure . class , _dynamicQueryClassLoader ) ; dynamicQuery . set... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
shouldIncludeLaunchClasspathByDefault ( ) { final org . pitest . mutationtest . config . ReportOptions actual = parseAddingRequiredArgs ( "" ) ; "<AssertPlaceHolder>" ; } isIncludeLaunchClasspath ( ) { return this . includeLaunchClasspath ; } | org . junit . Assert . assertTrue ( actual . isIncludeLaunchClasspath ( ) ) |
testCloneNotSupportedException ( ) { java . lang . Object notCloned = new org . apache . commons . lang3 . text . StrTokenizer ( ) { @ org . apache . commons . lang3 . text . Override java . lang . Object cloneReset ( ) throws java . lang . CloneNotSupportedException { throw new java . lang . CloneNotSupportedException... | org . junit . Assert . assertNull ( notCloned ) |
longWrapper ( ) { model . setMyLong ( 1L ) ; com . google . appengine . api . datastore . Entity entity = meta . modelToEntity ( model ) ; com . google . appengine . api . datastore . Key key = ds . put ( entity ) ; com . google . appengine . api . datastore . Entity entity2 = ds . get ( key ) ; org . slim3 . datastore... | org . junit . Assert . assertThat ( model2 . getMyLong ( ) , org . hamcrest . CoreMatchers . is ( 1L ) ) |
testCompareScreen_acceptsBufferedImage_retries ( ) { com . vaadin . testbench . Parameters . setMaxScreenshotRetries ( 4 ) ; try { java . awt . image . BufferedImage mockImg = createNiceMock ( java . awt . image . BufferedImage . class ) ; org . openqa . selenium . WebDriver driver = mockScreenshotDriver ( 4 , false ) ... | org . junit . Assert . assertFalse ( tbce . compareScreen ( mockImg , "bar<sp>name" ) ) |
testAschemaReader ( ) { eu . esdihumboldt . hale . common . schema . model . Schema schema = readSchema ( ) ; "<AssertPlaceHolder>" ; } readSchema ( ) { eu . esdihumboldt . hale . io . jdbc . JDBCSchemaReader schemaReader = new eu . esdihumboldt . hale . io . jdbc . JDBCSchemaReader ( ) ; JDBCURI = new eu . esdihumbold... | org . junit . Assert . assertNotNull ( schema ) |
testFileChecksum ( ) { final org . apache . hadoop . fs . Path p = new org . apache . hadoop . fs . Path ( "har://file-localhost/foo.har/file1" ) ; final org . apache . hadoop . fs . HarFileSystem harfs = new org . apache . hadoop . fs . HarFileSystem ( ) ; try { "<AssertPlaceHolder>" ; } finally { if ( harfs != null )... | org . junit . Assert . assertEquals ( null , harfs . getFileChecksum ( p ) ) |
testGetTimeRange ( ) { org . eclipse . tracecompass . tmf . core . timestamp . TmfTimeRange result = fixture . getTimeRange ( ) ; "<AssertPlaceHolder>" ; } getTimeRange ( ) { return fTimeRange ; } | org . junit . Assert . assertNotNull ( result ) |
allLabelsExist ( ) { java . util . Set < java . lang . String > localLabels = new java . util . HashSet ( asList ( org . jenkinsci . plugins . github . pullrequest . events . impl . GitHubPRLabelNotExistsEventTest . LOCALLY_TESTED , org . jenkinsci . plugins . github . pullrequest . events . impl . GitHubPRLabelNotExis... | org . junit . Assert . assertNull ( cause ) |
passwordExpired ( ) { final com . ibm . ws . security . collaborator . CollaboratorUtils cu = mock . mock ( com . ibm . ws . security . collaborator . CollaboratorUtils . class ) ; final java . lang . String jaasEntryName = com . ibm . ws . security . authentication . utility . JaasLoginConfigConstants . SYSTEM_WEB_INB... | org . junit . Assert . assertEquals ( e . getMessage ( ) , true , foundException ) |
testGetAdapter_forDisplayAdapter ( ) { java . lang . Object adapter = display . getAdapter ( org . eclipse . swt . internal . widgets . IDisplayAdapter . class ) ; "<AssertPlaceHolder>" ; } getAdapter ( java . lang . Class ) { if ( adapter == ( org . eclipse . ui . model . IWorkbenchAdapter . class ) ) { return this ; ... | org . junit . Assert . assertTrue ( ( adapter instanceof org . eclipse . swt . internal . widgets . IDisplayAdapter ) ) |
testBasic ( ) { org . infinispan . manager . CacheContainer cacheContainer = ( ( org . infinispan . manager . CacheContainer ) ( new javax . naming . InitialContext ( ) . lookup ( "java:jboss/infinispan/container/server" ) ) ) ; org . infinispan . Cache < java . lang . String , java . lang . String > cache = cacheConta... | org . junit . Assert . assertEquals ( "biscuit" , cache . get ( "ham" ) ) |
testGetElementCount ( ) { "<AssertPlaceHolder>" ; } getElementCount ( ) { return 4 ; } | org . junit . Assert . assertThat ( group . getElementCount ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( 3 ) ) ) |
canProcessSuccessfullResuls ( ) { kong . unirest . PagedList < java . lang . String > list = new kong . unirest . PagedList ( ) ; list . addAll ( asList ( mkRequest ( "foo" ) , mkRequest ( null ) , mkRequest ( "baz" ) ) ) ; final java . util . List < java . lang . String > processed = new java . util . ArrayList ( ) ; ... | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( "foo" , "baz" ) , processed ) |
testSplitDagWithMultiReduces ( ) { io . cdap . cdap . etl . planner . ConnectorDag cdag = io . cdap . cdap . etl . planner . ConnectorDag . builder ( ) . addConnection ( "n1" , "n3" ) . addConnection ( "n2" , "n3" ) . addConnection ( "n3" , "n5" ) . addConnection ( "n5" 0 , "n5" ) . addConnection ( "n5" , "n7" ) . addC... | org . junit . Assert . assertEquals ( expected , actual ) |
testGetGeneralPlaceDgTlv ( ) { de . persosim . simulator . tlv . ConstructedTlvDataObject received = de . persosim . simulator . perso . AbstractProfile . getGeneralPlaceDgTlv ( new de . persosim . simulator . tlv . TlvTag ( ( ( byte ) ( 113 ) ) ) , "HEIDESTRASSE<sp>17" , "KÖLN" , null , "D" , "51147" ) ; de . persosim... | org . junit . Assert . assertArrayEquals ( expected . toByteArray ( ) , received . toByteArray ( ) ) |
testResolveBundleCapabilityConnectedRegionAllowed ( ) { org . eclipse . equinox . region . internal . tests . hook . RegionFilter filter = createBundleFilter ( org . eclipse . equinox . region . internal . tests . hook . RegionResolverHookTests . BUNDLE_B , org . eclipse . equinox . region . internal . tests . hook . R... | org . junit . Assert . assertTrue ( this . candidates . contains ( bundleCapability ( org . eclipse . equinox . region . internal . tests . hook . RegionResolverHookTests . BUNDLE_B ) ) ) |
testFindByPage ( ) { com . github . pagehelper . Page < com . xiaolyuh . domain . model . Person > persons = personService . findByPage ( 1 , 2 ) ; com . xiaolyuh . page . PageInfo < com . xiaolyuh . domain . model . Person > pageInfo = new com . xiaolyuh . page . PageInfo ( persons ) ; "<AssertPlaceHolder>" ; logger .... | org . junit . Assert . assertNotNull ( persons ) |
testDdl_TYPE_SMALLINT ( ) { java . lang . String ddl = ( "CREATE<sp>FOREIGN<sp>TABLE<sp>ONE_TYPE<sp>(" + ( org . teiid . designer . vdb . dynamic . TestModelToDdlGenerator . BQT2_TYPE_DDL . TYPE_SMALLINT ) ) + ")<sp>OPTIONS(UPDATABLE<sp>'TRUE');" ; java . lang . String expectedDdl = ( "CREATE<sp>FOREIGN<sp>TABLE<sp>ONE... | org . junit . Assert . assertEquals ( expectedDdl , generatedDdl ) |
putNoPreviousValueSucceed ( ) { com . microsoft . azure . sdk . iot . deps . twin . TwinCollection twinCollection = new com . microsoft . azure . sdk . iot . deps . twin . TwinCollection ( ) ; java . lang . Object lastBrand = twinCollection . putFinal ( tests . unit . com . microsoft . azure . sdk . iot . deps . twin .... | org . junit . Assert . assertNull ( lastBrand ) |
testArgumentValueConverter ( ) { final org . jboss . dmr . ModelNode node = HeadersArgumentValueConverter . INSTANCE . fromString ( ctx , ( "{<sp>rollout<sp>" + ( "groupE" 0 + "groupD(rolling-to-servers=true,max-failed-servers=1)<sp>^<sp>groupE<sp>rollback-across-groups}" ) ) ) ; final org . jboss . dmr . ModelNode exp... | org . junit . Assert . assertEquals ( expectedHeaders , node ) |
test_minus_longPeriodUnit_zero ( ) { java . time . LocalDate t = TEST_2007_07_15 . minus ( 0 , ChronoUnit . DAYS ) ; "<AssertPlaceHolder>" ; } minus ( long , java . time . temporal . TemporalUnit ) { return amountToSubtract == ( Long . MIN_VALUE ) ? plus ( Long . MAX_VALUE , unit ) . plus ( 1 , unit ) : plus ( ( - amou... | org . junit . Assert . assertSame ( t , TEST_2007_07_15 ) |
runTest ( ) { boolean result = checkNoError ( "Social_Activities_Create_Todo_Node" ) ; "<AssertPlaceHolder>" ; } getNoErrorMsg ( ) { return noErrorMsg ; } | org . junit . Assert . assertTrue ( getNoErrorMsg ( ) , result ) |
testNPlusOne ( ) { indi . mybatis . flying . pojo . Role2_ r = new indi . mybatis . flying . pojo . Role2_ ( ) ; r . setId ( 1 ) ; r . setName ( "root" ) ; role2Service . insert ( r ) ; indi . mybatis . flying . pojo . Role2_ r2 = new indi . mybatis . flying . pojo . Role2_ ( ) ; r2 . setId ( 2 ) ; r2 . setName ( "user... | org . junit . Assert . assertEquals ( 2 , accounts . size ( ) ) |
testGetPipelineNames ( ) { java . util . List < java . lang . String > values = mock ( java . util . List . class ) ; when ( pipelineService . getPipelineNames ( org . guvnor . ala . services . backend . impl . PipelineServiceBackendImplTest . PROVIDER_TYPE_NAME , org . guvnor . ala . services . backend . impl . Pipeli... | org . junit . Assert . assertEquals ( values , result ) |
createPrimeFaces ( ) { wizardAction . openNewLiferayJsfProjectWizard ( ) ; wizardAction . newLiferayJsf . prepareGradle ( project . getName ( ) , com . liferay . ide . ui . jsf . tests . PRIMEFACES ) ; wizardAction . finish ( ) ; jobAction . waitForNoRunningJobs ( ) ; "<AssertPlaceHolder>" ; viewAction . project . clos... | org . junit . Assert . assertTrue ( viewAction . project . visibleFileTry ( project . getName ( ) ) ) |
testClearWeakMakesObjectWeak ( ) { com . eclipsesource . v8 . V8Value object = new com . eclipsesource . v8 . V8Object ( v8 ) . setWeak ( ) . clearWeak ( ) ; "<AssertPlaceHolder>" ; object . close ( ) ; } isWeak ( ) { v8 . checkThread ( ) ; v8 . checkReleased ( ) ; return v8 . isWeak ( v8 . getV8RuntimePtr ( ) , getHan... | org . junit . Assert . assertFalse ( object . isWeak ( ) ) |
testJiraCsv154_withCommentMarker ( ) { final java . lang . String comment = "This<sp>is<sp>a<sp>header<sp>comment" ; final org . apache . commons . csv . CSVFormat format = CSVFormat . EXCEL . withHeader ( "H1" , "H2" ) . withCommentMarker ( '#' ) . withHeaderComments ( comment ) ; final java . lang . StringBuilder out... | org . junit . Assert . assertTrue ( s , s . contains ( comment ) ) |
stopQuery_alreadyStopped ( ) { final org . apache . rya . streams . api . RyaStreamsClient mockClient = mock ( org . apache . rya . streams . api . RyaStreamsClient . class ) ; final org . apache . rya . streams . api . interactor . StopQuery stopQuery = mock ( org . apache . rya . streams . api . interactor . StopQuer... | org . junit . Assert . assertEquals ( expected , message ) |
testInvalidIdColon ( ) { java . lang . String id = "content:634e8505-bd4b-436e-97e8-2045d1b0d265" . replace ( "-" , "" ) ; java . lang . String qualifier = "zoom-and-enhanced-overview" ; ddf . catalog . content . data . ContentItem item = new ddf . catalog . content . data . impl . ContentItemImpl ( id , qualifier , nu... | org . junit . Assert . assertThat ( ddf . catalog . content . data . impl . ContentItemValidator . validate ( item ) , org . hamcrest . Matchers . is ( false ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.