Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

DataRowAttribute Class

Definition

Namespace:
Microsoft.VisualStudio.TestTools.UnitTesting
Assembly:
Microsoft.VisualStudio.TestPlatform.TestFramework.dll
Assembly:
MSTest.TestFramework.dll
Package:
MSTest.TestFramework v1.1.18
Package:
MSTest.TestFramework v1.2.1
Package:
MSTest.TestFramework v1.3.2
Package:
MSTest.TestFramework v1.4.0
Package:
MSTest.TestFramework v2.0.0
Package:
MSTest.TestFramework v2.1.2
Package:
MSTest.TestFramework v2.2.10
Package:
MSTest.TestFramework v3.0.4
Package:
MSTest.TestFramework v3.1.1
Package:
MSTest.TestFramework v3.10.5
Package:
MSTest.TestFramework v3.11.0
Package:
MSTest.TestFramework v3.2.2
Package:
MSTest.TestFramework v3.3.1
Package:
MSTest.TestFramework v3.4.3
Package:
MSTest.TestFramework v3.5.2
Package:
MSTest.TestFramework v3.6.4
Package:
MSTest.TestFramework v3.7.3
Package:
MSTest.TestFramework v3.8.3
Package:
MSTest.TestFramework v3.9.3
Package:
MSTest.TestFramework v4.0.2
Package:
MSTest.TestFramework v4.1.0
Package:
MSTest.TestFramework v4.2.3
Source:
DataRowAttribute.cs
Source:
DataRowAttribute.cs
Source:
DataRowAttribute.cs
Source:
DataRowAttribute.cs
Source:
DataRowAttribute.cs
Source:
DataRowAttribute.cs
Source:
DataRowAttribute.cs
Source:
DataRowAttribute.cs
Source:
DataRowAttribute.cs
Source:
DataRowAttribute.cs
Source:
DataRowAttribute.cs
Source:
DataRowAttribute.cs
Source:
DataRowAttribute.cs
Source:
DataRowAttribute.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

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

public ref class DataRowAttribute : Attribute, Microsoft::VisualStudio::TestTools::UnitTesting::ITestDataSource
[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true)]
public class DataRowAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true)]
public class DataRowAttribute : Attribute, Microsoft.VisualStudio.TestTools.UnitTesting.ITestDataSource
[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true)]
public class DataRowAttribute : Attribute, Microsoft.VisualStudio.TestTools.UnitTesting.ITestDataSource, Microsoft.VisualStudio.TestTools.UnitTesting.ITestDataSourceIgnoreCapability, Microsoft.VisualStudio.TestTools.UnitTesting.ITestDataSourceUnfoldingCapability
[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true)]
public class DataRowAttribute : Attribute, Microsoft.VisualStudio.TestTools.UnitTesting.ITestDataSource, Microsoft.VisualStudio.TestTools.UnitTesting.ITestDataSourceUnfoldingCapability
[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true, Inherited=false)]
[System.Runtime.CompilerServices.Nullable(0)]
public class DataRowAttribute : Attribute, Microsoft.VisualStudio.TestTools.UnitTesting.ITestDataSource, Microsoft.VisualStudio.TestTools.UnitTesting.ITestDataSourceIgnoreCapability
[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true, Inherited=false)]
public class DataRowAttribute : Attribute, Microsoft.VisualStudio.TestTools.UnitTesting.ITestDataSource, Microsoft.VisualStudio.TestTools.UnitTesting.ITestDataSourceIgnoreCapability
[<System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true)>]
type DataRowAttribute = class
 inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true)>]
type DataRowAttribute = class
 inherit Attribute
 interface ITestDataSource
[<System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true)>]
type DataRowAttribute = class
 inherit Attribute
 interface ITestDataSource
 interface ITestDataSourceUnfoldingCapability
 interface ITestDataSourceIgnoreCapability
[<System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true)>]
type DataRowAttribute = class
 inherit Attribute
 interface ITestDataSource
 interface ITestDataSourceUnfoldingCapability
[<System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true, Inherited=false)>]
[<System.Runtime.CompilerServices.Nullable(0)>]
type DataRowAttribute = class
 inherit Attribute
 interface ITestDataSource
 interface ITestDataSourceIgnoreCapability
[<System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true, Inherited=false)>]
type DataRowAttribute = class
 inherit Attribute
 interface ITestDataSource
 interface ITestDataSourceIgnoreCapability
Public Class DataRowAttribute
Inherits Attribute
Public Class DataRowAttribute
Inherits Attribute
Implements ITestDataSource
Public Class DataRowAttribute
Inherits Attribute
Implements ITestDataSource, ITestDataSourceIgnoreCapability, ITestDataSourceUnfoldingCapability
Public Class DataRowAttribute
Inherits Attribute
Implements ITestDataSource, ITestDataSourceUnfoldingCapability
Public Class DataRowAttribute
Inherits Attribute
Implements ITestDataSource, ITestDataSourceIgnoreCapability
Inheritance
DataRowAttribute
Attributes
Implements

Constructors

Name Description
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

Name Description
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

Name Description
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


Feedback

Was this page helpful?