Drag[en]gine Script Module DragonScript  1.23
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. More...
 
void forEachTestCase (Block ablock)
 Visit test cases block. More...
 
Exception getException ()
 Exception if test suite failed. More...
 
String getID ()
 Identifier. More...
 
UnicodeString getName ()
 Display name. More...
 
State getState ()
 Test state. More...
 
TestCase getTestCaseAt (int index)
 Get test case at index. More...
 
int getTestCaseCount ()
 Count of test cases. More...
 
TestCase getTestCaseWithID (String id)
 Get test case with identifier or null if not found. More...
 
int indexOfTestCase (TestCase testCase)
 Index of test or -1 if absent. More...
 
TestSuite new (String id, UnicodeString name)
 Create test suite. More...
 
void removeAllTestCases ()
 Remove all test cases. More...
 
void removeTestCase (TestCase testCase)
 
void setException (Exception exception)
 Set exception if test suite failed. More...
 
void setState (State state)
 Set test state. More...
 
void tearDown ()
 Tear down after test suite finished. More...
 

Public Attributes

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

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.

◆ forEachTestCase()

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

Visit test cases block.

Block receives as single parameter TestCase instance.

◆ getException()

Exception Dragengine.TestSystem.TestSuite.getException ( )

Exception if test suite failed.

◆ getID()

String Dragengine.TestSystem.TestSuite.getID ( )

Identifier.

◆ getName()

UnicodeString Dragengine.TestSystem.TestSuite.getName ( )

Display name.

◆ getState()

State Dragengine.TestSystem.TestSuite.getState ( )

Test state.

◆ getTestCaseAt()

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

Get test case at index.

◆ getTestCaseCount()

int Dragengine.TestSystem.TestSuite.getTestCaseCount ( )

Count of test cases.

◆ getTestCaseWithID()

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

Get test case with identifier or null if not found.

◆ indexOfTestCase()

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

Index of test or -1 if absent.

◆ new()

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

Create test suite.

◆ removeAllTestCases()

void Dragengine.TestSystem.TestSuite.removeAllTestCases ( )

Remove all test cases.

◆ removeTestCase()

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

brief Remove test case.

◆ setException()

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

Set exception if test suite failed.

◆ setState()

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

Set test state.

◆ tearDown()

void Dragengine.TestSystem.TestSuite.tearDown ( )

Tear down after test suite finished.

Member Data Documentation

◆ pException

Exception Dragengine.TestSystem.TestSuite.pException

Exception if test case failed.

◆ pID

String Dragengine.TestSystem.TestSuite.pID

Identifier.

◆ pName

UnicodeString Dragengine.TestSystem.TestSuite.pName

Display name.

◆ pState

State Dragengine.TestSystem.TestSuite.pState

Test state.

◆ pTestCases

Array Dragengine.TestSystem.TestSuite.pTestCases

Test cases as Array of TestCase.


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