Skip to content

TimeSpanAssertions.NotBeApproximately Method ​

Definition ​

Asserts that the TimeSpan value is not approximately equal to the specified value within the specified precision.

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

View source

Parameters ​

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

Returns ​

AssertionsChain<TimeSpanAssertions, TimeSpan>

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