AssertExtensions.That Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Evaluates a boolean condition and throws an AssertFailedException if the condition is false.
public static void That(System.Linq.Expressions.Expression<Func<bool>> condition, string? message = default, string? conditionExpression = default);
static member That : System.Linq.Expressions.Expression<Func<bool>> * string * string -> unit
Public Shared Sub That (condition As Expression(Of Func(Of Boolean)), Optional message As String = Nothing, Optional conditionExpression As String = Nothing)
Parameters
- condition
- Expression<Func<Boolean>>
An expression representing the condition to evaluate. Cannot be null.
- message
- String
An optional message to include in the exception if the assertion fails.
- conditionExpression
- String
The source code of the condition expression. This parameter is automatically populated by the compiler.