Class TestOutput
The TestOutput class holds a unit of output from a test to a specific output stream
Inherited Members
Namespace: NUnit.Framework.Interfaces
Assembly: nunit.framework.dll
Syntax
public class TestOutput
Constructors
View SourceTestOutput(string, string, string?, string?)
Construct with text, output destination type and the name of the test that produced the output.
Declaration
public TestOutput(string text, string stream, string? testId, string? testName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | text | Text to be output |
| string | stream | Name of the stream or channel to which the text should be written |
| string | testId | Id of the test that produced the output |
| string | testName | FullName of test that produced the output |
Properties
View SourceStream
Get the output type
Declaration
public string Stream { get; }
Property Value
| Type | Description |
|---|---|
| string |
TestId
Get the id of the test that created the output
Declaration
public string? TestId { get; }
Property Value
| Type | Description |
|---|---|
| string |
TestName
Get the name of the test that created the output
Declaration
public string? TestName { get; }
Property Value
| Type | Description |
|---|---|
| string |
Text
Get the text
Declaration
public string Text { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
View SourceToString()
Return string representation of the object for debugging
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |
Overrides
View SourceToXml()
Convert the TestOutput object to an XML string
Declaration
public string ToXml()
Returns
| Type | Description |
|---|---|
| string |