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