Provides a column of sequential Decimal 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 SequentialNumbersAttribute : GenerationDataAttribute
Visual Basic (Declaration)
Public Class SequentialNumbersAttribute _
	Inherits GenerationDataAttribute

Remarks

The sequence is initialized by setting 3 of the 4 available named properties. The following combinations are possible:

Examples

CopyC#
[TestFixture]
public class MyTestFixture
{
    [Test]
    public void MyTestMethod2([SequentialNumbers(Start = 0, End = 10, Count = 5)] decimal value)
    {
        // This test will run 5 times with the values 0, 2.5, 5, 7.5, and 10.
    }

    [Test]
    public void MyTestMethod1([SequentialNumbers(Start = 1, Step = 1, Count = 4)] int value)
    {
        // This test will run 4 times with the values 1, 2, 3 and 4.
    }

    [Test]
    public void MyTestMethod3([SequentialNumbers(Start = 0, End = 15, Step = 3)] decimal value)
    {
        // This test will run 6 times with the values 0, 3, 6, 9, 12, 15.
    }

    [Test]
    public void MyTestMethod4([SequentialNumbers(Start = 3, End = 8)] int value)
    {
        // This test will run 6 times with the values 3, 4, 5, 6, 7, and 8.
    }
}

Inheritance Hierarchy

See Also