Provides a data source for a data theory, with the data coming from one of the following sources:
More...
|
bool | DisableDiscoveryEnumeration [get, set] |
| Returns true if the data attribute wants to skip enumerating data during discovery. This will cause the theory to yield a single test case for all data, and the data discovery will be during test execution instead of discovery. More...
|
|
string | MemberName [get] |
| Gets the member name. More...
|
|
Type | MemberType [get, set] |
| Gets or sets the type to retrieve the member from. If not set, then the property will be retrieved from the unit test class. More...
|
|
object [] | Parameters [get] |
| Gets or sets the parameters passed to the member. Only supported for static methods. More...
|
|
virtual string | Skip [get, set] |
| Marks all test cases generated by this data source as skipped. More...
|
|
Provides a data source for a data theory, with the data coming from one of the following sources:
- A static property
- A static field
- A static method (with parameters) The member must return something compatible with IEnumerable<object[]> with the test data. Caution: the property is completely enumerated by .ToList() before any test is run. Hence it should return independent object sets.
◆ MemberDataAttribute()
Xunit.MemberDataAttribute.MemberDataAttribute |
( |
string |
memberName, |
|
|
params object [] |
parameters |
|
) |
| |
|
inline |
Initializes a new instance of the MemberDataAttribute class.
- Parameters
-
memberName | The name of the public static member on the test class that will provide the test data |
parameters | The parameters for the member (only supported for methods; ignored for everything else) |
The documentation for this class was generated from the following file:
- xunit/src/xunit.core/MemberDataAttribute.cs