You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by vo...@apache.org on 2020/01/12 12:16:55 UTC

[fineract] 02/02: Revert changes made to LoanReschedulingWithinCenterTest (FINERACT-702)

This is an automated email from the ASF dual-hosted git repository.

vorburger pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git

commit 89b996cf584b5ca946896ec9d8e8f5756ae9d60a
Author: Michael Vorburger <mi...@vorburger.ch>
AuthorDate: Sat Jan 11 00:56:16 2020 +0100

    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.
---
 .../integrationtests/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 c42d630..94cd116 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 class LoanReschedulingWithinCenterTest {
 
         // 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 @@ public class LoanReschedulingWithinCenterTest {
         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 class LoanReschedulingWithinCenterTest {
 
         // 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,