public abstract class AbstractOptionalDependencyInjectionTests extends AbstractDependencyInjectionSpringContextTests
| Modifier and Type | Field and Description |
|---|---|
protected org.osgi.framework.BundleContext |
bundleContext |
AUTOWIRE_BY_NAME, AUTOWIRE_BY_TYPE, AUTOWIRE_NOapplicationContextlogger| Constructor and Description |
|---|
AbstractOptionalDependencyInjectionTests()
Default constructor.
|
AbstractOptionalDependencyInjectionTests(String name)
Constructs a new
AbstractOptionalDependencyInjectionTests
instance. |
| Modifier and Type | Method and Description |
|---|---|
protected org.springframework.context.ConfigurableApplicationContext |
createApplicationContext(String[] locations)
Create a Spring
ConfigurableApplicationContext for use by this test. |
protected boolean |
isContextKeyEmpty(Object key)
Determine if the supplied context
key is empty. |
getAutowireMode, injectDependencies, isDependencyCheck, isPopulateProtectedVariables, prepareTestInstance, setAutowireMode, setDependencyCheck, setPopulateProtectedVariablescontextKey, createBeanDefinitionReader, customizeBeanFactory, getApplicationContext, getConfigLocations, getConfigPath, getConfigPaths, getLoadCount, loadContext, loadContextLocations, onSetUp, onTearDown, prepareApplicationContext, setDirty, setUp, tearDownaddContext, contextKeyString, getContext, hasCachedContext, setDirtygetDisabledTestCount, isDisabledInThisEnvironment, recordDisabled, runBareassertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runTest, setName, toStringpublic AbstractOptionalDependencyInjectionTests()
AbstractOptionalDependencyInjectionTests instance.public AbstractOptionalDependencyInjectionTests(String name)
AbstractOptionalDependencyInjectionTests
instance.name - test nameprotected boolean isContextKeyEmpty(Object key)
AbstractSpringContextTestskey is empty.
By default, null values, empty strings, and zero-length
arrays are considered empty.
isContextKeyEmpty in class AbstractSpringContextTestskey - the context key to checktrue if the supplied context key is emptyprotected org.springframework.context.ConfigurableApplicationContext createApplicationContext(String[] locations)
ConfigurableApplicationContext for use by this test.
The default implementation creates a standard GenericApplicationContext
instance, calls the AbstractSingleSpringContextTests.prepareApplicationContext(org.springframework.context.support.GenericApplicationContext) prepareApplicationContext}
method and the customizeBeanFactory method to allow
for customizing the context and its DefaultListableBeanFactory, populates the
context from the specified config locations through the configured
BeanDefinitionReader,
and finally refreshes the context.
createApplicationContext in class AbstractSingleSpringContextTestslocations - the config locations (as Spring resource locations,
e.g. full classpath locations or any kind of URL)AbstractSingleSpringContextTests.loadContextLocations(String[]),
AbstractSingleSpringContextTests.customizeBeanFactory(DefaultListableBeanFactory),
AbstractSingleSpringContextTests.createBeanDefinitionReader(GenericApplicationContext)Copyright © 2006–2023. All rights reserved.