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
objectobjectThe 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
valueT?The value to e validated
Returns
- T
The non-
nullvalue
Type Parameters
TThe 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
objectobjectThe 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
valueT?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