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

Test Suite. More...

Inheritance diagram for Dragengine.TestSystem.TestSuite:

Classes

enum  State
 Test State. More...

Public Member Functions

void addTestCase (TestCase testCase)
 Add test case.
void forEachTestCase (Block ablock)
 Visit test cases block.
Exception getException ()
 Exception if test suite failed.
String getID ()
 Identifier.
UnicodeString getName ()
 Display name.
State getState ()
 Test state.
TestCase getTestCaseAt (int index)
 Get test case at index.
int getTestCaseCount ()
 Count of test cases.
TestCase getTestCaseWithID (String id)
 Get test case with identifier or null if not found.
int indexOfTestCase (TestCase testCase)
 Index of test or -1 if absent.
TestSuite new (String id, UnicodeString name)
 Create test suite.
void removeAllTestCases ()
 Remove all test cases.
void removeTestCase (TestCase testCase)
void setException (Exception exception)
 Set exception if test suite failed.
void setState (State state)
 Set test state.
void tearDown ()
 Tear down after test suite finished.

Public Attributes

Exception pException
 Exception if test case failed.
String pID
 Identifier.
UnicodeString pName
 Display name.
State pState
 Test state.
Array pTestCases
 Test cases as Array of TestCase.

Detailed Description

Test Suite.

Version
1.5

Groups multiple TestCase. Test suites typically test various functionality of an object type. Also supports init() and tearDown() method. This allows to set up testing environment for a group of tests to run in avoiding the need to set them up for each test.

Member Function Documentation

◆ addTestCase()

void Dragengine.TestSystem.TestSuite.addTestCase ( TestCase testCase)

Add test case.

Referenced by tearDown().

◆ forEachTestCase()

void Dragengine.TestSystem.TestSuite.forEachTestCase ( Block ablock)

Visit test cases block.

Block receives as single parameter TestCase instance.

References pException.

Referenced by tearDown().

◆ getException()

Exception Dragengine.TestSystem.TestSuite.getException ( )

Exception if test suite failed.

Referenced by removeAllTestCases().

◆ getID()

String Dragengine.TestSystem.TestSuite.getID ( )

Identifier.

Referenced by setException().

◆ getName()

UnicodeString Dragengine.TestSystem.TestSuite.getName ( )

Display name.

Referenced by getTestCaseCount().

◆ getState()

State Dragengine.TestSystem.TestSuite.getState ( )

Test state.

Referenced by getTestCaseAt().

◆ getTestCaseAt()

TestCase Dragengine.TestSystem.TestSuite.getTestCaseAt ( int index)

Get test case at index.

References getState().

Referenced by tearDown().

◆ getTestCaseCount()

int Dragengine.TestSystem.TestSuite.getTestCaseCount ( )

Count of test cases.

References getName(), and pName.

Referenced by tearDown().

◆ getTestCaseWithID()

TestCase Dragengine.TestSystem.TestSuite.getTestCaseWithID ( String id)

Get test case with identifier or null if not found.

References pState.

Referenced by tearDown().

◆ indexOfTestCase()

int Dragengine.TestSystem.TestSuite.indexOfTestCase ( TestCase testCase)

Index of test or -1 if absent.

References setState().

Referenced by tearDown().

◆ new()

TestSuite Dragengine.TestSystem.TestSuite.new ( String id,
UnicodeString name )

Create test suite.

References new().

Referenced by new().

◆ removeAllTestCases()

void Dragengine.TestSystem.TestSuite.removeAllTestCases ( )

Remove all test cases.

References getException(), pException, and setException().

Referenced by tearDown().

◆ removeTestCase()

void Dragengine.TestSystem.TestSuite.removeTestCase ( TestCase testCase)

brief Remove test case.

Referenced by tearDown().

◆ setException()

void Dragengine.TestSystem.TestSuite.setException ( Exception exception)

Set exception if test suite failed.

References getID(), and pID.

Referenced by removeAllTestCases().

◆ setState()

void Dragengine.TestSystem.TestSuite.setState ( State state)

Set test state.

Referenced by indexOfTestCase().

◆ tearDown()

void Dragengine.TestSystem.TestSuite.tearDown ( )

Member Data Documentation

◆ pException

Exception Dragengine.TestSystem.TestSuite.pException

Exception if test case failed.

Referenced by forEachTestCase(), and removeAllTestCases().

◆ pID

String Dragengine.TestSystem.TestSuite.pID

Identifier.

Referenced by setException().

◆ pName

UnicodeString Dragengine.TestSystem.TestSuite.pName

Display name.

Referenced by getTestCaseCount().

◆ pState

State Dragengine.TestSystem.TestSuite.pState

Test state.

Referenced by getTestCaseWithID().

◆ pTestCases

Array Dragengine.TestSystem.TestSuite.pTestCases

Test cases as Array of TestCase.

Referenced by tearDown().


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