Class CombinatorialDataAttribute
- Namespace
- Xunit
- Assembly
- Xunit.Combinatorial.dll
Provides a test method decorated with a Xunit.TheoryAttribute with arguments to run every possible combination of values for the parameters taken by the test method.
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true, Inherited = true)]
public class CombinatorialDataAttribute : DataAttribute, _Attribute, IDataAttribute
- Inheritance
-
DataAttributeCombinatorialDataAttribute
- Implements
-
IDataAttribute
- Inherited Members
-
DataAttribute.ExplicitDataAttribute.ExplicitAsNullableDataAttribute.SkipDataAttribute.TestDisplayNameDataAttribute.TimeoutDataAttribute.TimeoutAsNullableDataAttribute.Traits
Constructors
CombinatorialDataAttribute()
Initializes a new instance of the CombinatorialDataAttribute class.
public CombinatorialDataAttribute()
Methods
GetData(MethodInfo, DisposalTracker)
Returns the data to be used to test the theory.
public override ValueTask<IReadOnlyCollection<ITheoryDataRow>> GetData(MethodInfo testMethod, DisposalTracker disposalTracker)
Parameters
testMethod
MethodInfoThe test method the data attribute is attached to
disposalTracker
DisposalTrackerThe disposal tracker used to dispose the data
Returns
- ValueTask<IReadOnlyCollection<ITheoryDataRow>>
SupportsDiscoveryEnumeration()
Returns true
if the data attribute supports enumeration during
discovery; false
otherwise. Data attributes with expensive computational
costs and/or randomized data sets should return false
.
public override bool SupportsDiscoveryEnumeration()