DateTimeOffsetAssertions.BeApproximately Method
Definition
Asserts that the DateTimeOffset value is within the specified precision of the expected value.
c#
public AssertionsChain<DateTimeOffsetAssertions, DateTimeOffset> BeApproximately(DateTimeOffset expected, TimeSpan precision);Parameters
| Name | Type | Description |
|---|---|---|
expected | DateTimeOffset | The expected value. |
precision | TimeSpan | The maximum allowed difference between the value and the expected value. |
Returns
AssertionsChain<DateTimeOffsetAssertions, DateTimeOffset>
An AssertionsChain<TAssertions, T> for chaining further assertions.