|
Drag[en]gine Script Module DragonScript 1.35
|
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. | |
| void | assertDiffers (Object found, Object shouldNot) |
| Fail test if found equals expected. | |
| void | assertDVector (DVector found, DVector expected) |
| Fail test if vectors are not equal within range of 1mm. | |
| void | assertDVector (DVector found, DVector expected, float range) |
| Fail test if vectors are not equal within range. | |
| void | assertEquals (Object found, Object expected) |
| Fail test if found does not equal expected. | |
| void | assertFalse (bool found) |
| Fail test if found is not false. | |
| void | assertNotNull (Object found) |
| Fail test if found is not null. | |
| void | assertNull (Object found) |
| Fail test if found is not null. | |
| void | assertQuaternion (Quaternion found, Quaternion expected) |
| Fail test if quaternions are not equal within range of 1mm. | |
| void | assertQuaternion (Quaternion found, Quaternion expected, float range) |
| Fail test if quaternions are not equal within range. | |
| void | assertThrows (Block ablock) |
| Fail test if ablock does not throw an exception. | |
| void | assertTrue (bool found) |
| Fail test if found is not true. | |
| void | assertVector (DVector found, DVector expected, float range) |
| Fail test if vectors are not equal within range. | |
| void | assertVector (Vector found, Vector expected) |
| Fail test if vectors are not equal within range of 1mm. | |
| bool | getEnabled () |
| Test case is enabled. | |
| Exception | getException () |
| Exception if test case failed. | |
| String | getID () |
| Identifier. | |
| UnicodeString | getName () |
| Display name. | |
| State | getState () |
| Test state. | |
| TestSuite | getTestSuite () |
| Test suite. | |
| void | init () |
| Initialize test. | |
| TestCase | new (String id, UnicodeString name) |
| Create test case. | |
| bool | run (TestSuite testSuite) |
| Run test. | |
| void | setEnabled (bool enabled) |
| Set if test case is enabled. | |
| void | setException (Exception exception) |
| Set exception if test case failed. | |
| void | setState (State state) |
| Set test state. | |
| void | setTestSuite (TestSuite testSuite) |
| Set test suite. | |
Public Attributes | |
| bool | pEnabled |
| Test case is enabled. | |
| Exception | pException |
| Exception if test case failed. | |
| String | pID |
| Test identifier. | |
| UnicodeString | pName |
| Test name. | |
| State | pState |
| Test state. | |
| WeakReference | pTestSuite |
| Test suite. | |
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.
References assertColor(), assertDiffers(), assertDVector(), assertEquals(), assertFalse(), assertNotNull(), assertNull(), assertQuaternion(), assertThrows(), assertTrue(), and assertVector().
Referenced by assertColor().
| void Dragengine.TestSystem.TestCase.assertDiffers | ( | Object | found, |
| Object | shouldNot ) |
Fail test if vectors are not equal within range of 1mm.
Referenced by assertColor().
Fail test if vectors are not equal within range.
References init().
| void Dragengine.TestSystem.TestCase.assertEquals | ( | Object | found, |
| Object | expected ) |
Fail test if found does not equal expected.
References getState(), and pState.
Referenced by assertColor(), Dragengine.TestSystem.TestCaseECBehaviorPersistency.explicitRead(), Dragengine.TestSystem.TestCaseECBehavior.init(), and Dragengine.TestSystem.TestCaseECBehavior.run().
| void Dragengine.TestSystem.TestCase.assertFalse | ( | bool | found | ) |
Fail test if found is not false.
Referenced by assertColor(), and Dragengine.TestSystem.TestCaseECBehavior.run().
| void Dragengine.TestSystem.TestCase.assertNotNull | ( | Object | found | ) |
Fail test if found is not null.
References pException.
Referenced by assertColor(), Dragengine.TestSystem.TestCaseECBehavior.assertIntegerProperty(), and Dragengine.TestSystem.TestCaseECBehaviorPersistency.explicitRead().
| void Dragengine.TestSystem.TestCase.assertNull | ( | Object | found | ) |
| void Dragengine.TestSystem.TestCase.assertQuaternion | ( | Quaternion | found, |
| Quaternion | expected ) |
Fail test if quaternions are not equal within range of 1mm.
Referenced by assertColor().
| void Dragengine.TestSystem.TestCase.assertQuaternion | ( | Quaternion | found, |
| Quaternion | expected, | ||
| float | range ) |
Fail test if quaternions are not equal within range.
References run().
| void Dragengine.TestSystem.TestCase.assertThrows | ( | Block | ablock | ) |
Fail test if ablock does not throw an exception.
References pException, and setException().
Referenced by assertColor().
| void Dragengine.TestSystem.TestCase.assertTrue | ( | bool | found | ) |
Fail test if found is not true.
Referenced by assertColor(), and Dragengine.TestSystem.TestCaseECBehavior.run().
Fail test if vectors are not equal within range.
Fail test if vectors are not equal within range of 1mm.
Referenced by assertColor().
| bool Dragengine.TestSystem.TestCase.getEnabled | ( | ) |
| Exception Dragengine.TestSystem.TestCase.getException | ( | ) |
| String Dragengine.TestSystem.TestCase.getID | ( | ) |
Identifier.
Referenced by getException().
| UnicodeString Dragengine.TestSystem.TestCase.getName | ( | ) |
Display name.
Referenced by setException().
| State Dragengine.TestSystem.TestCase.getState | ( | ) |
Test state.
Referenced by assertEquals().
| TestSuite Dragengine.TestSystem.TestCase.getTestSuite | ( | ) |
Test suite.
Referenced by getEnabled().
| void Dragengine.TestSystem.TestCase.init | ( | ) |
Initialize test.
Reimplemented in Dragengine.TestSystem.TestCaseECBehavior, and Dragengine.TestSystem.TestCaseECBehaviorPersistency.
References getEnabled(), pEnabled, and pName.
Referenced by assertDVector().
| TestCase Dragengine.TestSystem.TestCase.new | ( | String | id, |
| UnicodeString | name ) |
Create test case.
Reimplemented in Dragengine.TestSystem.TestCaseECBehavior, and Dragengine.TestSystem.TestCaseECBehaviorPersistency.
References new().
Referenced by new().
| 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.TestCaseECBehavior, and Dragengine.TestSystem.TestCaseECBehaviorPersistency.
References pEnabled, and setEnabled().
Referenced by assertQuaternion().
| void Dragengine.TestSystem.TestCase.setEnabled | ( | bool | enabled | ) |
Set if test case is enabled.
Referenced by run().
| void Dragengine.TestSystem.TestCase.setException | ( | Exception | exception | ) |
| void Dragengine.TestSystem.TestCase.setState | ( | State | state | ) |
| void Dragengine.TestSystem.TestCase.setTestSuite | ( | TestSuite | testSuite | ) |
| Exception Dragengine.TestSystem.TestCase.pException |
Exception if test case failed.
Referenced by assertNotNull(), and assertThrows().
| String Dragengine.TestSystem.TestCase.pID |
Test identifier.
Referenced by setException().
| UnicodeString Dragengine.TestSystem.TestCase.pName |
Test name.
Referenced by init().
| State Dragengine.TestSystem.TestCase.pState |
Test state.
Referenced by assertEquals().
| WeakReference Dragengine.TestSystem.TestCase.pTestSuite |
Test suite.
Referenced by getEnabled(), and setState().