<PackageReference Include="NUnit" Version="3.6.1" />

TestCaseSourceAttribute

TestCaseSourceAttribute indicates the source to be used to provide test cases for a test method.
public string Category { get; set; }

Gets or sets the category associated with every fixture created from this attribute. May be a single category or a comma-separated list.

public object[] MethodParams { get; }

A set of parameters passed to the method, works only if the Source Name is a method. If the source name is a field or property has no effect.

public string SourceName { get; }

The name of a the method, property or fiend to be used as a source

public Type SourceType { get; }

A Type to be used as a source

public TestCaseSourceAttribute(string sourceName)

Construct with the name of the method, property or field that will provide data

public TestCaseSourceAttribute(Type sourceType, string sourceName, object[] methodParams)

Construct with a Type and name

public TestCaseSourceAttribute(Type sourceType, string sourceName)

Construct with a Type and name

public TestCaseSourceAttribute(string sourceName, object[] methodParams)

Construct with a name

public TestCaseSourceAttribute(Type sourceType)

Construct with a Type

Construct one or more TestMethods from a given MethodInfo, using available parameter data.