Merge pull request #623 from vishwasbabu/develop
fixing failing unit tests after accounting changes
This commit is contained in:
+2
-1
@@ -63,8 +63,9 @@ public class AccountingScenarioIntegrationTest {
|
|||||||
final Account assetAccount = this.accountHelper.createAssetAccount();
|
final Account assetAccount = this.accountHelper.createAssetAccount();
|
||||||
final Account incomeAccount = this.accountHelper.createIncomeAccount();
|
final Account incomeAccount = this.accountHelper.createIncomeAccount();
|
||||||
final Account expenseAccount = this.accountHelper.createExpenseAccount();
|
final Account expenseAccount = this.accountHelper.createExpenseAccount();
|
||||||
|
final Account overpaymentAccount = this.accountHelper.createLiabilityAccount();
|
||||||
|
|
||||||
final Integer loanProductID = createLoanProduct(assetAccount, incomeAccount, expenseAccount);
|
final Integer loanProductID = createLoanProduct(assetAccount, incomeAccount, expenseAccount, overpaymentAccount);
|
||||||
|
|
||||||
final Integer clientID = ClientHelper.createClient(this.requestSpec, this.responseSpec, this.DATE_OF_JOINING);
|
final Integer clientID = ClientHelper.createClient(this.requestSpec, this.responseSpec, this.DATE_OF_JOINING);
|
||||||
final Integer loanID = applyForLoanApplication(clientID, loanProductID);
|
final Integer loanID = applyForLoanApplication(clientID, loanProductID);
|
||||||
|
|||||||
+7
@@ -39,4 +39,11 @@ public class AccountHelper {
|
|||||||
return new Account(accountID, Account.AccountType.EXPENSE);
|
return new Account(accountID, Account.AccountType.EXPENSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Account createLiabilityAccount() {
|
||||||
|
final String assetAccountJSON = new GLAccountBuilder().withAccountTypeAsLiability().build();
|
||||||
|
final Integer accountID = Utils.performServerPost(this.requestSpec, this.responseSpec, this.CREATE_GL_ACCOUNT_URL,
|
||||||
|
assetAccountJSON, this.GL_ACCOUNT_ID_RESPONSE);
|
||||||
|
return new Account(accountID, Account.AccountType.LIABILITY);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+8
@@ -209,6 +209,10 @@ public class LoanProductTestBuilder {
|
|||||||
final String ID = this.accountList[i].getAccountID().toString();
|
final String ID = this.accountList[i].getAccountID().toString();
|
||||||
map.put("writeOffAccountId", ID);
|
map.put("writeOffAccountId", ID);
|
||||||
}
|
}
|
||||||
|
if (this.accountList[i].getAccountType().equals(Account.AccountType.LIABILITY)) {
|
||||||
|
final String ID = this.accountList[i].getAccountID().toString();
|
||||||
|
map.put("overpaymentLiabilityAccountId", ID);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
@@ -236,6 +240,10 @@ public class LoanProductTestBuilder {
|
|||||||
final String ID = this.accountList[i].getAccountID().toString();
|
final String ID = this.accountList[i].getAccountID().toString();
|
||||||
map.put("writeOffAccountId", ID);
|
map.put("writeOffAccountId", ID);
|
||||||
}
|
}
|
||||||
|
if (this.accountList[i].getAccountType().equals(Account.AccountType.LIABILITY)) {
|
||||||
|
final String ID = this.accountList[i].getAccountID().toString();
|
||||||
|
map.put("overpaymentLiabilityAccountId", ID);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return map;
|
return map;
|
||||||
|
|||||||
Reference in New Issue
Block a user