|
||||||||||
| 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.eclipse.gemini.blueprint.test.AbstractOptionalDependencyInjectionTests
org.eclipse.gemini.blueprint.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 org.springframework.core.io.ResourceLoader |
resourceLoader
|
| Fields inherited from class org.eclipse.gemini.blueprint.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 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()
|
| Methods inherited from class org.eclipse.gemini.blueprint.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, format |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected org.springframework.core.io.ResourceLoader resourceLoader
| Constructor Detail |
|---|
public AbstractOsgiTests()
AbstractOsgiTests instance.
public AbstractOsgiTests(String name)
AbstractOsgiTests instance.
name - test name| Method Detail |
|---|
protected 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 fails
protected void preProcessBundleContext(org.osgi.framework.BundleContext platformBundleContext)
throws Exception
platformBundleContext - the platform bundle context
Exception - 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 context
ExceptionpreProcessBundleContext(BundleContext)public final void run(junit.framework.TestResult result)
run in interface junit.framework.Testrun in class junit.framework.TestCase
public void runBare()
throws Throwable
runBare in class org.springframework.test.ConditionalTestCaseThrowable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||