ObjectAssertions<T> Class
Definition
Provides assertions for any object value.
public class ObjectAssertions<T>
Type Parameters
| Name | Description |
|---|---|
| T | The type of the value being asserted on. |
Constructors
| Name | Description |
|---|---|
| ObjectAssertions(T) | Provides assertions for any object value. |
Properties
| Name | Description |
|---|---|
| Value | Gets the value being asserted on. |
Methods
| Name | Description |
|---|---|
| BeNull() | Asserts that the value is null. |
| BeOfType<TOther>() | Asserts that the value is assignable to the specified type. |
| BeTheSameInstanceAs(T) | Asserts that the value is the same instance as the expected value. |
| Equal(T) | Asserts that the value is equal to the expected value using the default equality comparer. |
| Equal(T, IEqualityComparer<T>) | Asserts that the value is equal to the expected value using the specified equality comparer. |
| Equal(T, Func<T, T, Boolean>) | |
| Equals(Object) | |
| GetHashCode() | |
| GetType() | Not supported. This method is hidden to prevent accidental use. |
| NotBeNull() | Asserts that the value is not null. |
| NotBeOfType<TOther>() | Asserts that the value is not assignable to the specified type. |
| NotBeTheSameInstanceAs(T) | Asserts that the value is not the same instance as the expected value. |
| NotEqual(T) | Asserts that the value is not equal to the expected value using the default equality comparer. |
| NotEqual(T, IEqualityComparer<T>) | Asserts that the value is not equal to the expected value using the specified equality comparer. |
| NotEqual(T, Func<T, T, Boolean>) | |
| ToString() |