Skip to content

DateTimeOffsetAssertions.NotBeApproximately Method ​

Definition ​

Asserts that the DateTimeOffset value is not within the specified precision of the specified value.

c#
public AssertionsChain<DateTimeOffsetAssertions, DateTimeOffset> NotBeApproximately(DateTimeOffset expected, TimeSpan precision);

View source

Parameters ​

NameTypeDescription
expectedDateTimeOffsetThe value that is not expected.
precisionTimeSpanThe maximum difference between the value and expected that is considered approximately equal.

Returns ​

AssertionsChain<DateTimeOffsetAssertions, DateTimeOffset>

An AssertionsChain<TAssertions, T> for chaining further assertions.