Table of Contents

Class XunitDelayEnumeratedTheoryTestCase

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

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

testMethod IXunitTestMethod

The test method this test case belongs to.

testCaseDisplayName string

The display name for the test case.

uniqueID string

The optional unique ID for the test case; if not provided, will be calculated.

explicit bool

Indicates whether the test case was marked as explicit.

skipTestWithoutData bool

Set to true to skip if the test has no data, rather than fail.

skipExceptions Type[]

The value obtained from SkipExceptions.

skipReason string

The value from Skip

skipType Type

The value from SkipType

skipUnless string

The value from SkipUnless

skipWhen string

The value from SkipWhen

traits Dictionary<string, HashSet<string>>

The optional traits list.

sourceFilePath string

The optional source file in where this test case originated.

sourceLineNumber int?

The optional source line number where this test case originated.

timeout int?

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

bool

Methods

CreateTests()

Enumerates the theory data and creates tests to be run.

public override ValueTask<IReadOnlyCollection<IXunitTest>> CreateTests()

Returns

ValueTask<IReadOnlyCollection<IXunitTest>>

Deserialize(IXunitSerializationInfo)

Called when the test case should populate itself with data from the serialization info.

protected override void Deserialize(IXunitSerializationInfo info)

Parameters

info IXunitSerializationInfo

The 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

info IXunitSerializationInfo

The info to store the object data into