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
objectobjectThe 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
valueT?The value to e validated
Returns
- T
The non-
nullvalue
Type Parameters
TThe type of the struct
Exceptions
Thrown when the value is null