Class ObjectAssertExtensions
Defines a code assertion helper for object-based scenarios.
public static class ObjectAssertExtensions
- Inheritance
-
ObjectAssertExtensions
- Inherited Members
Methods
ShouldBeNull(object?)
Tests whether the specified value is null and throws an exception if it is not null.
public static void ShouldBeNull(this object? value)
Parameters
valueobjectThe value to test.
Exceptions
- AssertFailedException
Thrown if the
valueis not null.
ShouldNotBeNull(object?)
Tests whether the specified value is not null and throws an exception if it is null.
public static void ShouldNotBeNull(this object? value)
Parameters
valueobjectThe value to test.
Exceptions
- AssertFailedException
Thrown if the
valueis null.