Table of Contents

Method NotNull

Namespace
Xunit
Assembly
xunit.v3.assert.dll

NotNull(object?)

Verifies that an object reference is not null.

public static void NotNull(object? @object)

Parameters

object object

The object to be validated

Exceptions

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

Exceptions

Thrown when the value is null