|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.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 starting the OSGi platform, installing the given bundles and delegating the test execution to a copy which 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 |
Fields inherited from interface org.springframework.osgi.test.internal.OsgiJUnitTest |
---|
FOR_OSGI, FROM_OSGI, OSGI_TEST, OSGI_TEST_BUNDLE_ID |
Constructor Summary | |
---|---|
AbstractOsgiTests()
|
|
AbstractOsgiTests(String name)
|
Method Summary | |
---|---|
protected abstract OsgiPlatform |
createPlatform()
Create (and configure) the OSGi platform. |
protected abstract Resource[] |
getTestBundles()
Bundles required for the the test execution. |
protected abstract Resource[] |
getTestFrameworkBundles()
Test framework bundles (part of the test setup). |
void |
injectBundleContext(BundleContext bundleContext)
Set the bundle context to be used by this test. |
void |
injectOsgiJUnitTest(org.springframework.osgi.test.internal.OsgiJUnitTest test)
Set the underlying OsgiJUnitTest used for the test delegation. |
void |
osgiRunTest()
Actual test execution (delegates to the superclass implementation). |
void |
osgiSetUp()
the setUp version for the OSGi environment. |
void |
osgiTearDown()
|
protected void |
postProcessBundleContext(BundleContext platformBundleContext)
Callback for processing the platform bundle context after the critical test infrastructure bundles have been installed and started. |
protected void |
preProcessBundleContext(BundleContext platformBundleContext)
Callback for processing the platform bundle context before any bundles have been installed. |
void |
run(TestResult result)
Replacement run method. |
void |
runBare()
|
void |
setName(String name)
|
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, 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, 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()
public AbstractOsgiTests(String name)
Method Detail |
---|
protected abstract Resource[] getTestFrameworkBundles()
getTestBundles()
instead.
protected abstract Resource[] getTestBundles()
protected abstract OsgiPlatform createPlatform() throws Exception
Exception
protected void preProcessBundleContext(BundleContext platformBundleContext) throws Exception
platformBundleContext
-
Exception
postProcessBundleContext(BundleContext)
protected void postProcessBundleContext(BundleContext platformBundleContext) throws Exception
platformBundleContext
-
Exception
preProcessBundleContext(BundleContext)
public final void run(TestResult result)
run
in interface Test
run
in class TestCase
public void runBare() throws Throwable
runBare
in class ConditionalTestCase
Throwable
public final void osgiSetUp() throws Exception
osgiSetUp
in interface org.springframework.osgi.test.internal.OsgiJUnitTest
Exception
public final void osgiTearDown() throws Exception
osgiTearDown
in interface org.springframework.osgi.test.internal.OsgiJUnitTest
Exception
public final void osgiRunTest() throws Throwable
osgiRunTest
in interface org.springframework.osgi.test.internal.OsgiJUnitTest
Throwable
public final void injectBundleContext(BundleContext bundleContext)
injectBundleContext
in interface org.springframework.osgi.test.internal.OsgiJUnitTest
public void setName(String name)
setName
in interface org.springframework.osgi.test.internal.OsgiJUnitTest
setName
in class TestCase
public final void injectOsgiJUnitTest(org.springframework.osgi.test.internal.OsgiJUnitTest test)
test
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |