org.springframework.osgi.test
Class AbstractOnTheFlyBundleCreatorTests
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
org.springframework.osgi.test.AbstractConfigurableOsgiTests
org.springframework.osgi.test.AbstractSynchronizedOsgiTests
org.springframework.osgi.test.AbstractDependencyManagerTests
org.springframework.osgi.test.AbstractOnTheFlyBundleCreatorTests
- All Implemented Interfaces:
- Test, org.springframework.osgi.internal.test.OsgiJUnitTest
- Direct Known Subclasses:
- AbstractConfigurableBundleCreatorTests
public abstract class AbstractOnTheFlyBundleCreatorTests
- extends AbstractDependencyManagerTests
Enhanced subclass of AbstractDependencyManagerTests
which facilitates
OSGi testing by creating at runtime, on the fly, a jar using the indicated
manifest and resource patterns (by default all files found under the root
path).
Note that in more complex scenarios, dedicated packaging tools (such as
ant scripts or maven2) should be used.
- Author:
- Costin Leau
Fields inherited from interface org.springframework.osgi.internal.test.OsgiJUnitTest |
FOR_OSGI, FROM_OSGI, OSGI_TEST, OSGI_TEST_BUNDLE_ID |
Methods inherited from class org.springframework.osgi.test.AbstractDependencyManagerTests |
getBundleLocations, getBundles, getLocator, getMandatoryBundles, getSpringBundledVersion, getSpringOsgiVersion, getTestBundles, getTestBundlesNames, getTestFrameworkBundles, getTestFrameworkBundlesNames, getTestingFrameworkBundlesConfiguration, injectLocator, localMavenArtifact, localMavenArtifact, locateBundle, preProcessBundleContext |
Methods inherited from class org.springframework.test.AbstractSingleSpringContextTests |
contextKey, customizeBeanFactory, getApplicationContext, getConfigLocations, getConfigPath, getConfigPaths, getLoadCount, loadContext, loadContextLocations, onSetUp, onTearDown, setDirty, setUp, tearDown |
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 |
AbstractOnTheFlyBundleCreatorTests
public AbstractOnTheFlyBundleCreatorTests()
AbstractOnTheFlyBundleCreatorTests
public AbstractOnTheFlyBundleCreatorTests(String testName)
getBundleContentPattern
protected String[] getBundleContentPattern()
- Patterns for identifying the resources added to the jar. The patterns are
added to the root path when performing the search.
- Returns:
- the patterns
getManifestLocation
protected String getManifestLocation()
- Return the location (in Spring resource style) of the manifest location
to be used. If the manifest is created programatically, return a null
string and use
getManifest()
and
createDefaultManifest()
.
- Returns:
- the manifest location
getManifest
protected Manifest getManifest()
- Return the current test bundle manifest. The method tries to read the
manifest from the given location; in case the location is null, will
create a
Manifest
object containing default entries.
Subclasses should override this method to enhance the returned Manifest.
- Returns:
- Manifest used for this test suite.
- Throws:
Exception
- See Also:
createDefaultManifest()
createDefaultManifest
protected Manifest createDefaultManifest()
- Create the default manifest in case none if found on the disk. By
default, the imports are synthetised based on the test class bytecode.
- Returns:
postProcessBundleContext
protected void postProcessBundleContext(BundleContext context)
throws Exception
- Description copied from class:
AbstractSynchronizedOsgiTests
- Take care of waiting for Spring powered bundle application context
creation.
- Overrides:
postProcessBundleContext
in class AbstractSynchronizedOsgiTests
- Throws:
Exception
- See Also:
AbstractOsgiTests.preProcessBundleContext(BundleContext)
Copyright © 2006-2007 Spring Framework. All Rights Reserved.