fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From my...@apache.org
Subject [fineract-cn-test] 18/32: Added ability to check LocalDateTime within a variance.
Date Mon, 22 Jan 2018 15:13:23 GMT
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 <mkrantz@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.

Mime
View raw message