ignore one flaky FixedDepositTest (FINERACT-950)
testFixedDepositAccountClosureTypeWithdrawal_WITH_HOLD_TAX()
This commit is contained in:
committed by
Michael Vorburger ⛑️
parent
077065c1b5
commit
6b1878a1d8
+77
-82
@@ -61,6 +61,7 @@ import org.joda.time.Months;
|
|||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
|
import org.junit.Ignore;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
@SuppressWarnings({ "unused", "unchecked", "rawtypes", "static-access" })
|
@SuppressWarnings({ "unused", "unchecked", "rawtypes", "static-access" })
|
||||||
@@ -83,7 +84,6 @@ public class FixedDepositTest {
|
|||||||
private static final String BI_ANNUALLY = "6";
|
private static final String BI_ANNUALLY = "6";
|
||||||
private static final String ANNUALLY = "7";
|
private static final String ANNUALLY = "7";
|
||||||
private static final String INTEREST_CALCULATION_USING_DAILY_BALANCE = "1";
|
private static final String INTEREST_CALCULATION_USING_DAILY_BALANCE = "1";
|
||||||
private static final String INTEREST_CALCULATION_USING_AVERAGE_DAILY_BALANCE = "2";
|
|
||||||
private static final String DAYS_360 = "360";
|
private static final String DAYS_360 = "360";
|
||||||
private static final String DAYS_365 = "365";
|
private static final String DAYS_365 = "365";
|
||||||
|
|
||||||
@@ -146,7 +146,7 @@ public class FixedDepositTest {
|
|||||||
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
|
final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
|
monthDayFormat.format(todaysDate.getTime());
|
||||||
|
|
||||||
Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
|
Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
|
||||||
Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
|
Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
|
||||||
@@ -225,10 +225,7 @@ public class FixedDepositTest {
|
|||||||
this.journalEntryHelper.checkJournalEntryForAssetAccount(expenseAccount, INTEREST_POSTED_DATE, expenseAccountEntry);
|
this.journalEntryHelper.checkJournalEntryForAssetAccount(expenseAccount, INTEREST_POSTED_DATE, expenseAccountEntry);
|
||||||
this.journalEntryHelper.checkJournalEntryForLiabilityAccount(liabilityAccount, INTEREST_POSTED_DATE, liablilityAccountEntry);
|
this.journalEntryHelper.checkJournalEntryForLiabilityAccount(liabilityAccount, INTEREST_POSTED_DATE, liablilityAccountEntry);
|
||||||
|
|
||||||
/***
|
this.fixedDepositAccountHelper.calculatePrematureAmountForFixedDeposit(fixedDepositAccountId,
|
||||||
* Preclose the FD account verify whether account is preClosed
|
|
||||||
*/
|
|
||||||
HashMap fixedDepositPrematureData = this.fixedDepositAccountHelper.calculatePrematureAmountForFixedDeposit(fixedDepositAccountId,
|
|
||||||
CLOSED_ON_DATE);
|
CLOSED_ON_DATE);
|
||||||
|
|
||||||
Integer prematureClosureTransactionId = (Integer) this.fixedDepositAccountHelper.prematureCloseForFixedDeposit(
|
Integer prematureClosureTransactionId = (Integer) this.fixedDepositAccountHelper.prematureCloseForFixedDeposit(
|
||||||
@@ -285,7 +282,7 @@ public class FixedDepositTest {
|
|||||||
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
|
final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
|
monthDayFormat.format(todaysDate.getTime());
|
||||||
|
|
||||||
Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
|
Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
|
||||||
Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
|
Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
|
||||||
@@ -366,10 +363,7 @@ public class FixedDepositTest {
|
|||||||
this.journalEntryHelper.checkJournalEntryForAssetAccount(expenseAccount, INTEREST_POSTED_DATE, expenseAccountEntry);
|
this.journalEntryHelper.checkJournalEntryForAssetAccount(expenseAccount, INTEREST_POSTED_DATE, expenseAccountEntry);
|
||||||
this.journalEntryHelper.checkJournalEntryForLiabilityAccount(liabilityAccount, INTEREST_POSTED_DATE, liablilityAccountEntry);
|
this.journalEntryHelper.checkJournalEntryForLiabilityAccount(liabilityAccount, INTEREST_POSTED_DATE, liablilityAccountEntry);
|
||||||
|
|
||||||
/***
|
this.fixedDepositAccountHelper.calculatePrematureAmountForFixedDeposit(fixedDepositAccountId,
|
||||||
* Preclose the FD account verify whether account is preClosed
|
|
||||||
*/
|
|
||||||
HashMap fixedDepositPrematureData = this.fixedDepositAccountHelper.calculatePrematureAmountForFixedDeposit(fixedDepositAccountId,
|
|
||||||
CLOSED_ON_DATE);
|
CLOSED_ON_DATE);
|
||||||
|
|
||||||
Integer prematureClosureTransactionId = (Integer) this.fixedDepositAccountHelper.prematureCloseForFixedDeposit(
|
Integer prematureClosureTransactionId = (Integer) this.fixedDepositAccountHelper.prematureCloseForFixedDeposit(
|
||||||
@@ -402,6 +396,7 @@ public class FixedDepositTest {
|
|||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@Ignore // TODO FINERACT-950
|
||||||
public void testFixedDepositAccountClosureTypeWithdrawal_WITH_HOLD_TAX() throws InterruptedException {
|
public void testFixedDepositAccountClosureTypeWithdrawal_WITH_HOLD_TAX() throws InterruptedException {
|
||||||
this.fixedDepositProductHelper = new FixedDepositProductHelper(this.requestSpec, this.responseSpec);
|
this.fixedDepositProductHelper = new FixedDepositProductHelper(this.requestSpec, this.responseSpec);
|
||||||
this.accountHelper = new AccountHelper(this.requestSpec, this.responseSpec);
|
this.accountHelper = new AccountHelper(this.requestSpec, this.responseSpec);
|
||||||
@@ -432,7 +427,7 @@ public class FixedDepositTest {
|
|||||||
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
|
final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
|
monthDayFormat.format(todaysDate.getTime());
|
||||||
|
|
||||||
Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
|
Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
|
||||||
Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
|
Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
|
||||||
@@ -503,7 +498,7 @@ public class FixedDepositTest {
|
|||||||
Assert.assertNotNull(transactionIdForPostInterest);
|
Assert.assertNotNull(transactionIdForPostInterest);
|
||||||
|
|
||||||
accountSummary = this.fixedDepositAccountHelper.getFixedDepositSummary(fixedDepositAccountId);
|
accountSummary = this.fixedDepositAccountHelper.getFixedDepositSummary(fixedDepositAccountId);
|
||||||
Float totalInterestPosted = (Float) accountSummary.get("totalInterestPosted");
|
accountSummary.get("totalInterestPosted");
|
||||||
Assert.assertNull(accountSummary.get("totalWithholdTax"));
|
Assert.assertNull(accountSummary.get("totalWithholdTax"));
|
||||||
|
|
||||||
/***
|
/***
|
||||||
@@ -536,7 +531,7 @@ public class FixedDepositTest {
|
|||||||
final String chartToUse = "period";
|
final String chartToUse = "period";
|
||||||
final String depositAmount = "10000";
|
final String depositAmount = "10000";
|
||||||
final String depositPeriod = "12";
|
final String depositPeriod = "12";
|
||||||
final Float interestRate = Float.valueOf((float)6.0);
|
final Float interestRate = (float)6.0;
|
||||||
testFixedDepositAccountForInterestRate(chartToUse, depositAmount, depositPeriod, interestRate);
|
testFixedDepositAccountForInterestRate(chartToUse, depositAmount, depositPeriod, interestRate);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -545,7 +540,7 @@ public class FixedDepositTest {
|
|||||||
final String chartToUse = "period";
|
final String chartToUse = "period";
|
||||||
final String depositAmount = "2000";
|
final String depositAmount = "2000";
|
||||||
final String depositPeriod = "12";
|
final String depositPeriod = "12";
|
||||||
final Float interestRate = Float.valueOf((float)6.0);
|
final Float interestRate = (float)6.0;
|
||||||
testFixedDepositAccountForInterestRate(chartToUse, depositAmount, depositPeriod, interestRate);
|
testFixedDepositAccountForInterestRate(chartToUse, depositAmount, depositPeriod, interestRate);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -554,7 +549,7 @@ public class FixedDepositTest {
|
|||||||
final String chartToUse = "period";
|
final String chartToUse = "period";
|
||||||
final String depositAmount = "10000";
|
final String depositAmount = "10000";
|
||||||
final String depositPeriod = "18";
|
final String depositPeriod = "18";
|
||||||
final Float interestRate = Float.valueOf((float)7.0);
|
final Float interestRate = (float)7.0;
|
||||||
testFixedDepositAccountForInterestRate(chartToUse, depositAmount, depositPeriod, interestRate);
|
testFixedDepositAccountForInterestRate(chartToUse, depositAmount, depositPeriod, interestRate);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -563,7 +558,7 @@ public class FixedDepositTest {
|
|||||||
final String chartToUse = "amount";
|
final String chartToUse = "amount";
|
||||||
final String depositAmount = "10000";
|
final String depositAmount = "10000";
|
||||||
final String depositPeriod = "12";
|
final String depositPeriod = "12";
|
||||||
final Float interestRate = Float.valueOf((float)7.0);
|
final Float interestRate = (float)7.0;
|
||||||
testFixedDepositAccountForInterestRate(chartToUse, depositAmount, depositPeriod, interestRate);
|
testFixedDepositAccountForInterestRate(chartToUse, depositAmount, depositPeriod, interestRate);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -572,7 +567,7 @@ public class FixedDepositTest {
|
|||||||
final String chartToUse = "amount";
|
final String chartToUse = "amount";
|
||||||
final String depositAmount = "5000";
|
final String depositAmount = "5000";
|
||||||
final String depositPeriod = "12";
|
final String depositPeriod = "12";
|
||||||
final Float interestRate = Float.valueOf((float)5.0);
|
final Float interestRate = (float)5.0;
|
||||||
testFixedDepositAccountForInterestRate(chartToUse, depositAmount, depositPeriod, interestRate);
|
testFixedDepositAccountForInterestRate(chartToUse, depositAmount, depositPeriod, interestRate);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -581,7 +576,7 @@ public class FixedDepositTest {
|
|||||||
final String chartToUse = "amount";
|
final String chartToUse = "amount";
|
||||||
final String depositAmount = "10000";
|
final String depositAmount = "10000";
|
||||||
final String depositPeriod = "26";
|
final String depositPeriod = "26";
|
||||||
final Float interestRate = Float.valueOf((float)7.0);
|
final Float interestRate = (float)7.0;
|
||||||
testFixedDepositAccountForInterestRate(chartToUse, depositAmount, depositPeriod, interestRate);
|
testFixedDepositAccountForInterestRate(chartToUse, depositAmount, depositPeriod, interestRate);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -590,7 +585,7 @@ public class FixedDepositTest {
|
|||||||
final String chartToUse = "period_amount";
|
final String chartToUse = "period_amount";
|
||||||
final String depositAmount = "10000";
|
final String depositAmount = "10000";
|
||||||
final String depositPeriod = "12";
|
final String depositPeriod = "12";
|
||||||
final Float interestRate = Float.valueOf((float)7.0);
|
final Float interestRate = (float)7.0;
|
||||||
testFixedDepositAccountForInterestRate(chartToUse, depositAmount, depositPeriod, interestRate);
|
testFixedDepositAccountForInterestRate(chartToUse, depositAmount, depositPeriod, interestRate);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -599,7 +594,7 @@ public class FixedDepositTest {
|
|||||||
final String chartToUse = "period_amount";
|
final String chartToUse = "period_amount";
|
||||||
final String depositAmount = "5000";
|
final String depositAmount = "5000";
|
||||||
final String depositPeriod = "12";
|
final String depositPeriod = "12";
|
||||||
final Float interestRate = Float.valueOf((float)6.0);
|
final Float interestRate = (float)6.0;
|
||||||
testFixedDepositAccountForInterestRate(chartToUse, depositAmount, depositPeriod, interestRate);
|
testFixedDepositAccountForInterestRate(chartToUse, depositAmount, depositPeriod, interestRate);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -608,7 +603,7 @@ public class FixedDepositTest {
|
|||||||
final String chartToUse = "period_amount";
|
final String chartToUse = "period_amount";
|
||||||
final String depositAmount = "10000";
|
final String depositAmount = "10000";
|
||||||
final String depositPeriod = "20";
|
final String depositPeriod = "20";
|
||||||
final Float interestRate = Float.valueOf((float)9.0);
|
final Float interestRate = (float)9.0;
|
||||||
testFixedDepositAccountForInterestRate(chartToUse, depositAmount, depositPeriod, interestRate);
|
testFixedDepositAccountForInterestRate(chartToUse, depositAmount, depositPeriod, interestRate);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -617,7 +612,7 @@ public class FixedDepositTest {
|
|||||||
final String chartToUse = "amount_period";
|
final String chartToUse = "amount_period";
|
||||||
final String depositAmount = "10000";
|
final String depositAmount = "10000";
|
||||||
final String depositPeriod = "12";
|
final String depositPeriod = "12";
|
||||||
final Float interestRate = Float.valueOf((float)8.0);
|
final Float interestRate = (float)8.0;
|
||||||
testFixedDepositAccountForInterestRate(chartToUse, depositAmount, depositPeriod, interestRate);
|
testFixedDepositAccountForInterestRate(chartToUse, depositAmount, depositPeriod, interestRate);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -626,7 +621,7 @@ public class FixedDepositTest {
|
|||||||
final String chartToUse = "amount_period";
|
final String chartToUse = "amount_period";
|
||||||
final String depositAmount = "5000";
|
final String depositAmount = "5000";
|
||||||
final String depositPeriod = "12";
|
final String depositPeriod = "12";
|
||||||
final Float interestRate = Float.valueOf((float)6.0);
|
final Float interestRate = (float)6.0;
|
||||||
testFixedDepositAccountForInterestRate(chartToUse, depositAmount, depositPeriod, interestRate);
|
testFixedDepositAccountForInterestRate(chartToUse, depositAmount, depositPeriod, interestRate);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -635,7 +630,7 @@ public class FixedDepositTest {
|
|||||||
final String chartToUse = "amount_period";
|
final String chartToUse = "amount_period";
|
||||||
final String depositAmount = "10000";
|
final String depositAmount = "10000";
|
||||||
final String depositPeriod = "6";
|
final String depositPeriod = "6";
|
||||||
final Float interestRate = Float.valueOf((float)7.0);
|
final Float interestRate = (float)7.0;
|
||||||
testFixedDepositAccountForInterestRate(chartToUse, depositAmount, depositPeriod, interestRate);
|
testFixedDepositAccountForInterestRate(chartToUse, depositAmount, depositPeriod, interestRate);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -724,7 +719,7 @@ public class FixedDepositTest {
|
|||||||
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
|
final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
|
monthDayFormat.format(todaysDate.getTime());
|
||||||
|
|
||||||
Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
|
Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
|
||||||
Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
|
Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
|
||||||
@@ -821,7 +816,7 @@ public class FixedDepositTest {
|
|||||||
*/
|
*/
|
||||||
Account financialAccount = getMappedLiabilityFinancialAccount();
|
Account financialAccount = getMappedLiabilityFinancialAccount();
|
||||||
|
|
||||||
HashMap fixedDepositPrematureData = this.fixedDepositAccountHelper.calculatePrematureAmountForFixedDeposit(fixedDepositAccountId,
|
this.fixedDepositAccountHelper.calculatePrematureAmountForFixedDeposit(fixedDepositAccountId,
|
||||||
CLOSED_ON_DATE);
|
CLOSED_ON_DATE);
|
||||||
|
|
||||||
/***
|
/***
|
||||||
@@ -895,7 +890,7 @@ public class FixedDepositTest {
|
|||||||
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
|
final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
|
monthDayFormat.format(todaysDate.getTime());
|
||||||
|
|
||||||
Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
|
Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
|
||||||
Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
|
Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
|
||||||
@@ -959,7 +954,7 @@ public class FixedDepositTest {
|
|||||||
this.journalEntryHelper.checkJournalEntryForAssetAccount(expenseAccount, INTEREST_POSTED_DATE, expenseAccountEntry);
|
this.journalEntryHelper.checkJournalEntryForAssetAccount(expenseAccount, INTEREST_POSTED_DATE, expenseAccountEntry);
|
||||||
this.journalEntryHelper.checkJournalEntryForLiabilityAccount(liabilityAccount, INTEREST_POSTED_DATE, liablilityAccountEntry);
|
this.journalEntryHelper.checkJournalEntryForLiabilityAccount(liabilityAccount, INTEREST_POSTED_DATE, liablilityAccountEntry);
|
||||||
|
|
||||||
HashMap fixedDepositPrematureData = this.fixedDepositAccountHelper.calculatePrematureAmountForFixedDeposit(fixedDepositAccountId,
|
this.fixedDepositAccountHelper.calculatePrematureAmountForFixedDeposit(fixedDepositAccountId,
|
||||||
CLOSED_ON_DATE);
|
CLOSED_ON_DATE);
|
||||||
|
|
||||||
ArrayList<HashMap> errorResponse = (ArrayList<HashMap>) fixedDepositAccountHelperValidationError.prematureCloseForFixedDeposit(
|
ArrayList<HashMap> errorResponse = (ArrayList<HashMap>) fixedDepositAccountHelperValidationError.prematureCloseForFixedDeposit(
|
||||||
@@ -986,7 +981,7 @@ public class FixedDepositTest {
|
|||||||
|
|
||||||
todaysDate = Calendar.getInstance();
|
todaysDate = Calendar.getInstance();
|
||||||
todaysDate.add(Calendar.MONTH, -1);
|
todaysDate.add(Calendar.MONTH, -1);
|
||||||
final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
|
monthDayFormat.format(todaysDate.getTime());
|
||||||
String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
|
|
||||||
Integer clientId = ClientHelper.createClient(this.requestSpec, this.responseSpec);
|
Integer clientId = ClientHelper.createClient(this.requestSpec, this.responseSpec);
|
||||||
@@ -996,9 +991,9 @@ public class FixedDepositTest {
|
|||||||
Integer fixedDepositProductId = createFixedDepositProduct(VALID_FROM, VALID_TO, accountingRule);
|
Integer fixedDepositProductId = createFixedDepositProduct(VALID_FROM, VALID_TO, accountingRule);
|
||||||
Assert.assertNotNull(fixedDepositProductId);
|
Assert.assertNotNull(fixedDepositProductId);
|
||||||
|
|
||||||
ArrayList<HashMap> allFixedDepositProductsData = this.fixedDepositProductHelper.retrieveAllFixedDepositProducts(this.requestSpec,
|
this.fixedDepositProductHelper.retrieveAllFixedDepositProducts(this.requestSpec,
|
||||||
this.responseSpec);
|
this.responseSpec);
|
||||||
HashMap fixedDepositProductData = this.fixedDepositProductHelper.retrieveFixedDepositProductById(this.requestSpec,
|
this.fixedDepositProductHelper.retrieveFixedDepositProductById(this.requestSpec,
|
||||||
this.responseSpec, fixedDepositProductId.toString());
|
this.responseSpec, fixedDepositProductId.toString());
|
||||||
|
|
||||||
Integer fixedDepositAccountId = applyForFixedDepositApplication(clientId.toString(), fixedDepositProductId.toString(), SUBMITTED_ON_DATE,
|
Integer fixedDepositAccountId = applyForFixedDepositApplication(clientId.toString(), fixedDepositProductId.toString(), SUBMITTED_ON_DATE,
|
||||||
@@ -1031,7 +1026,7 @@ public class FixedDepositTest {
|
|||||||
todaysDate.add(Calendar.MONTH, -1);
|
todaysDate.add(Calendar.MONTH, -1);
|
||||||
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
|
monthDayFormat.format(todaysDate.getTime());
|
||||||
|
|
||||||
Integer clientId = ClientHelper.createClient(this.requestSpec, this.responseSpec);
|
Integer clientId = ClientHelper.createClient(this.requestSpec, this.responseSpec);
|
||||||
Assert.assertNotNull(clientId);
|
Assert.assertNotNull(clientId);
|
||||||
@@ -1074,7 +1069,7 @@ public class FixedDepositTest {
|
|||||||
todaysDate.add(Calendar.MONTH, -1);
|
todaysDate.add(Calendar.MONTH, -1);
|
||||||
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String REJECTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String REJECTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
|
monthDayFormat.format(todaysDate.getTime());
|
||||||
|
|
||||||
Integer clientId = ClientHelper.createClient(this.requestSpec, this.responseSpec);
|
Integer clientId = ClientHelper.createClient(this.requestSpec, this.responseSpec);
|
||||||
Assert.assertNotNull(clientId);
|
Assert.assertNotNull(clientId);
|
||||||
@@ -1115,7 +1110,7 @@ public class FixedDepositTest {
|
|||||||
todaysDate.add(Calendar.MONTH, -1);
|
todaysDate.add(Calendar.MONTH, -1);
|
||||||
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String WITHDRAWN_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String WITHDRAWN_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
|
monthDayFormat.format(todaysDate.getTime());
|
||||||
|
|
||||||
Integer clientId = ClientHelper.createClient(this.requestSpec, this.responseSpec);
|
Integer clientId = ClientHelper.createClient(this.requestSpec, this.responseSpec);
|
||||||
Assert.assertNotNull(clientId);
|
Assert.assertNotNull(clientId);
|
||||||
@@ -1154,7 +1149,7 @@ public class FixedDepositTest {
|
|||||||
todaysDate = Calendar.getInstance();
|
todaysDate = Calendar.getInstance();
|
||||||
todaysDate.add(Calendar.MONTH, -1);
|
todaysDate.add(Calendar.MONTH, -1);
|
||||||
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
|
monthDayFormat.format(todaysDate.getTime());
|
||||||
|
|
||||||
Integer clientId = ClientHelper.createClient(this.requestSpec, this.responseSpec);
|
Integer clientId = ClientHelper.createClient(this.requestSpec, this.responseSpec);
|
||||||
Assert.assertNotNull(clientId);
|
Assert.assertNotNull(clientId);
|
||||||
@@ -1196,8 +1191,8 @@ public class FixedDepositTest {
|
|||||||
todaysDate.add(Calendar.DATE, -(currentDate - 1));
|
todaysDate.add(Calendar.DATE, -(currentDate - 1));
|
||||||
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
|
dateFormat.format(todaysDate.getTime());
|
||||||
final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
|
monthDayFormat.format(todaysDate.getTime());
|
||||||
|
|
||||||
Integer clientId = ClientHelper.createClient(this.requestSpec, this.responseSpec);
|
Integer clientId = ClientHelper.createClient(this.requestSpec, this.responseSpec);
|
||||||
Assert.assertNotNull(clientId);
|
Assert.assertNotNull(clientId);
|
||||||
@@ -1232,7 +1227,7 @@ public class FixedDepositTest {
|
|||||||
System.out.println("per day = " + perDay);
|
System.out.println("per day = " + perDay);
|
||||||
double interestPerDay = interestRateInFraction * perDay;
|
double interestPerDay = interestRateInFraction * perDay;
|
||||||
|
|
||||||
Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
|
todaysDate.getActualMaximum(Calendar.DATE);
|
||||||
|
|
||||||
principal = this.fixedDepositAccountHelper.getPrincipalAfterCompoundingInterest(todaysDate, principal, depositPeriod,
|
principal = this.fixedDepositAccountHelper.getPrincipalAfterCompoundingInterest(todaysDate, principal, depositPeriod,
|
||||||
interestPerDay, MONTHLY_INTERVAL, MONTHLY_INTERVAL);
|
interestPerDay, MONTHLY_INTERVAL, MONTHLY_INTERVAL);
|
||||||
@@ -1266,8 +1261,8 @@ public class FixedDepositTest {
|
|||||||
todaysDate.add(Calendar.DATE, -(currentDate - 1));
|
todaysDate.add(Calendar.DATE, -(currentDate - 1));
|
||||||
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
|
dateFormat.format(todaysDate.getTime());
|
||||||
final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
|
monthDayFormat.format(todaysDate.getTime());
|
||||||
|
|
||||||
Integer clientId = ClientHelper.createClient(this.requestSpec, this.responseSpec);
|
Integer clientId = ClientHelper.createClient(this.requestSpec, this.responseSpec);
|
||||||
Assert.assertNotNull(clientId);
|
Assert.assertNotNull(clientId);
|
||||||
@@ -1280,7 +1275,7 @@ public class FixedDepositTest {
|
|||||||
WHOLE_TERM);
|
WHOLE_TERM);
|
||||||
Assert.assertNotNull(fixedDepositAccountId);
|
Assert.assertNotNull(fixedDepositAccountId);
|
||||||
|
|
||||||
HashMap modificationsHashMap = this.fixedDepositAccountHelper.updateInterestCalculationConfigForFixedDeposit(clientId.toString(),
|
this.fixedDepositAccountHelper.updateInterestCalculationConfigForFixedDeposit(clientId.toString(),
|
||||||
fixedDepositProductId.toString(), fixedDepositAccountId.toString(), SUBMITTED_ON_DATE, VALID_FROM, VALID_TO, DAYS_360,
|
fixedDepositProductId.toString(), fixedDepositAccountId.toString(), SUBMITTED_ON_DATE, VALID_FROM, VALID_TO, DAYS_360,
|
||||||
WHOLE_TERM, INTEREST_CALCULATION_USING_DAILY_BALANCE, MONTHLY, MONTHLY);
|
WHOLE_TERM, INTEREST_CALCULATION_USING_DAILY_BALANCE, MONTHLY, MONTHLY);
|
||||||
|
|
||||||
@@ -1306,7 +1301,7 @@ public class FixedDepositTest {
|
|||||||
System.out.println("per day = " + perDay);
|
System.out.println("per day = " + perDay);
|
||||||
double interestPerDay = interestRateInFraction * perDay;
|
double interestPerDay = interestRateInFraction * perDay;
|
||||||
|
|
||||||
Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
|
todaysDate.getActualMaximum(Calendar.DATE);
|
||||||
|
|
||||||
principal = this.fixedDepositAccountHelper.getPrincipalAfterCompoundingInterest(todaysDate, principal, depositPeriod,
|
principal = this.fixedDepositAccountHelper.getPrincipalAfterCompoundingInterest(todaysDate, principal, depositPeriod,
|
||||||
interestPerDay, MONTHLY_INTERVAL, MONTHLY_INTERVAL);
|
interestPerDay, MONTHLY_INTERVAL, MONTHLY_INTERVAL);
|
||||||
@@ -1341,7 +1336,7 @@ public class FixedDepositTest {
|
|||||||
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
|
final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
|
monthDayFormat.format(todaysDate.getTime());
|
||||||
todaysDate.add(Calendar.MONTH, 1);
|
todaysDate.add(Calendar.MONTH, 1);
|
||||||
todaysDate.add(Calendar.DAY_OF_MONTH, 1);
|
todaysDate.add(Calendar.DAY_OF_MONTH, 1);
|
||||||
final String CLOSED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String CLOSED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
@@ -1399,7 +1394,7 @@ public class FixedDepositTest {
|
|||||||
principal += interestPerMonth;
|
principal += interestPerMonth;
|
||||||
System.out.println("principal = " + principal);
|
System.out.println("principal = " + principal);
|
||||||
|
|
||||||
HashMap fixedDepositPrematureData = this.fixedDepositAccountHelper.calculatePrematureAmountForFixedDeposit(fixedDepositAccountId,
|
this.fixedDepositAccountHelper.calculatePrematureAmountForFixedDeposit(fixedDepositAccountId,
|
||||||
CLOSED_ON_DATE);
|
CLOSED_ON_DATE);
|
||||||
|
|
||||||
Integer prematureClosureTransactionId = (Integer) this.fixedDepositAccountHelper.prematureCloseForFixedDeposit(
|
Integer prematureClosureTransactionId = (Integer) this.fixedDepositAccountHelper.prematureCloseForFixedDeposit(
|
||||||
@@ -1445,7 +1440,7 @@ public class FixedDepositTest {
|
|||||||
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
|
final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
|
monthDayFormat.format(todaysDate.getTime());
|
||||||
todaysDate.add(Calendar.MONTH, 1);
|
todaysDate.add(Calendar.MONTH, 1);
|
||||||
todaysDate.add(Calendar.DAY_OF_MONTH, 1);
|
todaysDate.add(Calendar.DAY_OF_MONTH, 1);
|
||||||
final String CLOSED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String CLOSED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
@@ -1461,7 +1456,7 @@ public class FixedDepositTest {
|
|||||||
WHOLE_TERM);
|
WHOLE_TERM);
|
||||||
Assert.assertNotNull(fixedDepositAccountId);
|
Assert.assertNotNull(fixedDepositAccountId);
|
||||||
|
|
||||||
HashMap modificationsHashMap = this.fixedDepositAccountHelper.updateInterestCalculationConfigForFixedDeposit(clientId.toString(),
|
this.fixedDepositAccountHelper.updateInterestCalculationConfigForFixedDeposit(clientId.toString(),
|
||||||
fixedDepositProductId.toString(), fixedDepositAccountId.toString(), SUBMITTED_ON_DATE, VALID_FROM, VALID_TO, DAYS_360,
|
fixedDepositProductId.toString(), fixedDepositAccountId.toString(), SUBMITTED_ON_DATE, VALID_FROM, VALID_TO, DAYS_360,
|
||||||
WHOLE_TERM, INTEREST_CALCULATION_USING_DAILY_BALANCE, MONTHLY, MONTHLY);
|
WHOLE_TERM, INTEREST_CALCULATION_USING_DAILY_BALANCE, MONTHLY, MONTHLY);
|
||||||
|
|
||||||
@@ -1507,7 +1502,7 @@ public class FixedDepositTest {
|
|||||||
principal += interestPerMonth;
|
principal += interestPerMonth;
|
||||||
System.out.println("principal = " + principal);
|
System.out.println("principal = " + principal);
|
||||||
|
|
||||||
HashMap fixedDepositPrematureData = this.fixedDepositAccountHelper.calculatePrematureAmountForFixedDeposit(fixedDepositAccountId,
|
this.fixedDepositAccountHelper.calculatePrematureAmountForFixedDeposit(fixedDepositAccountId,
|
||||||
CLOSED_ON_DATE);
|
CLOSED_ON_DATE);
|
||||||
|
|
||||||
Integer prematureClosureTransactionId = (Integer) this.fixedDepositAccountHelper.prematureCloseForFixedDeposit(
|
Integer prematureClosureTransactionId = (Integer) this.fixedDepositAccountHelper.prematureCloseForFixedDeposit(
|
||||||
@@ -1553,7 +1548,7 @@ public class FixedDepositTest {
|
|||||||
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
|
final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
|
monthDayFormat.format(todaysDate.getTime());
|
||||||
todaysDate.add(Calendar.MONTH, 1);
|
todaysDate.add(Calendar.MONTH, 1);
|
||||||
todaysDate.add(Calendar.DAY_OF_MONTH, 1);
|
todaysDate.add(Calendar.DAY_OF_MONTH, 1);
|
||||||
final String CLOSED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String CLOSED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
@@ -1620,7 +1615,7 @@ public class FixedDepositTest {
|
|||||||
principal += interestPerMonth;
|
principal += interestPerMonth;
|
||||||
System.out.println("principal = " + principal);
|
System.out.println("principal = " + principal);
|
||||||
|
|
||||||
HashMap fixedDepositPrematureData = this.fixedDepositAccountHelper.calculatePrematureAmountForFixedDeposit(fixedDepositAccountId,
|
this.fixedDepositAccountHelper.calculatePrematureAmountForFixedDeposit(fixedDepositAccountId,
|
||||||
CLOSED_ON_DATE);
|
CLOSED_ON_DATE);
|
||||||
|
|
||||||
Integer prematureClosureTransactionId = (Integer) this.fixedDepositAccountHelper.prematureCloseForFixedDeposit(
|
Integer prematureClosureTransactionId = (Integer) this.fixedDepositAccountHelper.prematureCloseForFixedDeposit(
|
||||||
@@ -1665,7 +1660,7 @@ public class FixedDepositTest {
|
|||||||
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
|
final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
|
monthDayFormat.format(todaysDate.getTime());
|
||||||
todaysDate.add(Calendar.MONTH, 1);
|
todaysDate.add(Calendar.MONTH, 1);
|
||||||
todaysDate.add(Calendar.DAY_OF_MONTH, 1);
|
todaysDate.add(Calendar.DAY_OF_MONTH, 1);
|
||||||
final String CLOSED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String CLOSED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
@@ -1681,7 +1676,7 @@ public class FixedDepositTest {
|
|||||||
TILL_PREMATURE_WITHDRAWAL);
|
TILL_PREMATURE_WITHDRAWAL);
|
||||||
Assert.assertNotNull(fixedDepositAccountId);
|
Assert.assertNotNull(fixedDepositAccountId);
|
||||||
|
|
||||||
HashMap modificationsHashMap = this.fixedDepositAccountHelper.updateInterestCalculationConfigForFixedDeposit(clientId.toString(),
|
this.fixedDepositAccountHelper.updateInterestCalculationConfigForFixedDeposit(clientId.toString(),
|
||||||
fixedDepositProductId.toString(), fixedDepositAccountId.toString(), SUBMITTED_ON_DATE, VALID_FROM, VALID_TO, DAYS_360,
|
fixedDepositProductId.toString(), fixedDepositAccountId.toString(), SUBMITTED_ON_DATE, VALID_FROM, VALID_TO, DAYS_360,
|
||||||
TILL_PREMATURE_WITHDRAWAL, INTEREST_CALCULATION_USING_DAILY_BALANCE, MONTHLY, MONTHLY);
|
TILL_PREMATURE_WITHDRAWAL, INTEREST_CALCULATION_USING_DAILY_BALANCE, MONTHLY, MONTHLY);
|
||||||
|
|
||||||
@@ -1736,7 +1731,7 @@ public class FixedDepositTest {
|
|||||||
principal += interestPerMonth;
|
principal += interestPerMonth;
|
||||||
System.out.println("principal = " + principal);
|
System.out.println("principal = " + principal);
|
||||||
|
|
||||||
HashMap fixedDepositPrematureData = this.fixedDepositAccountHelper.calculatePrematureAmountForFixedDeposit(fixedDepositAccountId,
|
this.fixedDepositAccountHelper.calculatePrematureAmountForFixedDeposit(fixedDepositAccountId,
|
||||||
CLOSED_ON_DATE);
|
CLOSED_ON_DATE);
|
||||||
|
|
||||||
Integer prematureClosureTransactionId = (Integer) this.fixedDepositAccountHelper.prematureCloseForFixedDeposit(
|
Integer prematureClosureTransactionId = (Integer) this.fixedDepositAccountHelper.prematureCloseForFixedDeposit(
|
||||||
@@ -1779,8 +1774,8 @@ public class FixedDepositTest {
|
|||||||
todaysDate.add(Calendar.DATE, -(currentDate - 1));
|
todaysDate.add(Calendar.DATE, -(currentDate - 1));
|
||||||
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
|
dateFormat.format(todaysDate.getTime());
|
||||||
final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
|
monthDayFormat.format(todaysDate.getTime());
|
||||||
|
|
||||||
Integer clientId = ClientHelper.createClient(this.requestSpec, this.responseSpec);
|
Integer clientId = ClientHelper.createClient(this.requestSpec, this.responseSpec);
|
||||||
Assert.assertNotNull(clientId);
|
Assert.assertNotNull(clientId);
|
||||||
@@ -1793,7 +1788,7 @@ public class FixedDepositTest {
|
|||||||
WHOLE_TERM);
|
WHOLE_TERM);
|
||||||
Assert.assertNotNull(fixedDepositAccountId);
|
Assert.assertNotNull(fixedDepositAccountId);
|
||||||
|
|
||||||
HashMap modificationsHashMap = this.fixedDepositAccountHelper.updateInterestCalculationConfigForFixedDeposit(clientId.toString(),
|
this.fixedDepositAccountHelper.updateInterestCalculationConfigForFixedDeposit(clientId.toString(),
|
||||||
fixedDepositProductId.toString(), fixedDepositAccountId.toString(), SUBMITTED_ON_DATE, VALID_FROM, VALID_TO, DAYS_365,
|
fixedDepositProductId.toString(), fixedDepositAccountId.toString(), SUBMITTED_ON_DATE, VALID_FROM, VALID_TO, DAYS_365,
|
||||||
WHOLE_TERM, INTEREST_CALCULATION_USING_DAILY_BALANCE, DAILY, MONTHLY);
|
WHOLE_TERM, INTEREST_CALCULATION_USING_DAILY_BALANCE, DAILY, MONTHLY);
|
||||||
|
|
||||||
@@ -1820,7 +1815,7 @@ public class FixedDepositTest {
|
|||||||
System.out.println("per day = " + perDay);
|
System.out.println("per day = " + perDay);
|
||||||
double interestPerDay = interestRateInFraction * perDay;
|
double interestPerDay = interestRateInFraction * perDay;
|
||||||
|
|
||||||
Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
|
todaysDate.getActualMaximum(Calendar.DATE);
|
||||||
|
|
||||||
principal = this.fixedDepositAccountHelper.getPrincipalAfterCompoundingInterest(todaysDate, principal, depositPeriod,
|
principal = this.fixedDepositAccountHelper.getPrincipalAfterCompoundingInterest(todaysDate, principal, depositPeriod,
|
||||||
interestPerDay, DAILY_COMPOUNDING_INTERVAL, MONTHLY_INTERVAL);
|
interestPerDay, DAILY_COMPOUNDING_INTERVAL, MONTHLY_INTERVAL);
|
||||||
@@ -1855,8 +1850,8 @@ public class FixedDepositTest {
|
|||||||
todaysDate.add(Calendar.DATE, -(currentDate - 1));
|
todaysDate.add(Calendar.DATE, -(currentDate - 1));
|
||||||
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
|
dateFormat.format(todaysDate.getTime());
|
||||||
final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
|
monthDayFormat.format(todaysDate.getTime());
|
||||||
|
|
||||||
System.out.println("Submitted Date:" + SUBMITTED_ON_DATE);
|
System.out.println("Submitted Date:" + SUBMITTED_ON_DATE);
|
||||||
Integer clientId = ClientHelper.createClient(this.requestSpec, this.responseSpec);
|
Integer clientId = ClientHelper.createClient(this.requestSpec, this.responseSpec);
|
||||||
@@ -1870,7 +1865,7 @@ public class FixedDepositTest {
|
|||||||
WHOLE_TERM);
|
WHOLE_TERM);
|
||||||
Assert.assertNotNull(fixedDepositAccountId);
|
Assert.assertNotNull(fixedDepositAccountId);
|
||||||
|
|
||||||
HashMap modificationsHashMap = this.fixedDepositAccountHelper.updateInterestCalculationConfigForFixedDeposit(clientId.toString(),
|
this.fixedDepositAccountHelper.updateInterestCalculationConfigForFixedDeposit(clientId.toString(),
|
||||||
fixedDepositProductId.toString(), fixedDepositAccountId.toString(), SUBMITTED_ON_DATE, VALID_FROM, VALID_TO, DAYS_360,
|
fixedDepositProductId.toString(), fixedDepositAccountId.toString(), SUBMITTED_ON_DATE, VALID_FROM, VALID_TO, DAYS_360,
|
||||||
WHOLE_TERM, INTEREST_CALCULATION_USING_DAILY_BALANCE, DAILY, MONTHLY);
|
WHOLE_TERM, INTEREST_CALCULATION_USING_DAILY_BALANCE, DAILY, MONTHLY);
|
||||||
|
|
||||||
@@ -1897,7 +1892,7 @@ public class FixedDepositTest {
|
|||||||
System.out.println("per day = " + perDay);
|
System.out.println("per day = " + perDay);
|
||||||
double interestPerDay = interestRateInFraction * perDay;
|
double interestPerDay = interestRateInFraction * perDay;
|
||||||
|
|
||||||
Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
|
todaysDate.getActualMaximum(Calendar.DATE);
|
||||||
|
|
||||||
principal = this.fixedDepositAccountHelper.getPrincipalAfterCompoundingInterest(todaysDate, principal, depositPeriod,
|
principal = this.fixedDepositAccountHelper.getPrincipalAfterCompoundingInterest(todaysDate, principal, depositPeriod,
|
||||||
interestPerDay, DAILY_COMPOUNDING_INTERVAL, MONTHLY_INTERVAL);
|
interestPerDay, DAILY_COMPOUNDING_INTERVAL, MONTHLY_INTERVAL);
|
||||||
@@ -1937,7 +1932,7 @@ public class FixedDepositTest {
|
|||||||
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
|
final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
|
monthDayFormat.format(todaysDate.getTime());
|
||||||
|
|
||||||
Integer clientId = ClientHelper.createClient(this.requestSpec, this.responseSpec);
|
Integer clientId = ClientHelper.createClient(this.requestSpec, this.responseSpec);
|
||||||
Assert.assertNotNull(clientId);
|
Assert.assertNotNull(clientId);
|
||||||
@@ -1950,7 +1945,7 @@ public class FixedDepositTest {
|
|||||||
WHOLE_TERM);
|
WHOLE_TERM);
|
||||||
Assert.assertNotNull(fixedDepositAccountId);
|
Assert.assertNotNull(fixedDepositAccountId);
|
||||||
|
|
||||||
HashMap modificationsHashMap = this.fixedDepositAccountHelper.updateInterestCalculationConfigForFixedDeposit(clientId.toString(),
|
this.fixedDepositAccountHelper.updateInterestCalculationConfigForFixedDeposit(clientId.toString(),
|
||||||
fixedDepositProductId.toString(), fixedDepositAccountId.toString(), SUBMITTED_ON_DATE, VALID_FROM, VALID_TO, DAYS_365,
|
fixedDepositProductId.toString(), fixedDepositAccountId.toString(), SUBMITTED_ON_DATE, VALID_FROM, VALID_TO, DAYS_365,
|
||||||
WHOLE_TERM, INTEREST_CALCULATION_USING_DAILY_BALANCE, DAILY, ANNUALLY);
|
WHOLE_TERM, INTEREST_CALCULATION_USING_DAILY_BALANCE, DAILY, ANNUALLY);
|
||||||
|
|
||||||
@@ -2021,7 +2016,7 @@ public class FixedDepositTest {
|
|||||||
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
|
final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
|
monthDayFormat.format(todaysDate.getTime());
|
||||||
|
|
||||||
Integer clientId = ClientHelper.createClient(this.requestSpec, this.responseSpec);
|
Integer clientId = ClientHelper.createClient(this.requestSpec, this.responseSpec);
|
||||||
Assert.assertNotNull(clientId);
|
Assert.assertNotNull(clientId);
|
||||||
@@ -2034,7 +2029,7 @@ public class FixedDepositTest {
|
|||||||
WHOLE_TERM);
|
WHOLE_TERM);
|
||||||
Assert.assertNotNull(fixedDepositAccountId);
|
Assert.assertNotNull(fixedDepositAccountId);
|
||||||
|
|
||||||
HashMap modificationsHashMap = this.fixedDepositAccountHelper.updateInterestCalculationConfigForFixedDeposit(clientId.toString(),
|
this.fixedDepositAccountHelper.updateInterestCalculationConfigForFixedDeposit(clientId.toString(),
|
||||||
fixedDepositProductId.toString(), fixedDepositAccountId.toString(), SUBMITTED_ON_DATE, VALID_FROM, VALID_TO, DAYS_360,
|
fixedDepositProductId.toString(), fixedDepositAccountId.toString(), SUBMITTED_ON_DATE, VALID_FROM, VALID_TO, DAYS_360,
|
||||||
WHOLE_TERM, INTEREST_CALCULATION_USING_DAILY_BALANCE, DAILY, ANNUALLY);
|
WHOLE_TERM, INTEREST_CALCULATION_USING_DAILY_BALANCE, DAILY, ANNUALLY);
|
||||||
|
|
||||||
@@ -2105,8 +2100,8 @@ public class FixedDepositTest {
|
|||||||
final String VALID_TO = null;
|
final String VALID_TO = null;
|
||||||
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
|
dateFormat.format(todaysDate.getTime());
|
||||||
final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
|
monthDayFormat.format(todaysDate.getTime());
|
||||||
|
|
||||||
Integer clientId = ClientHelper.createClient(this.requestSpec, this.responseSpec);
|
Integer clientId = ClientHelper.createClient(this.requestSpec, this.responseSpec);
|
||||||
Assert.assertNotNull(clientId);
|
Assert.assertNotNull(clientId);
|
||||||
@@ -2119,7 +2114,7 @@ public class FixedDepositTest {
|
|||||||
WHOLE_TERM);
|
WHOLE_TERM);
|
||||||
Assert.assertNotNull(fixedDepositAccountId);
|
Assert.assertNotNull(fixedDepositAccountId);
|
||||||
|
|
||||||
HashMap modificationsHashMap = this.fixedDepositAccountHelper.updateInterestCalculationConfigForFixedDeposit(clientId.toString(),
|
this.fixedDepositAccountHelper.updateInterestCalculationConfigForFixedDeposit(clientId.toString(),
|
||||||
fixedDepositProductId.toString(), fixedDepositAccountId.toString(), SUBMITTED_ON_DATE, VALID_FROM, VALID_TO, DAYS_365,
|
fixedDepositProductId.toString(), fixedDepositAccountId.toString(), SUBMITTED_ON_DATE, VALID_FROM, VALID_TO, DAYS_365,
|
||||||
WHOLE_TERM, INTEREST_CALCULATION_USING_DAILY_BALANCE, BI_ANNUALLY, BI_ANNUALLY);
|
WHOLE_TERM, INTEREST_CALCULATION_USING_DAILY_BALANCE, BI_ANNUALLY, BI_ANNUALLY);
|
||||||
|
|
||||||
@@ -2187,8 +2182,8 @@ public class FixedDepositTest {
|
|||||||
final String VALID_TO = null;
|
final String VALID_TO = null;
|
||||||
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
|
dateFormat.format(todaysDate.getTime());
|
||||||
final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
|
monthDayFormat.format(todaysDate.getTime());
|
||||||
|
|
||||||
Integer clientId = ClientHelper.createClient(this.requestSpec, this.responseSpec);
|
Integer clientId = ClientHelper.createClient(this.requestSpec, this.responseSpec);
|
||||||
Assert.assertNotNull(clientId);
|
Assert.assertNotNull(clientId);
|
||||||
@@ -2201,7 +2196,7 @@ public class FixedDepositTest {
|
|||||||
WHOLE_TERM);
|
WHOLE_TERM);
|
||||||
Assert.assertNotNull(fixedDepositAccountId);
|
Assert.assertNotNull(fixedDepositAccountId);
|
||||||
|
|
||||||
HashMap modificationsHashMap = this.fixedDepositAccountHelper.updateInterestCalculationConfigForFixedDeposit(clientId.toString(),
|
this.fixedDepositAccountHelper.updateInterestCalculationConfigForFixedDeposit(clientId.toString(),
|
||||||
fixedDepositProductId.toString(), fixedDepositAccountId.toString(), SUBMITTED_ON_DATE, VALID_FROM, VALID_TO, DAYS_360,
|
fixedDepositProductId.toString(), fixedDepositAccountId.toString(), SUBMITTED_ON_DATE, VALID_FROM, VALID_TO, DAYS_360,
|
||||||
WHOLE_TERM, INTEREST_CALCULATION_USING_DAILY_BALANCE, BI_ANNUALLY, BI_ANNUALLY);
|
WHOLE_TERM, INTEREST_CALCULATION_USING_DAILY_BALANCE, BI_ANNUALLY, BI_ANNUALLY);
|
||||||
|
|
||||||
@@ -2269,8 +2264,8 @@ public class FixedDepositTest {
|
|||||||
final String VALID_TO = null;
|
final String VALID_TO = null;
|
||||||
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
|
dateFormat.format(todaysDate.getTime());
|
||||||
final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
|
monthDayFormat.format(todaysDate.getTime());
|
||||||
|
|
||||||
Integer clientId = ClientHelper.createClient(this.requestSpec, this.responseSpec);
|
Integer clientId = ClientHelper.createClient(this.requestSpec, this.responseSpec);
|
||||||
Assert.assertNotNull(clientId);
|
Assert.assertNotNull(clientId);
|
||||||
@@ -2283,7 +2278,7 @@ public class FixedDepositTest {
|
|||||||
WHOLE_TERM);
|
WHOLE_TERM);
|
||||||
Assert.assertNotNull(fixedDepositAccountId);
|
Assert.assertNotNull(fixedDepositAccountId);
|
||||||
|
|
||||||
HashMap modificationsHashMap = this.fixedDepositAccountHelper.updateInterestCalculationConfigForFixedDeposit(clientId.toString(),
|
this.fixedDepositAccountHelper.updateInterestCalculationConfigForFixedDeposit(clientId.toString(),
|
||||||
fixedDepositProductId.toString(), fixedDepositAccountId.toString(), SUBMITTED_ON_DATE, VALID_FROM, VALID_TO, DAYS_365,
|
fixedDepositProductId.toString(), fixedDepositAccountId.toString(), SUBMITTED_ON_DATE, VALID_FROM, VALID_TO, DAYS_365,
|
||||||
WHOLE_TERM, INTEREST_CALCULATION_USING_DAILY_BALANCE, QUARTERLY, QUARTERLY);
|
WHOLE_TERM, INTEREST_CALCULATION_USING_DAILY_BALANCE, QUARTERLY, QUARTERLY);
|
||||||
|
|
||||||
@@ -2350,8 +2345,8 @@ public class FixedDepositTest {
|
|||||||
final String VALID_TO = null;
|
final String VALID_TO = null;
|
||||||
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||||
final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
|
dateFormat.format(todaysDate.getTime());
|
||||||
final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
|
monthDayFormat.format(todaysDate.getTime());
|
||||||
|
|
||||||
Integer clientId = ClientHelper.createClient(this.requestSpec, this.responseSpec);
|
Integer clientId = ClientHelper.createClient(this.requestSpec, this.responseSpec);
|
||||||
Assert.assertNotNull(clientId);
|
Assert.assertNotNull(clientId);
|
||||||
@@ -2364,7 +2359,7 @@ public class FixedDepositTest {
|
|||||||
WHOLE_TERM);
|
WHOLE_TERM);
|
||||||
Assert.assertNotNull(fixedDepositAccountId);
|
Assert.assertNotNull(fixedDepositAccountId);
|
||||||
|
|
||||||
HashMap modificationsHashMap = this.fixedDepositAccountHelper.updateInterestCalculationConfigForFixedDeposit(clientId.toString(),
|
this.fixedDepositAccountHelper.updateInterestCalculationConfigForFixedDeposit(clientId.toString(),
|
||||||
fixedDepositProductId.toString(), fixedDepositAccountId.toString(), SUBMITTED_ON_DATE, VALID_FROM, VALID_TO, DAYS_360,
|
fixedDepositProductId.toString(), fixedDepositAccountId.toString(), SUBMITTED_ON_DATE, VALID_FROM, VALID_TO, DAYS_360,
|
||||||
WHOLE_TERM, INTEREST_CALCULATION_USING_DAILY_BALANCE, QUARTERLY, QUARTERLY);
|
WHOLE_TERM, INTEREST_CALCULATION_USING_DAILY_BALANCE, QUARTERLY, QUARTERLY);
|
||||||
|
|
||||||
@@ -2445,18 +2440,18 @@ public class FixedDepositTest {
|
|||||||
switch (chartToBePicked) {
|
switch (chartToBePicked) {
|
||||||
case "period":
|
case "period":
|
||||||
fixedDepositProductHelper = fixedDepositProductHelper.withPeriodRangeChart();
|
fixedDepositProductHelper = fixedDepositProductHelper.withPeriodRangeChart();
|
||||||
break;
|
break;
|
||||||
case "amount":
|
case "amount":
|
||||||
fixedDepositProductHelper = fixedDepositProductHelper.withAmountRangeChart();
|
fixedDepositProductHelper = fixedDepositProductHelper.withAmountRangeChart();
|
||||||
break;
|
break;
|
||||||
case "period_amount":
|
case "period_amount":
|
||||||
fixedDepositProductHelper = fixedDepositProductHelper.withPeriodAndAmountRangeChart();
|
fixedDepositProductHelper = fixedDepositProductHelper.withPeriodAndAmountRangeChart();
|
||||||
break;
|
break;
|
||||||
case "amount_period":
|
case "amount_period":
|
||||||
fixedDepositProductHelper = fixedDepositProductHelper.withAmountAndPeriodRangeChart();
|
fixedDepositProductHelper = fixedDepositProductHelper.withAmountAndPeriodRangeChart();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
final String fixedDepositProductJSON = fixedDepositProductHelper //
|
final String fixedDepositProductJSON = fixedDepositProductHelper //
|
||||||
|
|||||||
Reference in New Issue
Block a user