Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
Dragengine.TestSystem.TestRunner Class Reference

Test Runner. More...

Inheritance diagram for Dragengine.TestSystem.TestRunner:

Public Member Functions

void addTestSuite (TestSuite testSuite)
 Add test suite.
void dispose ()
 Dispose of test suite.
void forEachTestSuite (Block ablock)
 Visit test suites block.
bool getRunning ()
 Test runner is running.
TestSuite getTestSuiteAt (int index)
 Get test suite at index.
int getTestSuiteCount ()
 Count of test suites.
TestSuite getTestSuiteWithID (String id)
 Get test suite with identifier or null if not found.
int indexOfTestSuite (TestSuite testSuite)
 Index of test or -1 if absent.
TestRunner new ()
 Create test runner.
void onFrameUpdate (float elapsed)
 Frame update.
void removeAllTestSuites ()
 Remove all test suites.
void removeListener (TestRunnerListener listener)
 Remove listener.
void removeTestSuite (TestSuite testSuite)
void start ()
 Start running tests.
void stop ()
 Stop running tests.

Protected Member Functions

void initNextTestCase ()
 Init next test case.

Detailed Description

Test Runner.

Version
1.5

Runs test suited. To use the test runner add one or more TestSuite instance. Add listeners to be notified about the progress of testing. Then call start() to start running tests. The start() method returns immediately. The tests run during frame updates until all test suites finished running. Running tests can be stopped immediately by calling stop().

Member Function Documentation

◆ addTestSuite()

void Dragengine.TestSystem.TestRunner.addTestSuite ( TestSuite testSuite)

Add test suite.

References getTestSuiteCount().

Referenced by getRunning().

◆ dispose()

void Dragengine.TestSystem.TestRunner.dispose ( )

Dispose of test suite.

References new().

Referenced by getTestSuiteCount().

◆ forEachTestSuite()

void Dragengine.TestSystem.TestRunner.forEachTestSuite ( Block ablock)

Visit test suites block.

Block receives as single parameter TestSuite instance.

Referenced by onFrameUpdate().

◆ getRunning()

bool Dragengine.TestSystem.TestRunner.getRunning ( )

Test runner is running.

References addTestSuite(), and new().

Referenced by onFrameUpdate().

◆ getTestSuiteAt()

TestSuite Dragengine.TestSystem.TestRunner.getTestSuiteAt ( int index)

Get test suite at index.

References stop().

Referenced by removeAllTestSuites().

◆ getTestSuiteCount()

int Dragengine.TestSystem.TestRunner.getTestSuiteCount ( )

Count of test suites.

References dispose().

Referenced by addTestSuite().

◆ getTestSuiteWithID()

TestSuite Dragengine.TestSystem.TestRunner.getTestSuiteWithID ( String id)

Get test suite with identifier or null if not found.

Referenced by removeAllTestSuites(), and start().

◆ indexOfTestSuite()

int Dragengine.TestSystem.TestRunner.indexOfTestSuite ( TestSuite testSuite)

Index of test or -1 if absent.

Referenced by removeListener().

◆ initNextTestCase()

void Dragengine.TestSystem.TestRunner.initNextTestCase ( )
protected

Init next test case.

References removeAllTestSuites(), and removeTestSuite().

Referenced by onFrameUpdate().

◆ new()

TestRunner Dragengine.TestSystem.TestRunner.new ( )

Create test runner.

Referenced by dispose(), getRunning(), onFrameUpdate(), and start().

◆ onFrameUpdate()

void Dragengine.TestSystem.TestRunner.onFrameUpdate ( float elapsed)

Frame update.

For use by internal frame updater only.

References forEachTestSuite(), getRunning(), initNextTestCase(), new(), removeListener(), start(), and stop().

◆ removeAllTestSuites()

void Dragengine.TestSystem.TestRunner.removeAllTestSuites ( )

Remove all test suites.

References getTestSuiteAt(), and getTestSuiteWithID().

Referenced by initNextTestCase().

◆ removeListener()

void Dragengine.TestSystem.TestRunner.removeListener ( TestRunnerListener listener)

Remove listener.

References indexOfTestSuite().

Referenced by onFrameUpdate().

◆ removeTestSuite()

void Dragengine.TestSystem.TestRunner.removeTestSuite ( TestSuite testSuite)

brief Remove test suite.

Referenced by initNextTestCase().

◆ start()

void Dragengine.TestSystem.TestRunner.start ( )

Start running tests.

References getTestSuiteWithID(), and new().

Referenced by onFrameUpdate().

◆ stop()

void Dragengine.TestSystem.TestRunner.stop ( )

Stop running tests.

Referenced by getTestSuiteAt(), and onFrameUpdate().


The documentation for this class was generated from the following file: