org.sysunit
Class AbstractTBean

java.lang.Object
  extended by junit.framework.Assert
      extended by org.sysunit.AbstractTBean
All Implemented Interfaces:
TBean
Direct Known Subclasses:
AbstractSynchronizableTBean, ThreadMethodTBean

public abstract class AbstractTBean
extends junit.framework.Assert
implements TBean

AbstractTBean is an abstract base class for a TBean implementation which is useful for implementation inheritence. The only required method that must be implemented is the TBean.run() method.

Version:
$Revision: 1.1 $
Author:
James Strachan, Bob McWhirter

Field Summary
 
Fields inherited from interface org.sysunit.TBean
EMPTY_ARRAY
 
Constructor Summary
AbstractTBean()
           
 
Method Summary
 void assertValid()
          Called after the run() methods of all the TBeans have completed (or timed out) to assert that each TBean is in a valid state
 void setUp()
          Called before each test run to initialise the TBean
 void tearDown()
          Called after the SysUnit test has run to clean up any resources such as database connections, to close any files etc
 
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, toString, wait, wait, wait
 
Methods inherited from interface org.sysunit.TBean
run
 

Constructor Detail

AbstractTBean

public AbstractTBean()
Method Detail

assertValid

public void assertValid()
                 throws Exception
Description copied from interface: TBean
Called after the run() methods of all the TBeans have completed (or timed out) to assert that each TBean is in a valid state

Specified by:
assertValid in interface TBean
Throws:
Exception - If an error occurs while attempting validate the TBean.
See Also:
TBean

setUp

public void setUp()
           throws Exception
Description copied from interface: TBean
Called before each test run to initialise the TBean

Specified by:
setUp in interface TBean
Throws:
Exception - If an error occurs while attempting to set up the TBean.
See Also:
TBean

tearDown

public void tearDown()
              throws Exception
Description copied from interface: TBean
Called after the SysUnit test has run to clean up any resources such as database connections, to close any files etc

Specified by:
tearDown in interface TBean
Throws:
Exception - If an error occurs while attempting to tear down the TBean.
See Also:
TBean


Copyright © 2003-2010 SpritSoft, Inc.. All Rights Reserved.