org.springframework.osgi.test
Class AbstractOptionalDependencyInjectionTests

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
All Implemented Interfaces:
Test
Direct Known Subclasses:
AbstractOsgiTests

public abstract class AbstractOptionalDependencyInjectionTests
extends AbstractDependencyInjectionSpringContextTests

JUnit superclass, which creates an empty OSGi bundle appCtx when no configuration file is specified. Required for mixing Spring existing testing hierarchy with the OSGi testing framework functionality.

Author:
Costin Leau

Field Summary
protected  BundleContext 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
AbstractOptionalDependencyInjectionTests()
          Default constructor.
AbstractOptionalDependencyInjectionTests(String name)
          Constructs a new AbstractOptionalDependencyInjectionTests instance.
 
Method Summary
protected  ConfigurableApplicationContext createApplicationContext(String[] locations)
          

This implementation will create an empty bundle context in case no locations are specified.

protected  boolean isContextKeyEmpty(Object key)
           
 
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, runBare
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

bundleContext

protected BundleContext bundleContext
Constructor Detail

AbstractOptionalDependencyInjectionTests

public AbstractOptionalDependencyInjectionTests()
Default constructor. Constructs a new AbstractOptionalDependencyInjectionTests instance.


AbstractOptionalDependencyInjectionTests

public AbstractOptionalDependencyInjectionTests(String name)
Constructs a new AbstractOptionalDependencyInjectionTests instance.

Parameters:
name - test name
Method Detail

isContextKeyEmpty

protected boolean isContextKeyEmpty(Object key)
Overrides:
isContextKeyEmpty in class AbstractSpringContextTests

createApplicationContext

protected ConfigurableApplicationContext createApplicationContext(String[] locations)

This implementation will create an empty bundle context in case no locations are specified.

Overrides:
createApplicationContext in class AbstractSingleSpringContextTests


Copyright � 2006-2008 Spring Framework. All Rights Reserved.