Provides a column of literal values as a data source.

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

Syntax

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

Remarks

This attribute is a compact equivalent to providing a sequence of values using RowAttribute with 1 element in each. It is particularly useful for specifying combinatorial tests.

By default, the column provided by the column data source is unnamed. Use HeaderAttribute to provide an explicit name for the column.

Examples

[Test] public void MyTest([Column(1, 2, 3)] int x, [Column("a", "b")] string y, [Column(0.1, 0.2)] double z) { // This test will run 3 * 2 * 2 = 12 times with all combinations of // the values specified in the column for each parameter. This test // is combinatorial because the values are assigned to each parameter // separately. }

Inheritance Hierarchy

See Also