| SmartTestRunTest Method (Criteria, ExpressionAction, Assertion) |
Executes the Act part of the test and its related Smart Assertions.
Namespace:
SmartTests
Assembly:
SmartTests (in SmartTests.dll) Version: 1.12.0
Syntax public static void RunTest(
Criteria cases,
Expression<Action> act,
params Assertion[] assertions
)
Public Shared Sub RunTest (
cases As Criteria,
act As Expression(Of Action),
ParamArray assertions As Assertion()
)
public:
static void RunTest(
Criteria^ cases,
Expression<Action^>^ act,
... array<Assertion^>^ assertions
)
static member RunTest :
cases : Criteria *
act : Expression<Action> *
assertions : Assertion[] -> unit
Parameters
- cases
- Type: SmartTestsCriteria
The Criteria expression for the tested code. - act
- Type: System.Linq.ExpressionsExpressionAction
An Action representing the tested code. - assertions
- Type: SmartTestsAssertion
The Smart Assertions for this act.
Exceptions Remarks Examples [Test]
public void ReturnVoidTest()
{
var mc = new MyClass( 10 );
RunTest( MinIncluded.IsAboveMin,
() => mc.SetValue( 2 ) );
Assert.AreEqual( 2, mc.Value );
}
See Also