This commit is contained in:
Christof Thalhofer 2016-09-23 15:03:03 +02:00
parent a4a12e1847
commit afeda37c26
3 changed files with 4 additions and 4 deletions

View file

@ -6,7 +6,7 @@ Scroll down to understand, how it works.
## Runner
Here you can see the Unittest tests itself. The testclasses (here called TestContainer) have to produce some failures and one error, to prove, that all works ok. Usually the TestContainer's names should start with "_GuTest" but for testing itself Unittest uses an alternate prefix ("_MyselfGuTest").
Here you can see the Unittest tests itself. The testclasses (here called TestContainer) have to produce some failures and one error, to prove, that all works ok.
![Unittest Runner](runner-screen.png)
@ -25,11 +25,11 @@ The following example you find also in [this simple Gambas project](unittesthell
### Example TestContainer
You should create a class with a name starting with "_GuTest", for example "_GuTestHelloWorld", it contains one or more public testmethod(s). It has to inherit from ATestContainer and it has to be exported to ensure the unittest will recognize it. It is the so called TestContainer:
You should create a class with a name starting with "_Test", for example "_TestHelloWorld", it contains one or more public testmethod(s). It has to inherit from ATestContainer and it has to be exported to ensure the unittest will recognize it. It is the so called TestContainer:
----
' Gambas class file
''' TestContainer _GuTestHelloWorld
''' TestContainer _TestHelloWorld
Export
Inherits ATestContainer
@ -64,7 +64,7 @@ To make it work, we need a funktion to test. So we create a function "World" in
### Invite Unittest
The simple way to execute the Unittest is, to create another Module, name it "Test" ore something more interesting and make it a a Gambas Startclass:
The simple way to execute the Unittest is, to create another Module, name it "Test" ore something more interesting and make it a Gambas Startclass:
----

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

After

Width:  |  Height:  |  Size: 94 KiB