org.qi4j.test
Class AbstractQi4jBaseTest

java.lang.Object
  extended by org.qi4j.test.AbstractQi4jBaseTest
Direct Known Subclasses:
AbstractQi4jTest

public abstract class AbstractQi4jBaseTest
extends java.lang.Object


Field Summary
protected  Qi4j api
           
protected  Application application
           
protected  ApplicationDescriptor applicationModel
           
protected  Energy4Java qi4j
           
protected  Qi4jSPI spi
           
 
Constructor Summary
AbstractQi4jBaseTest()
           
 
Method Summary
protected  void assemblyException(AssemblyException exception)
          This method is called when there was an AssemblyException in the creation of the Qi4j application model.
protected abstract  void defineApplication(ApplicationAssembly applicationAssembly)
          Called by the superclass for the test to define the entire application, every layer, every module and all the contents of each module.
protected  org.slf4j.Logger getLog()
           
protected  void initApplication(Application app)
           
protected  ApplicationDescriptor newApplication()
           
protected  Application newApplicationInstance(ApplicationDescriptor applicationModel)
           
 void setUp()
           
 void tearDown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

api

protected Qi4j api

spi

protected Qi4jSPI spi

qi4j

protected Energy4Java qi4j

applicationModel

protected ApplicationDescriptor applicationModel

application

protected Application application
Constructor Detail

AbstractQi4jBaseTest

public AbstractQi4jBaseTest()
Method Detail

setUp

public void setUp()
           throws java.lang.Exception
Throws:
java.lang.Exception

defineApplication

protected abstract void defineApplication(ApplicationAssembly applicationAssembly)
                                   throws AssemblyException
Called by the superclass for the test to define the entire application, every layer, every module and all the contents of each module.

Parameters:
applicationAssembly - the ApplicationAssembly to be populated.
Throws:
AssemblyException

newApplicationInstance

protected Application newApplicationInstance(ApplicationDescriptor applicationModel)

newApplication

protected ApplicationDescriptor newApplication()
                                        throws AssemblyException
Throws:
AssemblyException

assemblyException

protected void assemblyException(AssemblyException exception)
                          throws AssemblyException
This method is called when there was an AssemblyException in the creation of the Qi4j application model.

Override this method to catch valid failures to place into satisfiedBy suites.

Parameters:
exception - the exception thrown.
Throws:
AssemblyException - The default implementation of this method will simply re-throw the exception.

initApplication

protected void initApplication(Application app)
                        throws java.lang.Exception
Throws:
java.lang.Exception

tearDown

public void tearDown()
              throws java.lang.Exception
Throws:
java.lang.Exception

getLog

protected org.slf4j.Logger getLog()