org.progeeks.junit
Class DefaultTestFixture

java.lang.Object
  extended by org.progeeks.junit.DefaultTestFixture
All Implemented Interfaces:
TestFixture

public class DefaultTestFixture
extends java.lang.Object
implements TestFixture

Basic context-aware test fixture. Capable of loading in MetaClasses and/or org.progeeks.tools.gen.DataGenerators for use by the tests.

Version:
$Revision: 1.2 $
Author:
esword

Field Summary
protected static Log log
           
 
Constructor Summary
DefaultTestFixture()
           
 
Method Summary
 MetaClassRegistry getContextRegistry()
           
 java.util.Map getDataGenerators()
           
 java.util.List getMetaClassDefs()
           
protected  void initMetaClasses()
           
 void setContextRegistry(MetaClassRegistry contextRegistry)
          If not set, the default registry will be used to store any MetaClasses from getMetaClassDefs()
 void setDataGenerators(java.util.Map dataGenerators)
           
 void setMetaClassDefs(java.util.List metaClassDefs)
           
 void setUp(TestContext context)
          Set up the test context for a run of a test.
 void tearDown(TestContext context)
          Clean up the test context after a test run.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final Log log
Constructor Detail

DefaultTestFixture

public DefaultTestFixture()
Method Detail

initMetaClasses

protected void initMetaClasses()
                        throws java.lang.Exception
Throws:
java.lang.Exception

setUp

public void setUp(TestContext context)
           throws java.lang.Exception
Description copied from interface: TestFixture
Set up the test context for a run of a test.

Specified by:
setUp in interface TestFixture
Parameters:
context - Test context to initialize.
Throws:
java.lang.Exception

tearDown

public void tearDown(TestContext context)
              throws java.lang.Exception
Description copied from interface: TestFixture
Clean up the test context after a test run.

Specified by:
tearDown in interface TestFixture
Parameters:
context - Test context to clean up.
Throws:
java.lang.Exception

getMetaClassDefs

public java.util.List getMetaClassDefs()
Returns:
Returns the metaClassDefs.

setMetaClassDefs

public void setMetaClassDefs(java.util.List metaClassDefs)
Parameters:
metaClassDefs - The metaClassDefs to set.

getDataGenerators

public java.util.Map getDataGenerators()
Returns:
Returns the dataGenerators.

setDataGenerators

public void setDataGenerators(java.util.Map dataGenerators)
Parameters:
dataGenerators - The dataGenerators to set.

getContextRegistry

public MetaClassRegistry getContextRegistry()
Returns:
Returns the contextRegistry.

setContextRegistry

public void setContextRegistry(MetaClassRegistry contextRegistry)
If not set, the default registry will be used to store any MetaClasses from getMetaClassDefs()

Parameters:
contextRegistry - The contextRegistry to set.


Copyright © 2002-2003 Paul Speed. All Rights Reserved.