Condividi tramite


Assert.IsFalse Method

Definition

Overloads

IsFalse(Boolean, String, Object[])

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

IsFalse(Nullable<Boolean>, String)

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

IsFalse(Boolean, String)

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

IsFalse(Nullable<Boolean>)

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

IsFalse(Boolean)

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

IsFalse()

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

IsFalse(Boolean, String, Object[])

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

public:
 static void IsFalse(bool condition, System::String ^ message, ... cli::array <System::Object ^> ^ parameters);
public static void IsFalse (bool condition, string message, params object[] parameters);
static member IsFalse : bool * string * obj[] -> unit
Public Shared Sub IsFalse (condition As Boolean, message As String, ParamArray parameters As Object())

Parameters

condition
Boolean

The condition the test expects to be false.

message
String

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

parameters
Object[]

An array of parameters to use when formatting message.

Exceptions

Thrown if condition is true.

Applies to

IsFalse(Nullable<Boolean>, String)

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

public:
 static void IsFalse(Nullable<bool> condition, System::String ^ message);
public static void IsFalse (bool? condition, string message);
static member IsFalse : Nullable<bool> * string -> unit
Public Shared Sub IsFalse (condition As Nullable(Of Boolean), message As String)

Parameters

condition
Nullable<Boolean>

The condition the test expects to be false.

message
String

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

Exceptions

Thrown if condition is true.

Applies to

IsFalse(Boolean, String)

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

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

Parameters

condition
Boolean

The condition the test expects to be false.

message
String

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

Exceptions

Thrown if condition is true.

Applies to

IsFalse(Nullable<Boolean>)

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

public:
 static void IsFalse(Nullable<bool> condition);
public static void IsFalse (bool? condition);
static member IsFalse : Nullable<bool> -> unit
Public Shared Sub IsFalse (condition As Nullable(Of Boolean))

Parameters

condition
Nullable<Boolean>

The condition the test expects to be false.

Exceptions

Thrown if condition is true.

Applies to

IsFalse(Boolean)

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

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

Parameters

condition
Boolean

The condition the test expects to be false.

Exceptions

Thrown if condition is true.

Applies to

IsFalse()

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

public:
 static void IsFalse(Nullable<bool> condition, System::String ^ message, ... cli::array <System::Object ^> ^ parameters);
public static void IsFalse (bool? condition, string message, params object[] parameters);
static member IsFalse : Nullable<bool> * string * obj[] -> unit
Public Shared Sub IsFalse (condition As Nullable(Of Boolean), message As String, ParamArray parameters As Object())

Exceptions

Thrown if condition is true.

Applies to