Table of Contents

Class NullAsserts

Namespace
Asserts
Assembly
xunit.v3.assert.dll
public class NullAsserts
Inheritance
NullAsserts
Inherited Members

Methods

NotNull(object?)

Verifies that an object reference is not null.

public static void NotNull(object? @object)

Parameters

object object

The object to be validated

Examples

Add an example for this method ?

Contribution guide.

Exceptions

NotNullException

Thrown when the object reference is null

NotNull<T>(T?)

Verifies that a nullable struct value is not null.

public static T NotNull<T>(T? value) where T : struct

Parameters

value T?

The value to e validated

Returns

T

The non-null value

Type Parameters

T

The type of the struct

Examples

Add an example for this method ?

Contribution guide.

Exceptions

NotNullException

Thrown when the value is null

Null(object?)

Verifies that an object reference is null.

public static void Null(object? @object)

Parameters

object object

The object to be inspected

Examples

Add an example for this method ?

Contribution guide.

Exceptions

NullException

Thrown when the object reference is not null

Null<T>(T?)

Verifies that a nullable struct value is null.

public static void Null<T>(T? value) where T : struct

Parameters

value T?

The value to be inspected

Type Parameters

T

Examples

Add an example for this method ?

Contribution guide.

Exceptions

NullException

Thrown when the value is not null