global
Class TestDriver

java.lang.Object
  extended byglobal.TestDriver
Direct Known Subclasses:
BTTest

public abstract class TestDriver
extends java.lang.Object

TestDriver class is a base class for various test driver objects.
Note that the code written so far is very machine dependent. It assumes the users are on UNIX system. For example, in function runTests, a UNIX command is called to clean up the working directories.


Field Summary
static boolean FAIL
           
static boolean OK
           
 
Constructor Summary
TestDriver(java.lang.String nameRoot)
          TestDriver Constructor
 
Method Summary
 boolean checkException(ChainException e, java.lang.Class expectedException)
          Used to verify whether the exception thrown from the bottom layer is the one expected.
 void cleanupAfterTests()
          cleanupAfterTests subclasses should override this method with any cleanup needed after running all tests.
 void initBeforeTests()
          initBeforeTests Starts the buffer manager.
 boolean runTests()
          This function does the preparation/cleaning work for the running tests.
 java.lang.String testName()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OK

public static final boolean OK
See Also:
Constant Field Values

FAIL

public static final boolean FAIL
See Also:
Constant Field Values
Constructor Detail

TestDriver

public TestDriver(java.lang.String nameRoot)
TestDriver Constructor

Parameters:
nameRoot - The name of the test being run
Method Detail

testName

public java.lang.String testName()
Returns:
String object which contains the name of the test

initBeforeTests

public void initBeforeTests()
initBeforeTests Starts the buffer manager. Subclasses should override this method with any initialization needed before running all tests.


cleanupAfterTests

public void cleanupAfterTests()
cleanupAfterTests subclasses should override this method with any cleanup needed after running all tests.


runTests

public final boolean runTests()
This function does the preparation/cleaning work for the running tests.

Returns:
a boolean value indicates whether ALL the tests have passed

checkException

public boolean checkException(ChainException e,
                              java.lang.Class expectedException)
Used to verify whether the exception thrown from the bottom layer is the one expected.