Table of Contents

Class TestStarting

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

Default implementation of ITestStarting.

[JsonTypeID("test-starting")]
public sealed class TestStarting : TestMessage, ITestStarting, ITestMessage, ITestCaseMessage, ITestMethodMessage, ITestClassMessage, ITestCollectionMessage, ITestAssemblyMessage, IMessageSinkMessage, IJsonSerializable, ITestMetadata
Inheritance
TestStarting
Implements
Inherited Members

Properties

Explicit

Gets a flag which indicates whether the test is marked as explicit or not.

public required bool Explicit { get; set; }

Property Value

bool

StartTime

Gets the date and time when the test execution began.

public required DateTimeOffset StartTime { get; set; }

Property Value

DateTimeOffset

TestDisplayName

Gets the display name of the test.

public required string TestDisplayName { get; set; }

Property Value

string

Timeout

Gets the timeout for the test, in milliseconds; if 0, there is no timeout.

public required int Timeout { get; set; }

Property Value

int

Traits

Gets the trait values associated with this test case. If there are none, or the framework does not support traits, this should return an empty dictionary (not null).

public required IReadOnlyDictionary<string, IReadOnlyCollection<string>> Traits { get; set; }

Property Value

IReadOnlyDictionary<string, IReadOnlyCollection<string>>

Methods

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

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.

protected override void ValidateObjectState(HashSet<string> invalidProperties)

Parameters

invalidProperties HashSet<string>

The hash set to record invalid properties into