From commits-return-1296-archive-asf-public=cust-asf.ponee.io@fineract.apache.org Mon Jan 22 16:13:11 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id D01AA18076D for ; Mon, 22 Jan 2018 16:13:09 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id BF0C3160C3A; Mon, 22 Jan 2018 15:13:09 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 4AEE8160C5B for ; Mon, 22 Jan 2018 16:13:08 +0100 (CET) Received: (qmail 73674 invoked by uid 500); 22 Jan 2018 15:13:07 -0000 Mailing-List: contact commits-help@fineract.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@fineract.apache.org Delivered-To: mailing list commits@fineract.apache.org Received: (qmail 73460 invoked by uid 99); 22 Jan 2018 15:13:07 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Jan 2018 15:13:07 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 5676B8201A; Mon, 22 Jan 2018 15:13:06 +0000 (UTC) Date: Mon, 22 Jan 2018 15:13:23 +0000 To: "commits@fineract.apache.org" Subject: [fineract-cn-test] 18/32: Added ability to check LocalDateTime within a variance. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit From: myrle@apache.org In-Reply-To: <151663398526.27360.16528159839894525528@gitbox.apache.org> References: <151663398526.27360.16528159839894525528@gitbox.apache.org> X-Git-Host: gitbox.apache.org X-Git-Repo: fineract-cn-test X-Git-Refname: refs/heads/develop X-Git-Reftype: branch X-Git-Rev: c17f238414eb558e17e289872a6d8de848b22e0c X-Git-NotificationType: diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated Message-Id: <20180122151306.5676B8201A@gitbox.apache.org> 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 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.