TestComponent

Declared In:

Introduction

The base class for test components.

Discussion

Test suites are a composite of components. The basic unit is a single TestCase, which may be tested as is. Several instances of TestCase are grouped in a TestSuite, which can test all its tests. A TestSuite object may contain other TestSuite objects, which may contain other suites. Testing a composite returns a TestResult object.



Member Functions

accept

Implemented by sub classes.

isComposite

Tells whether this is a composite test.

test

Runs a test.


accept


Implemented by sub classes.

on accept(
    aVisitor)
Parameters
aVisitor

[script] A visitor.


isComposite


Tells whether this is a composite test.

Return Value

[boolean] true if this a composite test; false otherwise.

Discussion

Allows transparent handling of components, avoiding try... on error, e.g., if a's isComposite() then a's add(foo).


test


Runs a test.

on test()
Return Value

[script] A TestResult object.