Skip to content

Commit

Permalink
Added Timespan
Browse files Browse the repository at this point in the history
  • Loading branch information
josephwoodward committed Oct 2, 2015
1 parent b836eb5 commit 5a8e3f7
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docs/assertions/shouldNotBe.md
Expand Up @@ -58,3 +58,25 @@ date
but was
01/06/2000 00:00:00
```

## Timespan

TimeSpan also has tolerance overloads

```
var timeSpan = TimeSpan.FromHours(1);
timeSpan.ShouldNotBe(timeSpan.Add(TimeSpan.FromHours(1.1d)), TimeSpan.FromHours(1.5d));
```

Exception:
```
timeSpan
should not be within
01:30:00
of
02:06:00
but was
01:00:00
```

Want to improve shouldy? We have an open issue at [#303](https://github.com/shouldly/shouldly/issues/303) to improve this error message!

0 comments on commit 5a8e3f7

Please sign in to comment.