Drag[en]gine Script Module DragonScript
1.23
|
Test Case. More...
Classes | |
enum | State |
Test State. More... | |
Public Member Functions | |
void | assertColor (Color found, Color expected, float range) |
Fail test if colors are not equal within range. More... | |
void | assertDiffers (Object found, Object shouldNot) |
Fail test if found equals expected. More... | |
void | assertDVector (DVector found, DVector expected) |
Fail test if vectors are not equal within range of 1mm. More... | |
void | assertDVector (DVector found, DVector expected, float range) |
Fail test if vectors are not equal within range. More... | |
void | assertEquals (Object found, Object expected) |
Fail test if found does not equal expected. More... | |
void | assertFalse (bool found) |
Fail test if found is not false. More... | |
void | assertNotNull (Object found) |
Fail test if found is not null. More... | |
void | assertNull (Object found) |
Fail test if found is not null. More... | |
void | assertQuaternion (Quaternion found, Quaternion expected) |
Fail test if quaternions are not equal within range of 1mm. More... | |
void | assertQuaternion (Quaternion found, Quaternion expected, float range) |
Fail test if quaternions are not equal within range. More... | |
void | assertThrows (Block ablock) |
Fail test if ablock does not throw an exception. More... | |
void | assertTrue (bool found) |
Fail test if found is not true. More... | |
void | assertVector (DVector found, DVector expected, float range) |
Fail test if vectors are not equal within range. More... | |
void | assertVector (Vector found, Vector expected) |
Fail test if vectors are not equal within range of 1mm. More... | |
bool | getEnabled () |
Test case is enabled. More... | |
Exception | getException () |
Exception if test case failed. More... | |
String | getID () |
Identifier. More... | |
UnicodeString | getName () |
Display name. More... | |
State | getState () |
Test state. More... | |
TestSuite | getTestSuite () |
Test suite. More... | |
void | init () |
Initialize test. More... | |
TestCase | new (String id, UnicodeString name) |
Create test case. More... | |
bool | run (TestSuite testSuite) |
Run test. More... | |
void | setEnabled (bool enabled) |
Set if test case is enabled. More... | |
void | setException (Exception exception) |
Set exception if test case failed. More... | |
void | setState (State state) |
Set test state. More... | |
void | setTestSuite (TestSuite testSuite) |
Set test suite. More... | |
Public Attributes | |
bool | pEnabled |
Test case is enabled. More... | |
Exception | pException |
Exception if test case failed. More... | |
String | pID |
Test identifier. More... | |
UnicodeString | pName |
Test name. More... | |
State | pState |
Test state. More... | |
WeakReference | pTestSuite |
Test suite. More... | |
Test Case.
Defines a test case. Test cases have a init(), run() and tearDown() method. While running the test case init() is called first. Then run() is called during each frame update until run() returns false. Once the test finished (either successfully or not) tearDown() is called. It is guaranteed tearDown() is always called if init() has been called.
Fail test if colors are not equal within range.
void Dragengine.TestSystem.TestCase.assertDiffers | ( | Object | found, |
Object | shouldNot | ||
) |
Fail test if found equals expected.
Fail test if vectors are not equal within range of 1mm.
Fail test if vectors are not equal within range.
void Dragengine.TestSystem.TestCase.assertEquals | ( | Object | found, |
Object | expected | ||
) |
Fail test if found does not equal expected.
void Dragengine.TestSystem.TestCase.assertFalse | ( | bool | found | ) |
Fail test if found is not false.
void Dragengine.TestSystem.TestCase.assertNotNull | ( | Object | found | ) |
Fail test if found is not null.
void Dragengine.TestSystem.TestCase.assertNull | ( | Object | found | ) |
Fail test if found is not null.
void Dragengine.TestSystem.TestCase.assertQuaternion | ( | Quaternion | found, |
Quaternion | expected | ||
) |
Fail test if quaternions are not equal within range of 1mm.
void Dragengine.TestSystem.TestCase.assertQuaternion | ( | Quaternion | found, |
Quaternion | expected, | ||
float | range | ||
) |
Fail test if quaternions are not equal within range.
void Dragengine.TestSystem.TestCase.assertThrows | ( | Block | ablock | ) |
Fail test if ablock does not throw an exception.
void Dragengine.TestSystem.TestCase.assertTrue | ( | bool | found | ) |
Fail test if found is not true.
Fail test if vectors are not equal within range.
Fail test if vectors are not equal within range of 1mm.
bool Dragengine.TestSystem.TestCase.getEnabled | ( | ) |
Test case is enabled.
Exception Dragengine.TestSystem.TestCase.getException | ( | ) |
Exception if test case failed.
String Dragengine.TestSystem.TestCase.getID | ( | ) |
Identifier.
UnicodeString Dragengine.TestSystem.TestCase.getName | ( | ) |
Display name.
State Dragengine.TestSystem.TestCase.getState | ( | ) |
Test state.
TestSuite Dragengine.TestSystem.TestCase.getTestSuite | ( | ) |
Test suite.
void Dragengine.TestSystem.TestCase.init | ( | ) |
Initialize test.
Reimplemented in Dragengine.TestSystem.TestCaseECBehaviorPersistency, and Dragengine.TestSystem.TestCaseECBehavior.
TestCase Dragengine.TestSystem.TestCase.new | ( | String | id, |
UnicodeString | name | ||
) |
Create test case.
Reimplemented in Dragengine.TestSystem.TestCaseECBehaviorPersistency, and Dragengine.TestSystem.TestCaseECBehavior.
bool Dragengine.TestSystem.TestCase.run | ( | TestSuite | testSuite | ) |
Run test.
Called every frame update. Test keeps running while this method returns true. Once this method returns false the test finishes with state set to passed. To fail the test throw an exception.
Reimplemented in Dragengine.TestSystem.TestCaseECBehaviorPersistency, and Dragengine.TestSystem.TestCaseECBehavior.
void Dragengine.TestSystem.TestCase.setEnabled | ( | bool | enabled | ) |
Set if test case is enabled.
void Dragengine.TestSystem.TestCase.setException | ( | Exception | exception | ) |
Set exception if test case failed.
void Dragengine.TestSystem.TestCase.setState | ( | State | state | ) |
Set test state.
void Dragengine.TestSystem.TestCase.setTestSuite | ( | TestSuite | testSuite | ) |
Set test suite.
For use only by TestSuite.
bool Dragengine.TestSystem.TestCase.pEnabled |
Test case is enabled.
Exception Dragengine.TestSystem.TestCase.pException |
Exception if test case failed.
String Dragengine.TestSystem.TestCase.pID |
Test identifier.
UnicodeString Dragengine.TestSystem.TestCase.pName |
Test name.
State Dragengine.TestSystem.TestCase.pState |
Test state.
WeakReference Dragengine.TestSystem.TestCase.pTestSuite |
Test suite.