Table of Contents

Class TestOutput

Namespace
NUnit.Framework.Interfaces
Assembly
nunit.framework.dll

The TestOutput class holds a unit of output from a test to a specific output stream

public class TestOutput
Inheritance
TestOutput
Inherited Members

Constructors

TestOutput(string, string, string?, string?)

Construct with text, output destination type and the name of the test that produced the output.

public TestOutput(string text, string stream, string? testId, string? testName)

Parameters

text string

Text to be output

stream string

Name of the stream or channel to which the text should be written

testId string

Id of the test that produced the output

testName string

FullName of test that produced the output

Properties

Stream

Get the output type

public string Stream { get; }

Property Value

string

TestId

Get the id of the test that created the output

public string? TestId { get; }

Property Value

string

TestName

Get the name of the test that created the output

public string? TestName { get; }

Property Value

string

Text

Get the text

public string Text { get; }

Property Value

string

Methods

ToString()

Return string representation of the object for debugging

public override string ToString()

Returns

string

ToXml()

Convert the TestOutput object to an XML string

public string ToXml()

Returns

string