Table of Contents

Class CombinatorialMemberDataAttribute

Namespace
Xunit
Assembly
Xunit.Combinatorial.dll

Specifies which member should provide data for this parameter used for running the test method.

[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = true)]
public class CombinatorialMemberDataAttribute : Attribute, _Attribute
Inheritance
CombinatorialMemberDataAttribute
Implements
Inherited Members

Constructors

CombinatorialMemberDataAttribute(string, params object?[]?)

Initializes a new instance of the CombinatorialMemberDataAttribute class.

public CombinatorialMemberDataAttribute(string memberName, params object?[]? arguments)

Parameters

memberName string

The name of the public static member on the test class that will provide the test data.

arguments object[]

The arguments for the member (only supported for methods; ignored for everything else).

Properties

Arguments

Gets the arguments passed to the member. Only supported for static methods.

public object?[]? Arguments { get; }

Property Value

object[]

MemberName

Gets the member name.

public string MemberName { get; }

Property Value

string

MemberType

Gets or sets the type to retrieve the member from. If not set, then the property will be retrieved from the unit test class.

public Type? MemberType { get; set; }

Property Value

Type

Methods

GetValues(ParameterInfo)

Gets the values that should be passed to this parameter on the test method.

public object?[] GetValues(ParameterInfo parameterInfo)

Parameters

parameterInfo ParameterInfo

The parameter for which the data should be provided.

Returns

object[]

An array of values.