Assert.IsFalse 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.
Overloads
| IsFalse(Nullable<Boolean>, String, String) |
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. |
| IsFalse(Nullable<Boolean>, String, Object[]) |
Tests whether the specified condition is false and throws an exception if the condition is true. |
| IsFalse(Nullable<Boolean>, Assert+AssertIsFalseInterpolatedStringHandler, String) |
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) |
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(Boolean, Assert+AssertIsFalseInterpolatedStringHandler) |
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(Nullable<Boolean>, Assert+AssertIsFalseInterpolatedStringHandler) |
Tests whether the specified condition is false and throws an exception if the condition is true. |
IsFalse(Nullable<Boolean>, String, String)
- Source:
- Assert.IsTrue.cs
Tests whether the specified condition is false and throws an exception if the condition is true.
public static void IsFalse(bool? condition, string? message = "", string conditionExpression = "");
static member IsFalse : Nullable<bool> * string * string -> unit
Public Shared Sub IsFalse (condition As Nullable(Of Boolean), Optional message As String = "", Optional conditionExpression As String = "")
Parameters
- message
- String
The message to include in the exception when condition
is true. The message is shown in test results.
- conditionExpression
- String
The syntactic expression of condition as given by the compiler via caller argument expression. Users shouldn't pass a value for this parameter.
Exceptions
Thrown if condition is true.
Applies to
IsFalse(Boolean, String, Object[])
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
Tests whether the specified condition is false and throws an exception if the condition is true.
public static void IsFalse(bool condition, string message, params 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, Object[])
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
Tests whether the specified condition is false and throws an exception if the condition is true.
public static void IsFalse(bool? condition, string message, params 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())
Parameters
- 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>, Assert+AssertIsFalseInterpolatedStringHandler, String)
- Source:
- Assert.IsTrue.cs
Tests whether the specified condition is false and throws an exception if the condition is true.
public static void IsFalse(bool? condition, ref Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AssertIsFalseInterpolatedStringHandler message, string conditionExpression = "");
static member IsFalse : Nullable<bool> * AssertIsFalseInterpolatedStringHandler * string -> unit
Public Shared Sub IsFalse (condition As Nullable(Of Boolean), ByRef message As Assert.AssertIsFalseInterpolatedStringHandler, Optional conditionExpression As String = "")
Parameters
The message to include in the exception when condition
is true. The message is shown in test results.
- conditionExpression
- String
The syntactic expression of condition as given by the compiler via caller argument expression. Users shouldn't pass a value for this parameter.
Applies to
IsFalse(Nullable<Boolean>, String)
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
Tests whether the specified condition is false and throws an exception if the condition is true.
public static void IsFalse(bool? condition, 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
- 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)
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
Tests whether the specified condition is false and throws an exception if the condition is true.
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(Boolean, String)
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
Tests whether the specified condition is false and throws an exception if the condition is true.
public static void IsFalse(bool condition, 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(Boolean, Assert+AssertIsFalseInterpolatedStringHandler)
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
Tests whether the specified condition is false and throws an exception if the condition is true.
public static void IsFalse(bool condition, ref Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AssertIsFalseInterpolatedStringHandler message);
static member IsFalse : bool * AssertIsFalseInterpolatedStringHandler -> unit
Public Shared Sub IsFalse (condition As Boolean, ByRef message As Assert.AssertIsFalseInterpolatedStringHandler)
Parameters
- condition
- Boolean
The condition the test expects to be false.
The message to include in the exception when condition
is true. The message is shown in test results.
Applies to
IsFalse(Nullable<Boolean>)
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
Tests whether the specified condition is false and throws an exception if the condition is true.
public static void IsFalse(bool? condition);
static member IsFalse : Nullable<bool> -> unit
Public Shared Sub IsFalse (condition As Nullable(Of Boolean))
Parameters
Exceptions
Thrown if condition is true.
Applies to
IsFalse(Nullable<Boolean>, Assert+AssertIsFalseInterpolatedStringHandler)
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
- Source:
- Assert.IsTrue.cs
Tests whether the specified condition is false and throws an exception if the condition is true.
public static void IsFalse(bool? condition, ref Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AssertIsFalseInterpolatedStringHandler message);
static member IsFalse : Nullable<bool> * AssertIsFalseInterpolatedStringHandler -> unit
Public Shared Sub IsFalse (condition As Nullable(Of Boolean), ByRef message As Assert.AssertIsFalseInterpolatedStringHandler)
Parameters
The message to include in the exception when condition
is true. The message is shown in test results.