DataRowAttribute Class

Definition

Attribute to define in-line data for a test method.

C++
public ref class DataRowAttribute : Attribute, Microsoft::VisualStudio::TestTools::UnitTesting::ITestDataSource
Inheritance
DataRowAttribute
Attributes
Implements

Constructors

DataRowAttribute()

Initializes a new instance of the DataRowAttribute class.

DataRowAttribute(Object, Object[])

Initializes a new instance of the DataRowAttribute class which takes in an array of arguments.

DataRowAttribute(Object)

Initializes a new instance of the DataRowAttribute class with an array of object arguments.

DataRowAttribute(Object[])

Initializes a new instance of the DataRowAttribute class with an array of object arguments.

DataRowAttribute(String[])

Initializes a new instance of the DataRowAttribute class with an array of string arguments.

Properties

Data

Gets data for calling test method.

DisplayName

Gets or sets display name in test results for customization.

IgnoreMessage

Gets or sets a reason to ignore the specific test case. Setting the property to non-null value will ignore the test case.

TestIdGenerationStrategy

Gets the test id generation strategy.

UnfoldingStrategy

Gets the strategy for unfolding parameterized tests.

Methods

GetData(MethodInfo)

Gets the test data from custom test data source.

GetDisplayName(MethodInfo, Object[])

Gets the display name corresponding to test data row for displaying in TestResults.

Applies to

Proizvod Verzije
MSTest.TestFramework 1.1.18, 1.2.1, 1.3.2, 1.4.0, 2.2.0, 2.1.2, 2.2.10, 3.0.4, 3.1.1, 3.2.2, 3.3.1, 3.4.3, 3.5.1, 3.6.4, 3.7.3, 3.8.0