DeathGun44 commented on code in PR #6084:
URL: https://github.com/apache/fineract/pull/6084#discussion_r3535456260
##########
integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanChargeOffAccountingTest.java:
##########
@@ -68,39 +69,45 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
-public class LoanChargeOffAccountingTest extends BaseLoanIntegrationTest {
+public class LoanChargeOffAccountingTest extends FeignLoanTestBase {
- private ResponseSpecification responseSpec;
- private RequestSpecification requestSpec;
- private ClientHelper clientHelper;
- private LoanTransactionHelper loanTransactionHelper;
- private JournalEntryHelper journalEntryHelper;
- private AccountHelper accountHelper;
- private Account assetAccount;
- private Account incomeAccount;
- private Account expenseAccount;
- private Account overpaymentAccount;
- private DateTimeFormatter dateFormatter = new
DateTimeFormatterBuilder().appendPattern("dd MMMM yyyy").toFormatter();
- private InlineLoanCOBHelper inlineLoanCOBHelper;
+ protected RequestSpecification requestSpec;
+ protected ResponseSpecification responseSpec;
+ protected LoanTransactionHelper loanTransactionHelper;
+ protected AccountHelper accountHelper;
+ protected JournalEntryHelper journalEntryHelper;
@BeforeEach
- public void setup() {
+ @SuppressWarnings("removal")
+ public void setupREST() {
Utils.initializeRESTAssured();
+
this.requestSpec = new
RequestSpecBuilder().setContentType(ContentType.JSON).build();
this.requestSpec.header("Authorization", "Basic " +
Utils.loginIntoServerAndGetBase64EncodedAuthenticationKey());
this.requestSpec.header("Fineract-Platform-TenantId", "default");
this.responseSpec = new
ResponseSpecBuilder().expectStatusCode(200).build();
+
this.loanTransactionHelper = new
LoanTransactionHelper(this.requestSpec, this.responseSpec);
this.accountHelper = new AccountHelper(this.requestSpec,
this.responseSpec);
- this.assetAccount = this.accountHelper.createAssetAccount();
- this.incomeAccount = this.accountHelper.createIncomeAccount();
- this.expenseAccount = this.accountHelper.createExpenseAccount();
- this.overpaymentAccount = this.accountHelper.createLiabilityAccount();
this.journalEntryHelper = new JournalEntryHelper(this.requestSpec,
this.responseSpec);
- this.clientHelper = new ClientHelper(this.requestSpec,
this.responseSpec);
this.inlineLoanCOBHelper = new InlineLoanCOBHelper(this.requestSpec,
this.responseSpec);
+
+ this.assetAccount = getAccounts().getLoansReceivableAccount();
+ this.incomeAccount = getAccounts().getInterestIncomeAccount();
+ this.expenseAccount = getAccounts().getChargeOffExpenseAccount();
+ this.overpaymentAccount = getAccounts().getOverpaymentAccount();
}
+ private ClientHelper clientHelper;
Review Comment:
Removed! it was dead (the createClient it fronts is a static call, so it
resolved to the parent's Feign helper anyway). Also removed a couple of dead
accountHelper fields I found in the same files.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]