Class InlineAutoDataAttribute

Namespace: AutoFixture.Xunit3
Assembly: AutoFixture.Xunit3.dll

Provides a data source for a data theory, with the data coming from inline values combined with auto-generated data specimens generated by AutoFixture.

[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
[CLSCompliant(false)]
public class InlineAutoDataAttribute : DataAttribute

Inheritance

DataAttribute ← InlineAutoDataAttribute

Constructors

InlineAutoDataAttribute(params object[])

Initializes a new instance of the InlineAutoDataAttribute class.

public InlineAutoDataAttribute(params object[] values)

Parameters

values object[]

The data values to pass to the theory.

InlineAutoDataAttribute(Func<IFixture>, params object[])

Initializes a new instance of the InlineAutoDataAttribute class.

protected InlineAutoDataAttribute(Func<IFixture> fixtureFactory, params object[] values)

Parameters

fixtureFactory Func<IFixture>

The fixture factory.

values object[]

The data values to pass to the theory.

Exceptions

ArgumentNullException

Properties

FixtureFactory

Gets the fixture factory.

public Func<IFixture> FixtureFactory { get; }

Property Value

Func<IFixture>

Values

Gets the data values to pass to the theory.

public object[] Values { get; }

Property Value

object[]

Methods

GetData(MethodInfo, DisposalTracker)

public override ValueTask<IReadOnlyCollection<ITheoryDataRow>> GetData(MethodInfo testMethod, DisposalTracker disposalTracker)

Parameters

testMethod MethodInfo

disposalTracker DisposalTracker

Returns

ValueTask<IReadOnlyCollection<ITheoryDataRow>>

SupportsDiscoveryEnumeration()

public override bool SupportsDiscoveryEnumeration()

Returns

bool