org.springframework.osgi.test
Class AbstractConfigurableBundleCreatorTests
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
org.springframework.osgi.test.AbstractConfigurableBundleCreatorTests
- All Implemented Interfaces:
- Test, org.springframework.osgi.internal.test.OsgiJUnitTest
public abstract class AbstractConfigurableBundleCreatorTests
- extends AbstractOnTheFlyBundleCreatorTests
Subclass of AbstractOnTheFlyBundleCreatorTests which adds extra functionality
for configuring the jar creation. The created bundle (jar) can be configured
by indicating the locations for:
- root folder - the starting point on which the resource patterns are
applied
- inclusion patterns - comma separated strings which identify the
resources that should be included into the archive.
- manifest - the location of the manifest used for testing.
These settings can be configured by:
- using a properties file. By default the property name follows the
pattern "[testName]-bundle.properties", (i.e. /foo/bar/SomeTest will try to
load file /foo/bar/SomeTest-bundle.properties). If no properties file is
found, a set of defaults will be used.
- overriding the default getXXX methods and providing an alternatve
implementation.
- 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 |
ROOT_DIR
protected static final String ROOT_DIR
- See Also:
- Constant Field Values
INCLUDE_PATTERNS
protected static final String INCLUDE_PATTERNS
- See Also:
- Constant Field Values
LIBS
protected static final String LIBS
- See Also:
- Constant Field Values
MANIFEST
protected static final String MANIFEST
- See Also:
- Constant Field Values
DEFAULT_SETTINGS
public static final Properties DEFAULT_SETTINGS
jarSettings
protected static Properties jarSettings
- Settings for the jar creation.
AbstractConfigurableBundleCreatorTests
public AbstractConfigurableBundleCreatorTests()
getRootPath
protected String getRootPath()
- Resources' root path (the root path does not become part of the jar).
- Returns:
- the root path
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.
- Overrides:
getBundleContentPattern
in class AbstractOnTheFlyBundleCreatorTests
- Returns:
- the patterns
getManifestLocation
protected String getManifestLocation()
- Return the location (in Spring resource style) of the manifest location
to be used.
- Overrides:
getManifestLocation
in class AbstractOnTheFlyBundleCreatorTests
- Returns:
- the manifest location
getSettingsLocation
protected String getSettingsLocation()
- Returns the settings location (by default, the test name; i.e.
foo.bar.SomeTest will try to load foo/bar/SomeTest.properties).
- Returns:
getSettings
protected Properties getSettings()
throws Exception
- Load the settings (if they are found). A non-null properties object will
always be returned.
- Returns:
-
- Throws:
Exception
postProcessBundleContext
protected void postProcessBundleContext(BundleContext context)
throws Exception
- Load the jar settings, first from the disk falling back to the default
settings, if none is found.
- Overrides:
postProcessBundleContext
in class AbstractOnTheFlyBundleCreatorTests
- Throws:
Exception
- See Also:
AbstractOsgiTests.preProcessBundleContext(BundleContext)
Copyright © 2006-2007 Spring Framework. All Rights Reserved.