From 89b996cf584b5ca946896ec9d8e8f5756ae9d60a Mon Sep 17 00:00:00 2001 From: Michael Vorburger Date: Sat, 11 Jan 2020 00:56:16 +0100 Subject: [PATCH] Revert changes made to LoanReschedulingWithinCenterTest (FINERACT-702) @awasum changed this in the SpotBugs related work, but this seems both wrong, and, for me, makes this test now fail instead of pass (even though for him it passed on the original PR...). Probably related to https://issues.apache.org/jira/browse/FINERACT-820; note that my current local time as I'm testing this is Sunday, and it WORKS with; I'm now confused when FINERACT-820 affects us and when not. Or perhaps this has nothing at all to do with that. --- .../LoanReschedulingWithinCenterTest.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/LoanReschedulingWithinCenterTest.java b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/LoanReschedulingWithinCenterTest.java index c42d6304080..94cd11615f5 100644 --- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/LoanReschedulingWithinCenterTest.java +++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/LoanReschedulingWithinCenterTest.java @@ -151,8 +151,7 @@ public void testCenterReschedulingLoansWithInterestRecalculationEnabled() { // VERIFY THE INTEREST Float interestDue = (Float) ((HashMap) loanRepaymnetSchedule.get(2)).get("interestDue"); - assertEquals(String.valueOf(interestDue), "42.38"); - + assertEquals("90.82", String.valueOf(interestDue)); } private void associateClientsToGroup(Integer groupId, Integer clientId) { @@ -176,7 +175,7 @@ private Integer createCalendarMeeting(Integer centerId) { final String startDate = dateFormat.format(today.getTime()); final String frequency = "2"; // 2:Weekly final String interval = "2"; // Every one week - final Integer repeatsOnDay = today.get(Calendar.DAY_OF_WEEK); + final Integer repeatsOnDay = today.get(Calendar.DAY_OF_WEEK) - 1; Integer calendarId = CalendarHelper.createMeetingForGroup(this.requestSpec, this.responseSpec, centerId, startDate, frequency, interval, repeatsOnDay.toString()); @@ -280,8 +279,7 @@ public void testCenterReschedulingMultiTrancheLoansWithInterestRecalculationEnab // VERIFY THE INTEREST Float interestDue = (Float) ((HashMap) loanRepaymnetSchedule.get(2)).get("interestDue"); - assertEquals(String.valueOf(interestDue), "19.16"); - + assertEquals("41.05", String.valueOf(interestDue)); } private Integer createLoanProductWithInterestRecalculation(final String repaymentStrategy,