|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object junit.framework.Assert junit.framework.TestCase org.springframework.test.ConditionalTestCase org.springframework.test.AbstractSpringContextTests org.springframework.test.AbstractSingleSpringContextTests org.springframework.test.AbstractDependencyInjectionSpringContextTests org.springframework.osgi.test.AbstractOptionalDependencyInjectionTests org.springframework.osgi.test.AbstractOsgiTests
public abstract class AbstractOsgiTests
Base test for OSGi environments. Takes care of configuring the chosen OSGi platform, starting it, installing a number of bundles and delegating the test execution to a test copy that runs inside OSGi.
Field Summary | |
---|---|
protected ResourceLoader |
resourceLoader
|
Fields inherited from class org.springframework.osgi.test.AbstractOptionalDependencyInjectionTests |
---|
bundleContext |
Fields inherited from class org.springframework.test.AbstractDependencyInjectionSpringContextTests |
---|
AUTOWIRE_BY_NAME, AUTOWIRE_BY_TYPE, AUTOWIRE_NO |
Fields inherited from class org.springframework.test.AbstractSingleSpringContextTests |
---|
applicationContext |
Fields inherited from class org.springframework.test.ConditionalTestCase |
---|
logger |
Constructor Summary | |
---|---|
AbstractOsgiTests()
Default constructor. |
|
AbstractOsgiTests(String name)
Constructs a new AbstractOsgiTests instance. |
Method Summary | |
---|---|
protected abstract OsgiPlatform |
createPlatform()
Creates (and configures) the OSGi platform. |
protected abstract Resource[] |
getTestBundles()
Returns the bundles required for the test execution. |
protected abstract Resource[] |
getTestFrameworkBundles()
Returns the test framework bundles (part of the test setup). |
protected void |
postProcessBundleContext(BundleContext platformBundleContext)
Post-processes the bundle context. |
protected void |
preProcessBundleContext(BundleContext platformBundleContext)
Pre-processes the bundle context. |
void |
run(junit.framework.TestResult result)
Replacement run method. |
void |
runBare()
|
Methods inherited from class org.springframework.osgi.test.AbstractOptionalDependencyInjectionTests |
---|
createApplicationContext, isContextKeyEmpty |
Methods inherited from class org.springframework.test.AbstractDependencyInjectionSpringContextTests |
---|
getAutowireMode, injectDependencies, isDependencyCheck, isPopulateProtectedVariables, prepareTestInstance, setAutowireMode, setDependencyCheck, setPopulateProtectedVariables |
Methods inherited from class org.springframework.test.AbstractSingleSpringContextTests |
---|
contextKey, createBeanDefinitionReader, customizeBeanFactory, getApplicationContext, getConfigLocations, getConfigPath, getConfigPaths, getLoadCount, loadContext, loadContextLocations, onSetUp, onTearDown, prepareApplicationContext, setDirty, setUp, tearDown |
Methods inherited from class org.springframework.test.AbstractSpringContextTests |
---|
addContext, contextKeyString, getContext, hasCachedContext, setDirty |
Methods inherited from class org.springframework.test.ConditionalTestCase |
---|
getDisabledTestCount, isDisabledInThisEnvironment, recordDisabled |
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, runTest, setName, toString |
Methods inherited from class junit.framework.Assert |
---|
assertEquals, 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, fail, fail, failNotEquals, failNotSame, failSame |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected ResourceLoader resourceLoader
Constructor Detail |
---|
public AbstractOsgiTests()
AbstractOsgiTests
instance.
public AbstractOsgiTests(String name)
AbstractOsgiTests
instance.
name
- test nameMethod Detail |
---|
protected abstract Resource[] getTestFrameworkBundles()
getTestBundles()
instead.
protected abstract Resource[] getTestBundles()
protected abstract OsgiPlatform createPlatform() throws Exception
Exception
- if the platform creation failsprotected void preProcessBundleContext(BundleContext platformBundleContext) throws Exception
platformBundleContext
- the platform bundle context
Exception
- if processing the bundle context failspostProcessBundleContext(BundleContext)
protected void postProcessBundleContext(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 context
Exception
preProcessBundleContext(BundleContext)
public final void run(junit.framework.TestResult result)
run
in interface junit.framework.Test
run
in class junit.framework.TestCase
public void runBare() throws Throwable
runBare
in class ConditionalTestCase
Throwable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |