Summary
Provide the context information of the current test.
This is an adapter for the internal ExecutionContext
class, hiding the internals from the user test.
- Namespace
- TCLite
- Base Types
-
- object
graph BT
Type-->Base0["object"]
Type["TestContext"]
class Type type-node
Syntax
public class TestContext
Constructors
| Name | Summary |
|---|---|
| TestContext |
Construct a TestContext for an ExecutionContext |
Fields
| Name | Constant Value | Summary |
|---|---|---|
| Parameters |
TestParameters object holds parameters for the test run, if any are specified
static
|
Properties
| Name | Value | Summary |
|---|---|---|
| AssertCount | int |
Gets the number of assertions executed
up to this point in the test.
|
| CurrentContext | TestContext |
Get the current test context. This is created
as needed. The user may save the context for
use within a test, but it should not be used
outside the test for which it is created.
static
|
| CurrentTest | TestContext |
Get a representation of the current test.
static
|
| Out | TextWriter |
Gets a TextWriter that will send output to the current test result.
static
|
| Random | IRandomGenerator |
Gets the random generator.
|
| Result | TestContext |
Gets a Representation of the TestResult for the current test.
|
| Test | TestContext |
Get a representation of the current test.
|
| WorkDirectory | string |
Gets the directory to be used for outputting files created
by this test run.
|
Methods
| Name | Value | Summary |
|---|---|---|
| Write |
void |
Write the string representation of a boolean value to the current result
static
|
| Write |
void |
Write a char to the current result
static
|
| Write |
void |
Write a char array to the current result
static
|
| Write |
void |
Write the string representation of a decimal value to the current result
static
|
| Write |
void |
Write the string representation of a double to the current result
static
|
| Write |
void |
Write the string representation of a Single value to the current result
static
|
| Write |
void |
Write the string representation of an Int32 value to the current result
static
|
| Write |
void |
Write the string representation of an Int64 value to the current result
static
|
| Write |
void |
Write the string representation of an object to the current result
static
|
| Write |
void |
Write a formatted string to the current result
static
|
| Write |
void |
Write a formatted string to the current result
static
|
| Write |
void |
Write a formatted string to the current result
static
|
| Write |
void |
Write a formatted string to the current result
static
|
| Write |
void |
Write a string to the current result
static
|
| Write |
void |
Write the string representation of a UInt32 value to the current result
static
|
| Write |
void |
Write the string representation of a UInt64 value to the current result
static
|
| WriteLine |
void |
Write a line terminator to the current result
static
|
| WriteLine |
void |
Write the string representation of a boolean value to the current result followed by a line terminator
static
|
| WriteLine |
void |
Write a char to the current result followed by a line terminator
static
|
| WriteLine |
void |
Write a char array to the current result followed by a line terminator
static
|
| WriteLine |
void |
Write the string representation of a decimal value to the current result followed by a line terminator
static
|
| WriteLine |
void |
Write the string representation of a double to the current result followed by a line terminator
static
|
| WriteLine |
void |
Write the string representation of a Single value to the current result followed by a line terminator
static
|
| WriteLine |
void |
Write the string representation of an Int32 value to the current result followed by a line terminator
static
|
| WriteLine |
void |
Write the string representation of an Int64 value to the current result followed by a line terminator
static
|
| WriteLine |
void |
Write the string representation of an object to the current result followed by a line terminator
static
|
| WriteLine |
void |
Write a formatted string to the current result followed by a line terminator
static
|
| WriteLine |
void |
Write a formatted string to the current result followed by a line terminator
static
|
| WriteLine |
void |
Write a formatted string to the current result followed by a line terminator
static
|
| WriteLine |
void |
Write a formatted string to the current result followed by a line terminator
static
|
| WriteLine |
void |
Write a string to the current result followed by a line terminator
static
|
| WriteLine |
void |
Write the string representation of a UInt32 value to the current result followed by a line terminator
static
|
| WriteLine |
void |
Write the string representation of a UInt64 value to the current result followed by a line terminator
static
|
