DynamicDataAttribute Class

Definition

Attribute to define dynamic data for a test method.

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

Constructors

DynamicDataAttribute(String, Type)

Initializes a new instance of the DynamicDataAttribute class when the test data is present in a class different from test method's class.

DynamicDataAttribute(String)

Initializes a new instance of the DynamicDataAttribute class.

Properties

DynamicDataDisplayName

Gets or sets the name of method used to customize the display name in test results.

DynamicDataDisplayNameDeclaringType

Gets or sets the declaring type used to customize the display name in test results.

IgnoreMessage

Gets or sets a reason to ignore this dynamic data source. Setting the property to non-null value will ignore the dynamic data source.

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

Produkt Versionen
MSTest.TestFramework 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