Table of Contents

Class TestMessage

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

Default implementation of ITestMessage.

public abstract class TestMessage : TestCaseMessage, ITestMessage, ITestCaseMessage, ITestMethodMessage, ITestClassMessage, ITestCollectionMessage, ITestAssemblyMessage, IMessageSinkMessage, IJsonSerializable
Inheritance
TestMessage
Implements
Derived
Inherited Members
MessageSinkMessage.ToDisplayString<T>(T[])

Properties

TestUniqueID

Gets the test's unique ID. Can be used to correlate test messages with the appropriate test that they're related to.

Methods

Serialize(JsonObjectSerializer)

Override to serialize the values in the message into JSON.

ToString()
ValidateObjectState(HashSet<string>)

Called before serializing the message. Implementers are expected to call ValidatePropertyIsNotNull(object?, string, HashSet<string>) for each property that must have a value, to record invalid property values into the provided hash set.