Share via


AssertExtensions.That Method

Definition

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.

Applies to