Table of Contents

Class TestMethodMessage

Namespace
Xunit.Runner.Common
Assembly
xunit.v3.runner.common.dll

Default implementation of ITestMethodMessage.

public abstract class TestMethodMessage : TestClassMessage, IJsonDeserializable, ITestMethodMessage, ITestClassMessage, ITestCollectionMessage, ITestAssemblyMessage, IMessageSinkMessage, IJsonSerializable
Inheritance
TestMethodMessage
Implements
Derived
Inherited Members
Extension Methods

Properties

TestMethodUniqueID

Gets the test method's unique ID. Can be used to correlate test messages with the appropriate test method that they're related to. Will be null if the test did not originate from a method.

public required string? TestMethodUniqueID { get; set; }

Property Value

string

Methods

Deserialize(IReadOnlyDictionary<string, object?>)

Override to deserialize the values in the dictionary into the message.

protected override void Deserialize(IReadOnlyDictionary<string, object?> root)

Parameters

root IReadOnlyDictionary<string, object>

The root of the JSON object

Serialize(JsonObjectSerializer)

Override to serialize the values in the message into JSON.

protected override void Serialize(JsonObjectSerializer serializer)

Parameters

serializer JsonObjectSerializer

The serializer to write values to.

ToString()

public override string ToString()

Returns

string