Compartilhar via


Assert.NotNull Método

Definição

Sobrecargas

NotNull(Object, String, Object[])

Verifica se o objeto que é passado não é igual a null Se o objeto for, um AssertionException será null gerado.

NotNull(Object)

Verifica se o objeto que é passado não é igual a null Se o objeto for, um AssertionException será null gerado.

NotNull(Object, String)

Verifica se o objeto que é passado não é igual a null Se o objeto for, um AssertionException será null gerado.

NotNull(Object, String, Object[])

Verifica se o objeto que é passado não é igual a null Se o objeto for, um AssertionException será null gerado.

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

Parâmetros

anObject
Object

O objeto que deve ser testado

message
String

A mensagem a ser exibida quando o objeto for nulo

args
Object[]

Argumentos a serem usados na formatação da mensagem

Aplica-se a

NotNull(Object)

Verifica se o objeto que é passado não é igual a null Se o objeto for, um AssertionException será null gerado.

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

Parâmetros

anObject
Object

O objeto que deve ser testado

Aplica-se a

NotNull(Object, String)

Verifica se o objeto que é passado não é igual a null Se o objeto for, um AssertionException será null gerado.

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

Parâmetros

anObject
Object

O objeto que deve ser testado

message
String

A mensagem a ser exibida quando o objeto for nulo

Aplica-se a