Class TestFailed
- Namespace
- Xunit.v3
- Assembly
- xunit.v3.core.dll
Default implementation of ITestFailed.
[JsonTypeID("test-failed")]
public sealed class TestFailed : TestResultMessage, ITestFailed, ITestResultMessage, ITestMessage, ITestCaseMessage, ITestMethodMessage, ITestClassMessage, ITestCollectionMessage, ITestAssemblyMessage, IMessageSinkMessage, IJsonSerializable, IExecutionMetadata, IErrorMetadata
- Inheritance
-
TestFailed
- Implements
- Inherited Members
Properties
- Cause
Gets the cause of the test failure.
- ExceptionParentIndices
Gets the parent exception index(es) for the exception(s); a -1 indicates that the exception in question has no parent.
- ExceptionTypes
Gets the fully-qualified type name(s) of the exception(s).
- Messages
Gets the message(s) of the exception(s).
- StackTraces
Gets the stack trace(s) of the exception(s).
Methods
- FromException(Exception, string, string, string?, string?, string, string, decimal, string?, string[]?, DateTimeOffset?)
Creates a new ITestFailed constructed from an Exception object.
- Serialize(JsonObjectSerializer)
Override to serialize the values in the message into JSON.
- 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.