Provides a row of literal values as a data source.

Namespace:  MbUnit.Framework
Assembly:  MbUnit (in MbUnit.dll) Version: 3.2.0.0 (3.2.528.0)

Syntax

C#
public class RowAttribute : DataAttribute
Visual Basic (Declaration)
Public Class RowAttribute _
	Inherits DataAttribute

Remarks

The values specified in the row are used for data-driven testing purposes. A row may specify zero or more values that are manipulated as a unit. Typically each row generates a single instance instance of a data-driven test.

By default, the columns provided by the row data source are unnamed. Use HeaderAttribute to provide an explicit name for each column.

Examples

CopyC#
[Test]
[Row(1, "a", 0.1)]
[Row(2, "b", 0.2)]
public void MyTest(int x, string y, double z)
{
    // This test will run twice.  Once with x = 1, y = "a", and z = 0.1
    // then again with x = 2, y = "b", and z = 0.2.
}

Inheritance Hierarchy

See Also