Table of Contents

Class TestOutputHelper

Namespace
Xunit.v3
Assembly
xunit.v3.core.dll

Default implementation of ITestOutputHelper.

public class TestOutputHelper : ITestOutputHelper
Inheritance
TestOutputHelper
Implements
Inherited Members

Properties

Output

Gets the output provided by the test.

public string Output { get; }

Property Value

string

Remarks

Note: This also ensures that any partial output that hasn't been reported yet gets reported. Calling in the middle of test execution is therefore not recommend.

Methods

Initialize(IMessageBus, ITest)

Initialize the test output helper with information about a test.

public void Initialize(IMessageBus messageBus, ITest test)

Parameters

messageBus IMessageBus
test ITest

Uninitialize()

Resets the test output helper to its uninitialized state.

public void Uninitialize()

Write(string)

Adds text to the output.

public void Write(string message)

Parameters

message string

The message

Write(string, params object[])

Adds formatted text to the output.

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

Parameters

format string

The message format

args object[]

The format arguments

WriteLine(string)

Adds text to the output, followed by NewLine.

public void WriteLine(string message)

Parameters

message string

The message

WriteLine(string, params object[])

Adds formatted text to the output, followed by NewLine.

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

Parameters

format string

The message format

args object[]

The format arguments