Assert.IsTrue Assert.IsTrue Assert.IsTrue Method

Definition

Overloads

IsTrue(Boolean, String, Object[]) IsTrue(Boolean, String, Object[]) IsTrue(Boolean, String, Object[])

Tests whether the specified condition is true and throws an exception if the condition is false.

IsTrue(Boolean, String) IsTrue(Boolean, String) IsTrue(Boolean, String)

Tests whether the specified condition is true and throws an exception if the condition is false.

IsTrue(Boolean) IsTrue(Boolean) IsTrue(Boolean)

Tests whether the specified condition is true and throws an exception if the condition is false.

IsTrue(Boolean, String, Object[]) IsTrue(Boolean, String, Object[]) IsTrue(Boolean, String, Object[])

Tests whether the specified condition is true and throws an exception if the condition is false.

public static void IsTrue (bool condition, string message, params object[] parameters);
static member IsTrue : bool * string * obj[] -> unit
Public Shared Sub IsTrue (condition As Boolean, message As String, ParamArray parameters As Object())
Parameters
condition
Boolean Boolean Boolean

The condition the test expects to be true.

message
String String String

The message to include in the exception when condition is false. The message is shown in test results.

parameters
Object[]

An array of parameters to use when formatting message.

Exceptions

IsTrue(Boolean, String) IsTrue(Boolean, String) IsTrue(Boolean, String)

Tests whether the specified condition is true and throws an exception if the condition is false.

public static void IsTrue (bool condition, string message);
static member IsTrue : bool * string -> unit
Public Shared Sub IsTrue (condition As Boolean, message As String)
Parameters
condition
Boolean Boolean Boolean

The condition the test expects to be true.

message
String String String

The message to include in the exception when condition is false. The message is shown in test results.

Exceptions

IsTrue(Boolean) IsTrue(Boolean) IsTrue(Boolean)

Tests whether the specified condition is true and throws an exception if the condition is false.

public static void IsTrue (bool condition);
static member IsTrue : bool -> unit
Public Shared Sub IsTrue (condition As Boolean)
Parameters
condition
Boolean Boolean Boolean

The condition the test expects to be true.

Exceptions

Applies to