' Gambas test file 'Plan is one more because Test in _TeardownEach is counted twice! Private $SetupIsDone As Boolean Private $EachSetupIsDone As Boolean Public Sub _Setup() $SetupIsDone = True Test.Note("_Setup TestModule") End Public Sub _Teardown() If Not $SetupIsDone Then ' will bail out if Test_Setup failed Error.Raise("Test_Setup failed: _Setup was not executed correctly.") Endif Test.Note("Teardown TestModule") End Public Sub _SetupEach() Assert.NotOk($EachSetupIsDone, "Check if each was not setup.") $EachSetupIsDone = True Test.Note("_Setup Each") End Public Sub _TeardownEach() Assert.Ok($EachSetupIsDone, "Each setup done") Test.Note("Teardown Each") $EachSetupIsDone = False End Public Sub TestFirst() Assert.Ok($SetupIsDone, "Check if setup was successful.") Assert.Ok($EachSetupIsDone, "Check if setup each was successful.") Assert.StringEquals("ja", "ja", "Fake test") End Public Sub NameOfMethodDoesNotStartWithTest() Assert.StringEquals("no", "no", "Fake test") End