Verifies that a particular condition holds true.

Namespace:  MbUnit.Framework
Assembly:  MbUnit35 (in MbUnit35.dll) Version: 3.3.0.0 (3.3.610.0)

Syntax

C#
public static void That(
	Expression<Func<bool>> condition
)
Visual Basic (Declaration)
Public Shared Sub That ( _
	condition As Expression(Of Func(Of Boolean)) _
)

Parameters

condition
Type: System.Linq.Expressions..::.Expression<(Of <(Func<(Of <(Boolean>)>)>)>)
The conditional expression to evaluate.

Remarks

If the condition evaluates to false, the assertion failure message will describe in detail the intermediate value of relevant sub-expressions within the condition. Consequently the assertion failure will include more diagnostic information than if IsTrue(Boolean) were used instead.

Exceptions

ExceptionCondition
System..::.ArgumentNullExceptionThrown if condition is null.
Gallio.Framework.Assertions..::.AssertionExceptionThrown if the verification failed unless the current AssertionFailureBehavior indicates otherwise.

See Also