executeAndAwaitJob() instead executeJob() in un-ignored FixedDepositTest

re. FINERACT-950 and FINERACT-922
This commit is contained in:
Michael Vorburger
2020-06-03 01:59:14 +01:00
committed by Yemdjih Kaze Nasser
parent 140435bca4
commit 0c6903fc36
@@ -510,7 +510,7 @@ public class FixedDepositTest {
SchedulerJobHelper schedulerJobHelper = new SchedulerJobHelper(requestSpec);
String JobName = "Update Deposit Accounts Maturity details";
schedulerJobHelper.executeJob(JobName);
schedulerJobHelper.executeAndAwaitJob(JobName);
HashMap accountDetails = this.fixedDepositAccountHelper.getFixedDepositAccountById(this.requestSpec, this.responseSpec,
fixedDepositAccountId);
@@ -1493,7 +1493,7 @@ public class FixedDepositTest {
Float interestPerMonth = (float) (interestPerDay * principal * daysInMonth);
principal += interestPerMonth;
todaysDate.add(Calendar.DATE, daysInMonth);
LOG.info("{}",monthDayFormat.format(todaysDate.getTime()));
LOG.info("{}",monthDayFormat.format(todaysDate.getTime()));
interestPerMonth = (float) (interestPerDay * principal * currentDate);
LOG.info("IPM = {}" , interestPerMonth);
@@ -1604,7 +1604,7 @@ public class FixedDepositTest {
Float interestPerMonth = (float) (interestPerDay * principal * daysInMonth);
principal += interestPerMonth;
todaysDate.add(Calendar.DATE, daysInMonth);
LOG.info("{}",monthDayFormat.format(todaysDate.getTime()));
LOG.info("{}",monthDayFormat.format(todaysDate.getTime()));
interestPerMonth = (float) (interestPerDay * principal * currentDate);
LOG.info("IPM = {}" , interestPerMonth);
@@ -1719,7 +1719,7 @@ public class FixedDepositTest {
Float interestPerMonth = (float) (interestPerDay * principal * daysInMonth);
principal += interestPerMonth;
todaysDate.add(Calendar.DATE, daysInMonth);
LOG.info("{}",monthDayFormat.format(todaysDate.getTime()));
LOG.info("{}",monthDayFormat.format(todaysDate.getTime()));
interestPerMonth = (float) (interestPerDay * principal * currentDate);
LOG.info("IPM = {}" , interestPerMonth);
@@ -2404,7 +2404,7 @@ public class FixedDepositTest {
final Account liabilityAccount = this.accountHelper.createLiabilityAccount();
DateFormat dateFormat = new SimpleDateFormat("dd MMMM yyyy", Locale.US);
DateFormat monthDayFormat = new SimpleDateFormat("dd MMM", Locale.US);
new SimpleDateFormat("dd MMM", Locale.US);
DateFormat currentDateFormat = new SimpleDateFormat("dd");
Calendar todaysDate = Calendar.getInstance();
@@ -2418,14 +2418,11 @@ public class FixedDepositTest {
final String SUBMITTED_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 MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
Integer numberOfDaysLeft = (daysInMonth - currentDate) + 1;
todaysDate.add(Calendar.DATE, numberOfDaysLeft);
final String INTEREST_POSTED_DATE = dateFormat.format(todaysDate.getTime());
final String CLOSED_ON_DATE = dateFormat.format(Calendar.getInstance().getTime());
Integer clientId = ClientHelper.createClient(this.requestSpec, this.responseSpec);
Assert.assertNotNull(clientId);
@@ -2489,7 +2486,7 @@ public class FixedDepositTest {
final Account liabilityAccount = this.accountHelper.createLiabilityAccount();
DateFormat dateFormat = new SimpleDateFormat("dd MMMM yyyy", Locale.US);
DateFormat monthDayFormat = new SimpleDateFormat("dd MMM", Locale.US);
new SimpleDateFormat("dd MMM", Locale.US);
DateFormat currentDateFormat = new SimpleDateFormat("dd");
Calendar todaysDate = Calendar.getInstance();
@@ -2503,14 +2500,11 @@ public class FixedDepositTest {
final String SUBMITTED_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 MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
Integer numberOfDaysLeft = (daysInMonth - currentDate) + 1;
todaysDate.add(Calendar.DATE, numberOfDaysLeft);
final String INTEREST_POSTED_DATE = dateFormat.format(todaysDate.getTime());
final String CLOSED_ON_DATE = dateFormat.format(Calendar.getInstance().getTime());
Integer clientId = ClientHelper.createClient(this.requestSpec, this.responseSpec);
Assert.assertNotNull(clientId);
@@ -2624,7 +2618,7 @@ public class FixedDepositTest {
}
private Integer applyForFixedDepositApplication(final String clientID, final String productID, final String submittedOnDate,
final String penalInterestType, final Integer maturityInstructionId) {
final String penalInterestType, final Integer maturityInstructionId) {
LOG.info("--------------------------------APPLYING FOR FIXED DEPOSIT ACCOUNT --------------------------------");
final String fixedDepositApplicationJSON = new FixedDepositAccountHelper(this.requestSpec, this.responseSpec) //
.withSubmittedOnDate(submittedOnDate)