-
-
Notifications
You must be signed in to change notification settings - Fork 765
Closed
Closed
Copy link
Labels
status: ideal for contributionAn issue that a contributor can help us withAn issue that a contributor can help us with
Milestone
Description
Feature summary
Enhance the byLessThan(..) and within to support the usage of Duration.
At the moment byLessThan(..) and within support the usage of a value combined with a TemporalUnit which looks like this:
assertThat(_07_10_20).isCloseTo(_07_11_45, byLessThan(1, ChronoUnit.MINUTES));
assertThat(_07_10_00).isCloseTo(_07_12_00, within(1, ChronoUnit.MINUTES));Example
My suggestion is to enhance it in that way that you are able to use Duration instead of two different parameters like this:
assertThat(_07_10_20).isCloseTo(_07_11_45, byLessThan(Duration.ofMinutes(1)));
assertThat(_07_10_20).isCloseTo(_07_11_45, byLessThan(Duration.ofSeconds(45)));or as example for within:
assertThat(_07_10_00).isCloseTo(_07_12_00, within(Duration.ofMinutes(1)));joel-costigliola
Metadata
Metadata
Assignees
Labels
status: ideal for contributionAn issue that a contributor can help us withAn issue that a contributor can help us with