User:Rodasmith/wUnit/TestSuite
< User:Rodasmith | wUnit
Usage
[edit]The TestSuite class takes a variable number of assertions as parameters. It reports the total number of assertions, the number of assertions passed, and the number of assertions failed.
Invoke it as follows:
==Unit tests for {{temp|foo}}==
{{User:Rodasmith/wUnit/TestSuite |
{{User:Rodasmith/wUnit/Assert.AreEqual| 1 | {{foo|bar|1}} }}
{{User:Rodasmith/wUnit/Assert.IsEmpty| {{foo|||}} }}
}}
The results of the above test follow:
Unit tests for
{{foo}}
- Total number of tests: 2
- Tests passed: 0
- Tests failed: 2
Details
- Assertion failed. Expected: {{{expected}}}. Actual: {{{actual}}}
- User:Rodasmith/wUnit/Assert.IsEmpty