Class TestFixtureData
The TestFixtureData class represents a set of arguments and other parameter info to be used for a parameterized fixture. It is derived from TestFixtureParameters and adds a fluent syntax for use in initializing the fixture.
Inherited Members
Namespace: NUnit.Framework
Assembly: nunit.framework.dll
Syntax
public class TestFixtureData : TestFixtureParameters, IApplyToTest, ITestFixtureData, ITestData
Constructors
View SourceTestFixtureData(object?)
Initializes a new instance of the TestFixtureData class.
Declaration
public TestFixtureData(object? arg)
Parameters
| Type | Name | Description |
|---|---|---|
| object | arg | The argument. |
TestFixtureData(object?, object?)
Initializes a new instance of the TestFixtureData class.
Declaration
public TestFixtureData(object? arg1, object? arg2)
Parameters
| Type | Name | Description |
|---|---|---|
| object | arg1 | The first argument. |
| object | arg2 | The second argument. |
TestFixtureData(object?, object?, object?)
Initializes a new instance of the TestFixtureData class.
Declaration
public TestFixtureData(object? arg1, object? arg2, object? arg3)
Parameters
| Type | Name | Description |
|---|---|---|
| object | arg1 | The first argument. |
| object | arg2 | The second argument. |
| object | arg3 | The third argument. |
TestFixtureData(params object?[]?)
Initializes a new instance of the TestFixtureData class.
Declaration
public TestFixtureData(params object?[]? args)
Parameters
| Type | Name | Description |
|---|---|---|
| object[] | args | The arguments. |
Methods
View SourceExplicit()
Marks the test fixture as explicit.
Declaration
public TestFixtureData Explicit()
Returns
| Type | Description |
|---|---|
| TestFixtureData |
Explicit(string)
Marks the test fixture as explicit, specifying the reason.
Declaration
public TestFixtureData Explicit(string reason)
Parameters
| Type | Name | Description |
|---|---|---|
| string | reason |
Returns
| Type | Description |
|---|---|
| TestFixtureData |
Ignore(string)
Ignores this TestFixture, specifying the reason.
Declaration
public TestFixtureData Ignore(string reason)
Parameters
| Type | Name | Description |
|---|---|---|
| string | reason | The reason. |
Returns
| Type | Description |
|---|---|
| TestFixtureData |
SetArgDisplayNames(params object?[]?)
Sets the list of display names to use as the parameters in the test name. Objects are formatted using the same logic as default test names.
Declaration
public TestFixtureData SetArgDisplayNames(params object?[]? displayNames)
Parameters
| Type | Name | Description |
|---|---|---|
| object[] | displayNames |
Returns
| Type | Description |
|---|---|
| TestFixtureData |
SetArgDisplayNames(params string[]?)
Sets the list of display names to use as the parameters in the test name.
Declaration
public TestFixtureData SetArgDisplayNames(params string[]? displayNames)
Parameters
| Type | Name | Description |
|---|---|---|
| string[] | displayNames |
Returns
| Type | Description |
|---|---|
| TestFixtureData |