Class ClassDataAttribute
Provides a data source for a data theory, with the data coming from a class which must implement IEnumerable<object[]>. Caution: the property is completely enumerated by .ToList() before any test is run. Hence it should return independent object sets.
Inherited Members
Namespace: Xunit
Assembly: xunit.core.dll
Syntax
public class ClassDataAttribute : DataAttribute
Constructors
| Improve this Doc View SourceClassDataAttribute(Type)
Initializes a new instance of the ClassDataAttribute class.
Declaration
public ClassDataAttribute(Type class)
Parameters
Type | Name | Description |
---|---|---|
Type | class | The class that provides the data. |
Properties
| Improve this Doc View SourceClass
Gets the type of the class that provides the data.
Declaration
public Type Class { get; }
Property Value
Type | Description |
---|---|
Type |
Methods
| Improve this Doc View SourceGetData(MethodInfo)
Declaration
public override IEnumerable<object[]> GetData(MethodInfo testMethod)
Parameters
Type | Name | Description |
---|---|---|
MethodInfo | testMethod |
Returns
Type | Description |
---|---|
IEnumerable<Object[]> |