<PackageReference Include="NUnit" Version="3.0.0-rc-2" />

TestContext

public class TestContext
Provide the context information of the current test. This is an adapter for the internal ExecutionContext class, hiding the internals from the user test.
public class ResultAdapter

ResultAdapter adapts a TestResult for consumption by the user test code.

public class TestAdapter

TestAdapter adapts a Test for consumption by the user test code.

public static TestContext CurrentContext { get; }

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.

public static TextWriter Out { get; }

Gets a TextWriter that will send output to the current test result.

public Randomizer Random { get; }

Gets the random generator.

public ResultAdapter Result { get; }

Gets a Representation of the TestResult for the current test.

public TestAdapter Test { get; }

Get a representation of the current test.

public string TestDirectory { get; }

Gets the directory containing the current test assembly.

public string WorkDirectory { get; }

Gets the directory to be used for outputting files created by this test run.

public TestContext(TestExecutionContext testExecutionContext)

Construct a TestContext for an ExecutionContext

public static void Write(bool value)

Write the string representation of a boolean value to the current result

public static void Write(char value)

Write a char to the current result

public static void Write(char[] value)

Write a char array to the current result

public static void Write(double value)

Write the string representation of a double to the current result

public static void Write(int value)

Write the string representation of an Int32 value to the current result

public static void Write(long value)

Write the string representation of an Int64 value to the current result

public static void Write(decimal value)

Write the string representation of a decimal value to the current result

public static void Write(object value)

Write the string representation of an object to the current result

public static void Write(float value)

Write the string representation of a Single value to the current result

public static void Write(string value)

Write a string to the current result

public static void Write(uint value)

Write the string representation of a UInt32 value to the current result

public static void Write(ulong value)

Write the string representation of a UInt64 value to the current result

public static void Write(string format, object arg1)

Write a formatted string to the current result

public static void Write(string format, object arg1, object arg2)

Write a formatted string to the current result

public static void Write(string format, object arg1, object arg2, object arg3)

Write a formatted string to the current result

public static void Write(string format, object[] args)

Write a formatted string to the current result

public static void WriteLine()

Write a line terminator to the current result

public static void WriteLine(bool value)

Write the string representation of a boolean value to the current result followed by a line terminator

public static void WriteLine(char value)

Write a char to the current result followed by a line terminator

public static void WriteLine(char[] value)

Write a char array to the current result followed by a line terminator

public static void WriteLine(double value)

Write the string representation of a double to the current result followed by a line terminator

public static void WriteLine(int value)

Write the string representation of an Int32 value to the current result followed by a line terminator

public static void WriteLine(long value)

Write the string representation of an Int64 value to the current result followed by a line terminator

public static void WriteLine(decimal value)

Write the string representation of a decimal value to the current result followed by a line terminator

public static void WriteLine(object value)

Write the string representation of an object to the current result followed by a line terminator

public static void WriteLine(float value)

Write the string representation of a Single value to the current result followed by a line terminator

public static void WriteLine(string value)

Write a string to the current result followed by a line terminator

public static void WriteLine(uint value)

Write the string representation of a UInt32 value to the current result followed by a line terminator

public static void WriteLine(ulong value)

Write the string representation of a UInt64 value to the current result followed by a line terminator

public static void WriteLine(string format, object arg1)

Write a formatted string to the current result followed by a line terminator

public static void WriteLine(string format, object arg1, object arg2)

Write a formatted string to the current result followed by a line terminator

public static void WriteLine(string format, object arg1, object arg2, object arg3)

Write a formatted string to the current result followed by a line terminator

public static void WriteLine(string format, object[] args)

Write a formatted string to the current result followed by a line terminator