TestDataRow<T> Class

Definition

When this type is returned from GetData(MethodInfo) (for example, through DynamicDataAttribute), it determines information related to the specific test case.

[System.Runtime.Serialization.DataContract]
public sealed class TestDataRow<T>
[System.Runtime.Serialization.DataContract]
[System.Runtime.CompilerServices.Nullable(0)]
public sealed class TestDataRow<T>
[<System.Runtime.Serialization.DataContract>]
type TestDataRow<'T> = class
[<System.Runtime.Serialization.DataContract>]
[<System.Runtime.CompilerServices.Nullable(0)>]
type TestDataRow<'T> = class
Public NotInheritable Class TestDataRow(Of T)

Type Parameters

T

The type parameter corresponding to the type of the value held by this type. It can be a tuple for test methods with more than one parameter.

Inheritance
TestDataRow<T>
Attributes

Remarks

To use this type from a custom ITestDataSource, wrap each instance in a single-element Object array, for example new object[] { new TestDataRow<int>(42) { DisplayName = "my row" } }. MSTest unwraps the Value to obtain the test method arguments and applies the DisplayName, IgnoreMessage, and TestCategories metadata to the generated test case.

Constructors

Name Description
TestDataRow<T>(T)

Initializes a new instance of the TestDataRow<T> class.

Properties

Name Description
DisplayName

Gets or sets the display name for the test case.

IgnoreMessage

Gets or sets the ignore message. A non-null value means the test case is ignored with the message provided.

TestCategories

Gets or sets the test categories for the test case.

Value

Gets the value held by this instance.

Applies to