ch.elca.el4j.tests.core
Class AbstractTest

java.lang.Object
  extended by ch.elca.el4j.tests.core.AbstractTest
Direct Known Subclasses:
AbstractCalculatorTest, AbstractJaxwsTest

public abstract class AbstractTest
extends Object

This class is a base class for tests in the EL4J framework. By default it keeps the created application context during all the tests in a test class.

Author:
Martin Zeltner (MZE), Stefan Wismer (SWI)
File-location:
AbstractTest
Last check-in date:
2009-08-04 13:59:45 +0200 (Di, 04. Aug 2009) by swismer for revision 3873

Field Summary
private  ConfigurableApplicationContext m_applicationContext
          Application context to load beans.
 
Constructor Summary
protected AbstractTest()
          Hide default constructor.
 
Method Summary
static void closeAllApplicationContexts()
          Close all application contexts.
protected  ConfigurableApplicationContext getApplicationContext()
           
protected  String[] getExcludeConfigLocations()
           
protected abstract  String[] getIncludeConfigLocations()
           
protected  boolean isBeanOverridingAllowed()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_applicationContext

private ConfigurableApplicationContext m_applicationContext
Application context to load beans.

Constructor Detail

AbstractTest

protected AbstractTest()
Hide default constructor.

Method Detail

getApplicationContext

protected ConfigurableApplicationContext getApplicationContext()
Returns:
Returns the application context.

closeAllApplicationContexts

public static void closeAllApplicationContexts()
Close all application contexts. This method gets executed "@AfterClass", but something like TestNG's "@AfterSuite" would be more efficient.


isBeanOverridingAllowed

protected boolean isBeanOverridingAllowed()
Returns:
Returns true if bean definition overriding should be allowed.

getExcludeConfigLocations

protected String[] getExcludeConfigLocations()
Returns:
Returns the string array with exclude locations.

getIncludeConfigLocations

protected abstract String[] getIncludeConfigLocations()
Returns:
Returns the string array with include locations.


Copyright © 2005-2011 ELCA. All Rights Reserved.