Table of Contents

Class NullException

Namespace
Xunit.Sdk
Assembly
xunit.v3.assert.dll

Exception thrown when Assert.Null fails.

public class NullException : XunitException, ISerializable, IAssertionException
Inheritance
NullException
Implements
Inherited Members

Methods

ForNonNullStruct<T>(Type, T?)

Creates a new instance of the NullException class to be thrown when the given nullable struct was unexpectedly not null.

public static Exception ForNonNullStruct<T>(Type type, T? actual) where T : struct

Parameters

type Type

The inner type of the value

actual T?

The actual non-null value

Returns

Exception

Type Parameters

T

ForNonNullValue(object)

Creates a new instance of the NullException class to be thrown when the given value was unexpectedly not null.

public static NullException ForNonNullValue(object actual)

Parameters

actual object

The actual non-null value

Returns

NullException