public abstract class AbstractOsgiTests extends AbstractOptionalDependencyInjectionTests
| Modifier and Type | Field and Description |
|---|---|
protected org.springframework.core.io.ResourceLoader |
resourceLoader |
bundleContextAUTOWIRE_BY_NAME, AUTOWIRE_BY_TYPE, AUTOWIRE_NOapplicationContextlogger| Constructor and Description |
|---|
AbstractOsgiTests()
Default constructor.
|
AbstractOsgiTests(String name)
Constructs a new
AbstractOsgiTests instance. |
| Modifier and Type | Method and Description |
|---|---|
protected abstract OsgiPlatform |
createPlatform()
Creates (and configures) the OSGi platform.
|
protected abstract org.springframework.core.io.Resource[] |
getTestBundles()
Returns the bundles required for the test execution.
|
protected abstract org.springframework.core.io.Resource[] |
getTestFrameworkBundles()
Returns the test framework bundles (part of the test setup).
|
protected void |
postProcessBundleContext(org.osgi.framework.BundleContext platformBundleContext)
Post-processes the bundle context.
|
protected void |
preProcessBundleContext(org.osgi.framework.BundleContext platformBundleContext)
Pre-processes the bundle context.
|
void |
run(junit.framework.TestResult result)
Replacement run method.
|
void |
runBare() |
createApplicationContext, isContextKeyEmptygetAutowireMode, 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, recordDisabledassertEquals, 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, runTest, setName, toStringpublic AbstractOsgiTests()
AbstractOsgiTests instance.public AbstractOsgiTests(String name)
AbstractOsgiTests instance.name - test nameprotected abstract org.springframework.core.io.Resource[] getTestFrameworkBundles()
getTestBundles() instead.protected abstract org.springframework.core.io.Resource[] getTestBundles()
protected abstract OsgiPlatform createPlatform() throws Exception
Exception - if the platform creation failsprotected void preProcessBundleContext(org.osgi.framework.BundleContext platformBundleContext)
throws Exception
platformBundleContext - the platform bundle contextException - if processing the bundle context failspostProcessBundleContext(BundleContext)protected void postProcessBundleContext(org.osgi.framework.BundleContext platformBundleContext)
throws Exception
BundleContext belongs to the underlying OSGi framework.
Normally, this method is called only one during the lifecycle of a test suite.platformBundleContext - the platform bundle contextExceptionpreProcessBundleContext(BundleContext)public final void run(junit.framework.TestResult result)
run in interface junit.framework.Testrun in class junit.framework.TestCasepublic void runBare()
throws Throwable
runBare in class ConditionalTestCaseThrowableCopyright © 2006–2023. All rights reserved.