Class TestCaseDiscovered
- Namespace
- Xunit.Runner.Common
- Assembly
- xunit.v3.runner.common.dll
Default implementation of ITestCaseDiscovered.
[JsonTypeID("test-case-discovered")]
public sealed class TestCaseDiscovered : TestCaseMessage, IJsonDeserializable, ITestCaseDiscovered, ITestCaseMessage, ITestMethodMessage, ITestClassMessage, ITestCollectionMessage, ITestAssemblyMessage, IMessageSinkMessage, IJsonSerializable, ITestCaseMetadata
- Inheritance
-
TestCaseDiscovered
- Implements
- Inherited Members
- Extension Methods
-
Xunit.Sdk.MessageSinkMessageExtensions.DispatchWhen``1(Xunit.Sdk.IMessageSinkMessage,Xunit.Runner.Common.MessageHandler{``0})Xunit.Sdk.MessageSinkMessageExtensions.WithSourceInfo(Xunit.Sdk.ITestCaseDiscovered,System.String,System.Nullable{System.Int32})
Properties
- Explicit
Gets a flag indicating whether this test case was marked as explicit or not.
- Serialization
Gets the serialized value of the test case, which allows it to be transferred across process boundaries.
- SkipReason
Gets the display text for the reason a test is being skipped; if the test is not statically skipped, returns
null. (A test may be dynamically skipped at runtime while still returningnull.)
- SourceFilePath
Gets the source file name. A
nullvalue indicates that the source file name is not known.
- SourceLineNumber
Gets the source file line number. A
nullvalue indicates that the source file line number is not known.
- TestCaseDisplayName
Gets the display name of the test case.
- TestClassMetadataToken
Gets the MetadataToken for the test class. If the test did not originate in a class, will return
null.
- TestClassName
Gets the full name of the class where the test is defined (i.e., FullName). If the test did not originiate in a class, will return
null.
- TestClassNamespace
Gets the namespace of the class where the test is defined. If the test did not originate in a class, or the class it originated in does not reside in a namespace, will return
null.
- TestClassSimpleName
Gets the simple name of the class where the test is defined (the class name without namespace). If the test did not originiate in a class, will return
null.
- TestMethodMetadataToken
Gets the MetadataToken for the test method. If the test did not originate in a method, or the test framework did not provide this information, will return
null.
- TestMethodName
Gets the method name where the test is defined, in the TestClassName class. If the test did not originiate in a method, will return
null.
- TestMethodParameterTypesVSTest
Gets the types for the test method parameters. If the test did not originate in a method, or the test framework does not provide this information, will return
null; if the test method has no parameters, will return an empty array.
- TestMethodReturnTypeVSTest
Gets the test method return type. If the test did not originate in a method, or the test framework did not provide this information, will return
null.
- 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).
Methods
- Deserialize(IReadOnlyDictionary<string, object?>)
Override to deserialize the values in the dictionary into the message.
- Serialize(JsonObjectSerializer)
Override to serialize the values in the message into JSON.