Export (0) Print
Expand All

TestContext.DataRow Property

When overridden in a derived class, gets the current data row when test is used for data driven testing.

Namespace:  Microsoft.VisualStudio.TestTools.UnitTesting
Assembly:  Microsoft.VisualStudio.QualityTools.UnitTestFramework (in Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll)

abstract DataRow : DataRow with get

Property Value

Type: System.Data.DataRow
A DataRow object.

The DataRow property returns values for the current row by column. This will return data identified by column. The column is identified either by name, as in the following example, or by its index location. Using the sample data table shown in following example section, an index identifier of DataRow[0] will return the value for the Name column in Table1.

The following code contains the class and method to test.

No code example is currently available or this language may not be supported.

The following test will pass. It uses the sample.mdb access database that contains Table1 with the following data.

Name

Balance

Amount

Becky

100

25

John

70

60

Larry

75

71.25

Stephanie

159

158

Mr. Bryan Walton

11.99

11.22

No code example is currently available or this language may not be supported.

Show:
© 2014 Microsoft