From 98e9c3d084c117af0ccc245c4b002a9a3fdb7280 Mon Sep 17 00:00:00 2001 From: Vishwas Babu A J Date: Mon, 2 Mar 2015 07:00:31 +0530 Subject: [PATCH] fixing failing test case --- .../integrationtests/ClientSavingsIntegrationTest.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mifosng-provider/src/integrationTest/java/org/mifosplatform/integrationtests/ClientSavingsIntegrationTest.java b/mifosng-provider/src/integrationTest/java/org/mifosplatform/integrationtests/ClientSavingsIntegrationTest.java index b4b514ff7..ba433b419 100755 --- a/mifosng-provider/src/integrationTest/java/org/mifosplatform/integrationtests/ClientSavingsIntegrationTest.java +++ b/mifosng-provider/src/integrationTest/java/org/mifosplatform/integrationtests/ClientSavingsIntegrationTest.java @@ -205,7 +205,7 @@ public class ClientSavingsIntegrationTest { final String openningBalance = "1600"; final String enforceMinRequiredBalance = "true"; final boolean allowOverdraft = false; - final Integer savingsProductID = createSavingsProduct(this.requestSpec, this.responseSpec, openningBalance , + final Integer savingsProductID = createSavingsProduct(this.requestSpec, this.responseSpec, openningBalance, minBalanceForInterestCalculation, minRequiredBalance, enforceMinRequiredBalance, allowOverdraft); Assert.assertNotNull(savingsProductID); @@ -552,6 +552,13 @@ public class ClientSavingsIntegrationTest { HashMap paidCharge = this.savingsAccountHelper.getSavingsCharge(savingsId, (Integer) savingsChargeForPay.get("id")); assertEquals(savingsChargeForPay.get("amount"), paidCharge.get("amountPaid")); + // temporary fix, this test case needs to be re-factored (will fail + // again on Jan 15 2016) + cal.set(Calendar.YEAR, (Integer) dates.get(0) + 1); + this.savingsAccountHelper.payCharge((Integer) savingsChargeForPay.get("id"), savingsId, + ((Float) savingsChargeForPay.get("amount")).toString(), sdf.format(cal.getTime())); + paidCharge = this.savingsAccountHelper.getSavingsCharge(savingsId, (Integer) savingsChargeForPay.get("id")); + Integer inactivatedChargeId = (Integer) this.savingsAccountHelper.inactivateCharge(annualSavingsChargeId, savingsId, CommonConstants.RESPONSE_RESOURCE_ID); assertEquals("Inactivated Savings Charges Id", annualSavingsChargeId, inactivatedChargeId);