#ATestContainer C 'This abstract class identifies TestContainer classes. TestContainers are a 'classes that hold different test case methods. Name r s CaseNames p String[] Result p TestResult 'The current test case R p TestResult 'The current test case Debug p b _new m [(ShowDebug)b] RunCase m (oCase)ITestCase;(oTestResult)TestResult; SetupEach m TearDownEach m SetupContainer m TearDownContainer m #TestResult C 'The TestResult object collects the results from executing test cases. It is an 'instance of the Collecting Parameter pattern. When new failures or errors 'are added to the TestResult or if a test case is started or finished, the 'TestResult generates events to notify its event handlers about what has happened. CountRunnedTests r i 'Gets the number of run tests. Failures r TestErrors 'Returns a collection of failures Errors r TestErrors 'Returns a collection of errors Parameters p TestParameters 'Set and Returns parameter collection :AfterStartTest : (oTestCase)ITestCase; 'Events :AfterEndTest : :AfterAddError : (oError)TestError; :AfterAddFailure : (oError)TestError; :AfterAddTrace : (sMessage)s _new m 'Initialize Variables WasSuccessful r b 'Returns whether the entire test was successful or not. StartTest m (oTestCase)ITestCase; 'Informs the result that a test will be started. EndTest m 'Informs the result that a test is completed. AddFailure m (sDescription)s 'Adds a failure to the collection of failures. AddError m (lNumber)l(sSource)s(sDescription)s 'Adds a error to the collection of errors. AddTrace m (sMessage)s 'Add trace message Assert m (bCondition)b[(sMessage)s] 'Asserts that a condition is true. If it isn't it raises a failure with the given message. 'bCondition: condition to be asserted 'sMessage: optional message describing the asserted condition AssertFalse m (bCondition)b[(sMessage)s] 'Asserts that a condition is false. If it isn't it raises a failure with the given message. 'bCondition: condition to be asserted 'sMessage: optional message describing the asserted condition AssertEqualsString m (sExpected)s(sActual)s[(sMessage)s] 'Asserts that the expected string equals the actual string. 'sExpected: the expected value 'sActual: the actual value 'sMessage: optional message describing the asserted condition AssertEqualsLong m (lExpected)l(lActual)l[(sMessage)s] 'Asserts that the expected long value equals the actual long value. 'lExpected: the expected value 'lActual: the actual value 'sMessage: optional message describing the asserted condition AssertEqualsFloat m (dExpected)f(dActual)f(dDelta)f[(sMessage)s] 'Asserts that the expected Float value equals the actual Float value with delta precision. 'dExpected: the expected value 'dActual: the actual value 'dDelta: tolerated precision 'sMessage: optional message describing the asserted condition AssertEqualsVariant m (vExpected)v(vActual)v[(sMessage)s] 'Asserts that the expected variant equals the actual variant. 'vExpected: the expected value 'vActual: the actual value 'sMessage: optional message describing the asserted condition AssertExists m (oObject)o[(sMessage)s] 'Asserts that an object is not nothing 'oObject: object reference 'sMessage: the detail message to record if this assertion fails AssertEqualsObject m (oExpected)o(oActual)o[(sMessage)s] 'Asserts that the expected object equals the actual object. 'oExpected: expected object reference 'oActual: actual object reference 'sMessage: the detail message to record if this assertion fails AssertNotEmpty m (vVariant)v[(sMessage)s] 'Asserts that a variant is not empty 'vVariant: variant to evaluate 'sMessage: the detail message to record if this assertion fails AssertEmpty m (vVariant)v[(sMessage)s] 'Asserts that a variant is empty 'vVariant: variant to evaluate 'sMessage: the detail message to record if this assertion fails AssertNotNull m (vVariant)v[(sMessage)s] 'Asserts that a variant is not null 'vVariant: variant to evaluate 'sMessage: the detail message to record if this assertion fails AssertError m (ErrorNumber)l(ErrorMessage)s[(ErrorNumberExpected)l(StrMessage)s] 'Asserts that an error was thrown 'Use it so: 'Try DosomethingThatThrowserror() 'AssertError(Error.Code, Error.Text) #UnitTest C 'This class controls the unittesting. Suite p TestSuite DoSelfTest p b 'Normal name for testclasses starts with _GuTest, here it can be redefined _new m ShowTestForm m 'Show the Test Runner Form Test m [(ContainerName)s(CaseName)s(ShowDebug)b] 'Runs the Unittest and prints the result to the console. Optional limited to one testclass and/or one testmethod. _RunTests m (Result)TestResult;[(ContainerName)s(CaseName)s(ShowDebug)b(DoSelfTest)b] 'Run all tests, optional limited by Container or TestCaseName. TestResult contains . _PrintResult m (Res)TestResult; 'Prints a result. GetAllTestContainerNames M String[] [(DoSelfTest)b]