Table of Contents

Class TestClassStarting

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

Default implementation of ITestClassStarting.

[JsonTypeID("test-class-starting")]
public sealed class TestClassStarting : TestClassMessage, ITestClassStarting, ITestClassMessage, ITestCollectionMessage, ITestAssemblyMessage, IMessageSinkMessage, IJsonSerializable, ITestClassMetadata
Inheritance
TestClassStarting
Implements
Inherited Members

Properties

TestClassName

Gets the full name of the test class (i.e., FullName).

public required string TestClassName { get; set; }

Property Value

string

TestClassNamespace

Gets the namespace of the class where the test is defined. Will return null for classes not residing in a namespace.

public required string? TestClassNamespace { get; set; }

Property Value

string

TestClassSimpleName

Gets the simple name of the test class (the class name without namespace).

public required string TestClassSimpleName { get; set; }

Property Value

string

Traits

Gets the trait values associated with this test class (and the test collection, and test assembly). If there are none, or the framework does not support traits, this returns 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