Click or drag to resize

SmartTestCase Method (String, Criteria)

Creates an instance of Case class for a specific parameter Criteria.

Namespace:  SmartTests
Assembly:  SmartTests (in SmartTests.dll) Version: 1.12.0
Syntax
public static Case Case(
	string parameterName,
	Criteria criteria
)

Parameters

parameterName
Type: SystemString
The name of the parameter for which this Case belongs to.
criteria
Type: SmartTestsCriteria
The Criteria for the created Case.

Return Value

Type: Case
The newly created Case.
Examples
[Test]
public void Max_ValuesGreaterThanMin()
{
    var remainder;
    var result = RunTest( Case( "a", AnyValue.IsValid ) &
                          Case( "b", ValidValue.IsValid ),
                          () => Math.DivRem( 5, 2, out remainder ) );

    Assert.AreEqual( 2, result );
    Assert.AreEqual( 1, remainder );
}
See Also