Skip to content

TimeSpanAssertions Class ​

Definition ​

Provides assertions for TimeSpan values.

c#
public sealed class TimeSpanAssertions : NumericAssertions<TimeSpanAssertions, TimeSpan>

View source

Constructors ​

NameDescription
TimeSpanAssertions(TimeSpan)Provides assertions for TimeSpan values.

Methods ​

NameDescription
BeApproximately(TimeSpan, TimeSpan)Asserts that the TimeSpan value is approximately equal to the expected value within the specified precision.
NotBeApproximately(TimeSpan, TimeSpan)Asserts that the TimeSpan value is not approximately equal to the specified value within the specified precision.