Verifies that a particular condition holds true.
Namespace:
MbUnit.FrameworkAssembly: 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
| Exception | Condition |
|---|---|
| System..::.ArgumentNullException | Thrown if condition is null. |
| Gallio.Framework.Assertions..::.AssertionException | Thrown if the verification failed unless the current AssertionFailureBehavior indicates otherwise. |
