Class XunitDelayEnumeratedTheoryTestCase
Represents a test case which runs multiple tests for theory data, either because theory data pre-enumeration was disabled or because the data was not serializable.
public class XunitDelayEnumeratedTheoryTestCase : XunitTestCase, IXunitSerializable, IAsyncDisposable, IXunitDelayEnumeratedTestCase, IXunitTestCase, ITestCase, ITestCaseMetadata
- Inheritance
-
XunitDelayEnumeratedTheoryTestCase
- Implements
- Inherited Members
Constructors
XunitDelayEnumeratedTheoryTestCase()
Called by the de-serializer; should only be called by deriving classes for de-serialization purposes
[Obsolete("Called by the de-serializer; should only be called by deriving classes for de-serialization purposes")]
public XunitDelayEnumeratedTheoryTestCase()
XunitDelayEnumeratedTheoryTestCase(IXunitTestMethod, string, string, bool, bool, Type[]?, string?, Type?, string?, string?, Dictionary<string, HashSet<string>>?, string?, int?, int?)
Initializes a new instance of the XunitDelayEnumeratedTheoryTestCase class.
public XunitDelayEnumeratedTheoryTestCase(IXunitTestMethod testMethod, string testCaseDisplayName, string uniqueID, bool @explicit, bool skipTestWithoutData, Type[]? skipExceptions = null, string? skipReason = null, Type? skipType = null, string? skipUnless = null, string? skipWhen = null, Dictionary<string, HashSet<string>>? traits = null, string? sourceFilePath = null, int? sourceLineNumber = null, int? timeout = null)
Parameters
testMethodIXunitTestMethodThe test method this test case belongs to.
testCaseDisplayNamestringThe display name for the test case.
uniqueIDstringThe optional unique ID for the test case; if not provided, will be calculated.
explicitboolIndicates whether the test case was marked as explicit.
skipTestWithoutDataboolSet to
trueto skip if the test has no data, rather than fail.skipExceptionsType[]The value obtained from SkipExceptions.
skipReasonstringThe value from Skip
skipTypeTypeThe value from SkipType
skipUnlessstringThe value from SkipUnless
skipWhenstringThe value from SkipWhen
traitsDictionary<string, HashSet<string>>The optional traits list.
sourceFilePathstringThe optional source file in where this test case originated.
sourceLineNumberint?The optional source line number where this test case originated.
timeoutint?The optional timeout for the test case (in milliseconds).
Properties
SkipTestWithoutData
Gets a flag which indicates whether a theory without data is skipped rather than failed.
public bool SkipTestWithoutData { get; }
Property Value
Methods
CreateTests()
Enumerates the theory data and creates tests to be run.
public override ValueTask<IReadOnlyCollection<IXunitTest>> CreateTests()
Returns
Deserialize(IXunitSerializationInfo)
Called when the test case should populate itself with data from the serialization info.
protected override void Deserialize(IXunitSerializationInfo info)
Parameters
infoIXunitSerializationInfoThe info to get the object data from
Serialize(IXunitSerializationInfo)
Called when the test case should store its serialized values into the serialization info.
protected override void Serialize(IXunitSerializationInfo info)
Parameters
infoIXunitSerializationInfoThe info to store the object data into