Düzenle

Aracılığıyla paylaş


Assert.NotNull Method

Definition

Overloads

NotNull(Object, String, Object[])

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

NotNull(Object)

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

NotNull(Object, String)

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

NotNull(Object, String, Object[])

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

public static void NotNull (object anObject, string message, params object[] args);
static member NotNull : 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 null

args
Object[]

Arguments to be used in formatting the message

Applies to

NotNull(Object)

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

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

Parameters

anObject
Object

The object that is to be tested

Applies to

NotNull(Object, String)

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

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

Parameters

anObject
Object

The object that is to be tested

message
String

The message to be displayed when the object is null

Applies to