Class TestMessage
The TestMessage class holds a message sent by a test to all listeners
Inherited Members
Namespace: NUnit.Framework.Interfaces
Assembly: nunit.framework.dll
Syntax
public sealed class TestMessage
Constructors
View SourceTestMessage(string, string, string?)
Construct with text, destination type and the name of the test that produced the message.
Declaration
public TestMessage(string destination, string text, string? testId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | destination | Destination of the message |
| string | text | Text to be sent |
| string | testId | ID of the test that produced the message |
Properties
View SourceDestination
The Destination of the message.
Declaration
public string Destination { get; }
Property Value
| Type | Description |
|---|---|
| string |
Message
The message to send to listeners
Declaration
public string Message { get; }
Property Value
| Type | Description |
|---|---|
| string |
TestId
The ID of the test that sent the message
Declaration
public string? TestId { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
View SourceToString()
Converts TestMessage object to string
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |
Overrides
View SourceToXml()
Returns the XML representation of the TestMessage object.
Declaration
public string ToXml()
Returns
| Type | Description |
|---|---|
| string |