org.springframework.osgi.test
Class AbstractConfigurableOsgiTests

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.springframework.test.ConditionalTestCase
              extended by org.springframework.test.AbstractSpringContextTests
                  extended by org.springframework.test.AbstractSingleSpringContextTests
                      extended by org.springframework.test.AbstractDependencyInjectionSpringContextTests
                          extended by org.springframework.osgi.test.AbstractOptionalDependencyInjectionTests
                              extended by org.springframework.osgi.test.AbstractOsgiTests
                                  extended by org.springframework.osgi.test.AbstractConfigurableOsgiTests
All Implemented Interfaces:
Test, org.springframework.osgi.internal.test.OsgiJUnitTest
Direct Known Subclasses:
AbstractSynchronizedOsgiTests

public abstract class AbstractConfigurableOsgiTests
extends AbstractOsgiTests

Abstract JUnit super class which configures an OsgiPlatform.

This class offers more hooks for programmatic and declarative configuration of the underlying OSGi platform used when running the test suite.

Author:
Costin Leau

Field Summary
static String OSGI_FRAMEWORK_SELECTOR
          System property for selecting the appropriate OSGi implementation.
 
Fields inherited from class org.springframework.osgi.test.AbstractOsgiTests
bundleContext, resourceLoader
 
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.internal.test.OsgiJUnitTest
FOR_OSGI, FROM_OSGI, OSGI_TEST, OSGI_TEST_BUNDLE_ID
 
Constructor Summary
AbstractConfigurableOsgiTests()
           
AbstractConfigurableOsgiTests(String name)
           
 
Method Summary
protected  OsgiPlatform createPlatform()
          OSGi platform creation.
protected  List getBootDelegationPackages()
          List of OSGi packages that are delegated to the boot classpath.
protected  String getPlatformName()
          Indicate what OSGi platform to be used by the test suite.
 
Methods inherited from class org.springframework.osgi.test.AbstractOsgiTests
getBundleContext, getBundleLocations, getBundles, getMandatoryBundles, getResourceLoader, getTestBundles, getTestFrameworkBundles, injectBundleContext, injectOsgiJUnitTest, osgiRunTest, osgiSetUp, osgiTearDown, postProcessBundleContext, preProcessBundleContext, run, runBare, setName
 
Methods inherited from class org.springframework.osgi.test.AbstractOptionalDependencyInjectionTests
createApplicationContext
 
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, 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

OSGI_FRAMEWORK_SELECTOR

public static final String OSGI_FRAMEWORK_SELECTOR
System property for selecting the appropriate OSGi implementation.

See Also:
Constant Field Values
Constructor Detail

AbstractConfigurableOsgiTests

public AbstractConfigurableOsgiTests()

AbstractConfigurableOsgiTests

public AbstractConfigurableOsgiTests(String name)
Method Detail

createPlatform

protected OsgiPlatform createPlatform()
OSGi platform creation. This method is used to determine and create the OSGi platform used by the test suite (Equinox by default). See getPlatformName() for an easier alternative.

Specified by:
createPlatform in class AbstractOsgiTests
Returns:
the OSGi platform

getPlatformName

protected String getPlatformName()
Indicate what OSGi platform to be used by the test suite. By default, OSGI_FRAMEWORK_SELECTOR system property is used. Subclasses can override this and provide directly the OSGi platform name.

Returns:
platform
See Also:
Platforms

getBootDelegationPackages

protected List getBootDelegationPackages()
List of OSGi packages that are delegated to the boot classpath. See the OSGi specification regarding the format of the package string representation.

Returns:
the list of strings representing the packages that the OSGi platform will delegate to the boot class path.


Copyright © 2006-2007 Spring Framework. All Rights Reserved.