| 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
)
Public Shared Function Case (
parameterName As String,
criteria As Criteria
) As Case
public:
static Case^ Case(
String^ parameterName,
Criteria^ criteria
)
static member Case :
parameterName : string *
criteria : Criteria -> Case
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:
CaseThe 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