You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by my...@apache.org on 2018/01/22 15:13:23 UTC
[fineract-cn-test] 18/32: Added ability to check LocalDateTime
within a variance.
This is an automated email from the ASF dual-hosted git repository.
myrle pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-test.git
commit c17f238414eb558e17e289872a6d8de848b22e0c
Author: myrle-krantz <mk...@mifos.org>
AuthorDate: Sat Apr 29 13:11:53 2017 +0200
Added ability to check LocalDateTime within a variance.
---
src/main/java/io/mifos/core/test/domain/TimeStampChecker.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/main/java/io/mifos/core/test/domain/TimeStampChecker.java b/src/main/java/io/mifos/core/test/domain/TimeStampChecker.java
index 2738d14..54eafe8 100644
--- a/src/main/java/io/mifos/core/test/domain/TimeStampChecker.java
+++ b/src/main/java/io/mifos/core/test/domain/TimeStampChecker.java
@@ -41,7 +41,12 @@ public class TimeStampChecker {
public static TimeStampChecker inTheFuture(final Duration offset)
{
- return new TimeStampChecker(LocalDateTime.now(Clock.systemUTC()).plus(offset), Duration.ofSeconds(DEFAULT_MAXIMUM_DELTA));
+ return inTheFutureWithWiggleRoom(offset, Duration.ofSeconds(DEFAULT_MAXIMUM_DELTA));
+ }
+
+ public static TimeStampChecker inTheFutureWithWiggleRoom(final Duration offset, final Duration maximumDelta)
+ {
+ return new TimeStampChecker(LocalDateTime.now(Clock.systemUTC()).plus(offset), maximumDelta);
}
public static TimeStampChecker allowSomeWiggleRoom(final Duration maximumDelta)
--
To stop receiving notification emails like this one, please contact
myrle@apache.org.