Modifier

Partager via


Assert.That Method

Definition

Overloads

That(Object, IResolveConstraint, String, Object[])

Apply a constraint to an actual value, succeeding if the constraint is satisfied and throwing an assertion exception on failure.

That(Boolean, String, Object[])

Asserts that a condition is true. If the condition is false the method throws an AssertionException.

That(Object, IResolveConstraint)

Apply a constraint to an actual value, succeeding if the constraint is satisfied and throwing an assertion exception on failure.

That(Object, IResolveConstraint, String)

Apply a constraint to an actual value, succeeding if the constraint is satisfied and throwing an assertion exception on failure.

That(TestDelegate, IResolveConstraint)
That(Boolean)

Asserts that a condition is true. If the condition is false the method throws an AssertionException.

That(Boolean, String)

Asserts that a condition is true. If the condition is false the method throws an AssertionException.

That<T>(ActualValueDelegate<T>, IResolveConstraint)
That<T>(T, IResolveConstraint)
That<T>(ActualValueDelegate<T>, IResolveConstraint, String)
That<T>(T, IResolveConstraint, String)
That<T>(ActualValueDelegate<T>, IResolveConstraint, String, Object[])
That<T>(T, IResolveConstraint, String, Object[])

That(Object, IResolveConstraint, String, Object[])

Apply a constraint to an actual value, succeeding if the constraint is satisfied and throwing an assertion exception on failure.

public static void That (object actual, NUnit.Framework.Constraints.IResolveConstraint expression, string message, params object[] args);
static member That : obj * NUnit.Framework.Constraints.IResolveConstraint * string * obj[] -> unit

Parameters

actual
Object

The actual value to test

expression
IResolveConstraint

A Constraint to be applied

message
String

The message that will be displayed on failure

args
Object[]

Arguments to be used in formatting the message

Applies to

That(Boolean, String, Object[])

Asserts that a condition is true. If the condition is false the method throws an AssertionException.

public static void That (bool condition, string message, params object[] args);
static member That : bool * string * obj[] -> unit

Parameters

condition
Boolean

The evaluated condition

message
String

The message to display if the condition is false

args
Object[]

Arguments to be used in formatting the message

Applies to

That(Object, IResolveConstraint)

Apply a constraint to an actual value, succeeding if the constraint is satisfied and throwing an assertion exception on failure.

public static void That (object actual, NUnit.Framework.Constraints.IResolveConstraint expression);
static member That : obj * NUnit.Framework.Constraints.IResolveConstraint -> unit

Parameters

actual
Object

The actual value to test

expression
IResolveConstraint

A Constraint to be applied

Applies to

That(Object, IResolveConstraint, String)

Apply a constraint to an actual value, succeeding if the constraint is satisfied and throwing an assertion exception on failure.

public static void That (object actual, NUnit.Framework.Constraints.IResolveConstraint expression, string message);
static member That : obj * NUnit.Framework.Constraints.IResolveConstraint * string -> unit

Parameters

actual
Object

The actual value to test

expression
IResolveConstraint

A Constraint to be applied

message
String

The message that will be displayed on failure

Applies to

That(TestDelegate, IResolveConstraint)

public static void That (NUnit.Framework.TestDelegate code, NUnit.Framework.Constraints.IResolveConstraint constraint);
static member That : NUnit.Framework.TestDelegate * NUnit.Framework.Constraints.IResolveConstraint -> unit

Parameters

constraint
IResolveConstraint

Applies to

That(Boolean)

Asserts that a condition is true. If the condition is false the method throws an AssertionException.

public static void That (bool condition);
static member That : bool -> unit

Parameters

condition
Boolean

The evaluated condition

Applies to

That(Boolean, String)

Asserts that a condition is true. If the condition is false the method throws an AssertionException.

public static void That (bool condition, string message);
static member That : bool * string -> unit

Parameters

condition
Boolean

The evaluated condition

message
String

The message to display if the condition is false

Applies to

That<T>(ActualValueDelegate<T>, IResolveConstraint)

public static void That<T> (NUnit.Framework.Constraints.ActualValueDelegate<T> del, NUnit.Framework.Constraints.IResolveConstraint expr);
static member That : NUnit.Framework.Constraints.ActualValueDelegate<'T> * NUnit.Framework.Constraints.IResolveConstraint -> unit

Type Parameters

T

Parameters

Applies to

That<T>(T, IResolveConstraint)

public static void That<T> (ref T actual, NUnit.Framework.Constraints.IResolveConstraint expression);
static member That :  * NUnit.Framework.Constraints.IResolveConstraint -> unit

Type Parameters

T

Parameters

actual
T
expression
IResolveConstraint

Applies to

That<T>(ActualValueDelegate<T>, IResolveConstraint, String)

public static void That<T> (NUnit.Framework.Constraints.ActualValueDelegate<T> del, NUnit.Framework.Constraints.IResolveConstraint expr, string message);
static member That : NUnit.Framework.Constraints.ActualValueDelegate<'T> * NUnit.Framework.Constraints.IResolveConstraint * string -> unit

Type Parameters

T

Parameters

message
String

Applies to

That<T>(T, IResolveConstraint, String)

public static void That<T> (ref T actual, NUnit.Framework.Constraints.IResolveConstraint expression, string message);
static member That :  * NUnit.Framework.Constraints.IResolveConstraint * string -> unit

Type Parameters

T

Parameters

actual
T
expression
IResolveConstraint
message
String

Applies to

That<T>(ActualValueDelegate<T>, IResolveConstraint, String, Object[])

public static void That<T> (NUnit.Framework.Constraints.ActualValueDelegate<T> del, NUnit.Framework.Constraints.IResolveConstraint expr, string message, params object[] args);
static member That : NUnit.Framework.Constraints.ActualValueDelegate<'T> * NUnit.Framework.Constraints.IResolveConstraint * string * obj[] -> unit

Type Parameters

T

Parameters

message
String
args
Object[]

Applies to

That<T>(T, IResolveConstraint, String, Object[])

public static void That<T> (ref T actual, NUnit.Framework.Constraints.IResolveConstraint expression, string message, params object[] args);
static member That :  * NUnit.Framework.Constraints.IResolveConstraint * string * obj[] -> unit

Type Parameters

T

Parameters

actual
T
expression
IResolveConstraint
message
String
args
Object[]

Applies to