Assert.Null Method

Definition

Overloads

Null(Object)

Verifies that the object that is passed in is equal to null If the object is not null null then an AssertionException is thrown.

Null(Object, String)

Verifies that the object that is passed in is equal to null If the object is not null then an AssertionException is thrown.

Null(Object, String, Object[])

Verifies that the object that is passed in is equal to null If the object is not null then an AssertionException is thrown.

Null(Object)

Verifies that the object that is passed in is equal to null If the object is not null null then an AssertionException is thrown.

public static void Null (object anObject);
static member Null : obj -> unit

Parameters

anObject
Object

The object that is to be tested

Applies to

Null(Object, String)

Verifies that the object that is passed in is equal to null If the object is not null then an AssertionException is thrown.

public static void Null (object anObject, string message);
static member Null : obj * string -> unit

Parameters

anObject
Object

The object that is to be tested

message
String

The message to be displayed when the object is not null

Applies to

Null(Object, String, Object[])

Verifies that the object that is passed in is equal to null If the object is not null then an AssertionException is thrown.

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

Parameters

anObject
Object

The object that is to be tested

message
String

The message to be displayed when the object is not null

args
Object[]

Arguments to be used in formatting the message

Applies to