Class for unit testing
More...
|
| | Tester (string name, bool formatted=true) |
| | Creates new tester More...
|
| |
| bool | Test (TestFunction tf, LogAmount logAmount=LogAmount.Default, [CallerArgumentExpression(nameof(tf))] string caller="") |
| | Executes the given test More...
|
| |
| IEnumerator< Assertion > | GetEnumerator () |
| | Enumerates all the assertions More...
|
| |
|
| static Tester | Test< T > (LogAmount logAmount=LogAmount.Default, TextWriter? @out=null, bool formatted=true) |
| | Executes all the tests in the type More...
|
| |
| static Tester | Test (Type test, LogAmount logAmount=LogAmount.Default, TextWriter? @out=null, bool formatted=true) |
| | Executes all the tests in the type More...
|
| |
| static Tester[] | TestAll (LogAmount logAmount=LogAmount.Default, TextWriter? @out=null, bool formatted=true) |
| | Executes all the tests in all the types with the UnitTestAttribute More...
|
| |
|
|
TextWriter | Out = Console.Out [get, set] |
| | The output for the results, stdout by default
|
| |
|
string | Name [get] |
| | Name of the test group
|
| |
|
bool | Formatted = true [get] |
| | Determines whether the output should be formatted
|
| |
|
bool | Success = true [get] |
| | True if all tests passed
|
| |
◆ Tester()
| Tester.Tester |
( |
string |
name, |
|
|
bool |
formatted = true |
|
) |
| |
Creates new tester
- Parameters
-
| name | name of the test group |
| formatted | true if the output should be formatted, otherwise false |
◆ GetEnumerator()
| IEnumerator< Assertion > Tester.GetEnumerator |
( |
| ) |
|
Enumerates all the assertions
- Returns
- Assertion enumerator
◆ Test() [1/2]
| bool Tester.Test |
( |
TestFunction |
tf, |
|
|
LogAmount |
logAmount = LogAmount.Default, |
|
|
[CallerArgumentExpression(nameof(tf))] string |
caller = "" |
|
) |
| |
Executes the given test
- Parameters
-
| tf | Test to execute |
| logAmount | How much to log |
| caller | Name of the test, this is set automatically |
- Returns
- True if all the assertions in the test passed
◆ Test() [2/2]
| static Tester Tester.Test |
( |
Type |
test, |
|
|
LogAmount |
logAmount = LogAmount.Default, |
|
|
TextWriter? @ |
out = null, |
|
|
bool |
formatted = true |
|
) |
| |
|
static |
Executes all the tests in the type
- Parameters
-
| test | Type with the tests |
| logAmount | How much to log |
| out | Test results output, null is stdout |
| formatted | True if the output should be formatted, otherwise false |
- Returns
◆ Test< T >()
| static Tester Tester.Test< T > |
( |
LogAmount |
logAmount = LogAmount.Default, |
|
|
TextWriter? @ |
out = null, |
|
|
bool |
formatted = true |
|
) |
| |
|
static |
Executes all the tests in the type
- Template Parameters
-
- Parameters
-
| logAmount | How much to log |
| out | Test results output, null is stdout |
| formatted | True if the output should be formatted, otherwise false |
- Returns
- Test with the summary
◆ TestAll()
| static Tester[] Tester.TestAll |
( |
LogAmount |
logAmount = LogAmount.Default, |
|
|
TextWriter? @ |
out = null, |
|
|
bool |
formatted = true |
|
) |
| |
|
static |
Executes all the tests in all the types with the UnitTestAttribute
- Parameters
-
| logAmount | How much to log |
| out | Test results output, null is stdout |
| formatted | True if the output should be formatted |
- Returns
- Array of all the test results
The documentation for this class was generated from the following file: