diva.util.jester
Class TestHarness

java.lang.Object
  extended by diva.util.jester.TestHarness

public class TestHarness
extends java.lang.Object

A test harness. A test harness is created by each test suite and has test cases passed to it. It is where such things as the level of output from the test, logging, and so on are set up. (Currently, the harness is very simple. It will be extended in the future.)

Version:
$Id: TestHarness.java 38798 2005-07-08 20:00:01Z cxh $
Author:
John Reekie

Field Summary
private  int _indentLevel
          The indent level
private  java.lang.String _indentString
          The indent string
private  java.io.PrintStream _outputStream
          The output stream
 
Constructor Summary
TestHarness()
           
 
Method Summary
(package private)  void doneTestSuite()
          Clean up after running a test suite.
(package private)  void print(java.lang.String s)
          Print to the output stream with no indent
(package private)  void println(java.lang.String s)
          Print to the output stream with the current indent
(package private)  void printnoln(java.lang.String s)
          Print to the output stream with the current indent
(package private)  void readyTestSuite(TestSuite suite)
          Get ready to run a test suite.
 void runTestCase(TestCase testCase)
          Run a single test and log the results
 void setOutputStream(java.io.PrintStream s)
          Set the output stream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_outputStream

private java.io.PrintStream _outputStream
The output stream


_indentLevel

private int _indentLevel
The indent level


_indentString

private java.lang.String _indentString
The indent string

Constructor Detail

TestHarness

public TestHarness()
Method Detail

runTestCase

public void runTestCase(TestCase testCase)
Run a single test and log the results


readyTestSuite

void readyTestSuite(TestSuite suite)
Get ready to run a test suite. Calls to this can be nested.


doneTestSuite

void doneTestSuite()
Clean up after running a test suite.


setOutputStream

public void setOutputStream(java.io.PrintStream s)
Set the output stream


println

void println(java.lang.String s)
Print to the output stream with the current indent


printnoln

void printnoln(java.lang.String s)
Print to the output stream with the current indent


print

void print(java.lang.String s)
Print to the output stream with no indent