Class ProjectDirectoryDataAttribute
Defines a custom Xunit.Sdk.DataAttribute for loading the DirectoryInfo test-method argument, representing a directory within the test project.
public class ProjectDirectoryDataAttribute : DataAttribute
- Inheritance
-
DataAttributeProjectDirectoryDataAttribute
- Inherited Members
-
DataAttribute.Skip
- Extension Methods
Constructors
ProjectDirectoryDataAttribute(params object[])
Initializes a new instance of the ProjectDirectoryDataAttribute class.
public ProjectDirectoryDataAttribute(params object[] inlineData)
Parameters
inlineData
object[]The inline data of Xunit.InlineDataAttribute conventions.
ProjectDirectoryDataAttribute(string?, ProjectDirectoryOption, params object[])
Initializes a new instance of the ProjectDirectoryDataAttribute class.
public ProjectDirectoryDataAttribute(string? pathSuffix, ProjectDirectoryOption placement, params object[] inlineData)
Parameters
pathSuffix
stringthe directory path to append
placement
ProjectDirectoryOptioninlineData
object[]The inline data of Xunit.InlineDataAttribute conventions.
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.