Real-Time Java AOCS Framework v1.0 API Specification

RtjAocsFramework.GeneralUtilities
Class TestCase

java.lang.Object
  |
  +--RtjAocsFramework.GeneralUtilities.TestCase
Direct Known Subclasses:
TestCaseAocsEvent_1, TestCaseAocsEvent_2, TestCaseAocsEvent_3, TestCaseAocsEvent_4, TestCaseAocsEvent_5, TestCaseAocsObject_1, TestCaseAocsObject_2, TestCaseAocsObject_3, TestCaseGenericSetUp, TestCaseRootObject_1, TestCaseRootObject_2

public abstract class TestCase
extends Object

Base class for test cases.

This class is not part of the AOCS Framework proper. It is used in the test harnesses as the base class from which test case classes can be derived.

Copyright: see the Copyright Notice.

Version:
1.0
Author:
Alessandro Pasetti (University of Konstanz)
See Also:
The framework test approach

Field Summary
static boolean TEST_FAILURE
           
static boolean TEST_SUCCESS
           
 
Constructor Summary
TestCase(int id, String name)
           
 
Method Summary
 String getFailureMessage()
           
 String getTestName()
           
 boolean getTestOutcome()
           
abstract  void runTestCase()
          Causes the test to be executed.
protected  void setTestResult(boolean outcome, String msg)
          Set the test results.
 boolean setUpTestCase()
          Perform test set up prior to the test being run.
 boolean shutDownTestCase()
          Perform test shut down after test execution.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TEST_FAILURE

public static boolean TEST_FAILURE

TEST_SUCCESS

public static boolean TEST_SUCCESS
Constructor Detail

TestCase

public TestCase(int id,
                String name)
Method Detail

setUpTestCase

public boolean setUpTestCase()
Perform test set up prior to the test being run.

This method is intended to be called before runTestCase to perform the test set up.

Returns:
true if set up was successful, false otherwise

runTestCase

public abstract void runTestCase()
Causes the test to be executed.


shutDownTestCase

public boolean shutDownTestCase()
Perform test shut down after test execution.

This method intended to be called after runTestCase to perform the test shut down.

Returns:
true if shut down was successful, false otherwise

setTestResult

protected void setTestResult(boolean outcome,
                             String msg)
Set the test results. This method should only be called once from a given test.

Parameters:
outcome - true if test succeeded, false otherwise
msg - if test failed, explains the nature of the failure

getTestName

public String getTestName()

getTestOutcome

public boolean getTestOutcome()

getFailureMessage

public String getFailureMessage()

Real-Time Java AOCS Framework v1.0 API Specification

Real-Time Java AOCS Framework project home page

Automatic Control Laboratory, ETH Zuerich
Physikstrasse 3
CH-8092 Zuerich, Switzerland