Class ProjectFileDataAttribute
File-based data source for a data theory.
public class ProjectFileDataAttribute : DataAttribute
- Inheritance
-
DataAttributeProjectFileDataAttribute
- Inherited Members
-
DataAttribute.Skip
- Extension Methods
Constructors
ProjectFileDataAttribute(Type, object[], params string[])
Initializes a new instance of the ProjectFileDataAttribute class.
public ProjectFileDataAttribute(Type typeInAssembly, object[] inlineData, params string[] relativePaths)
Parameters
typeInAssembly
TypeThe type in assembly.
inlineData
object[]The inline data.
relativePaths
string[]The relative paths.
Remarks
The order of elements in inlineData
must have the order of args.
So new object[] { 1, "two" }
must have int one, string two,
.
ProjectFileDataAttribute(Type, params string[])
Initializes a new instance of the ProjectFileDataAttribute class.
public ProjectFileDataAttribute(Type typeInAssembly, params string[] relativePaths)
Parameters
Methods
GetData(MethodInfo)
Returns the data to be used to test the theory.
public override IEnumerable<object[]> GetData(MethodInfo testMethod)
Parameters
testMethod
MethodInfoThe method that is being tested
Returns
- IEnumerable<object[]>
One or more sets of theory data. Each invocation of the test method is represented by a single object array.