Aman-Mittal commented on code in PR #5240:
URL: https://github.com/apache/fineract/pull/5240#discussion_r2631692490


##########
fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanReAgingStepDef.java:
##########
@@ -224,26 +114,18 @@ public void checkLoanReAmortizeBusinessEventCreated() {
     }
 
     @When("Admin fails to create a Loan re-aging transaction with status code 
{int} error {string} and with the following data:")
-    public void adminFailsToCreateReAgingTransactionWithError(final int 
statusCode, final String expectedError, final DataTable table)
-            throws IOException {
+    public void adminFailsToCreateReAgingTransactionWithError(final int 
statusCode, final String expectedError, final DataTable table) {
         final PostLoansResponse loanResponse = 
testContext().get(TestContextKey.LOAN_CREATE_RESPONSE);
         final long loanId = loanResponse.getLoanId();
 

Review Comment:
   ` ```
   PostLoansLoanIdTransactionsRequest reAgingRequest = 
setReAgeingRequestProperties(//
                   LoanRequestFactory.defaultReAgingRequest(), //
                   table.row(0), //
                   table.row(1) //
           );
   
           CallFailedRuntimeException exception = fail(
                   () -> 
fineractClient.loanTransactions().executeLoanTransaction(loanId, 
reAgingRequest, Map.of("command", "reAge")));
           
assertThat(exception.getStatus()).as(ErrorMessageHelper.dateFailureErrorCodeMsg()).isEqualTo(403);`
   ```
   
   this code is being duplicated many times in this test file, is it possible 
if we can create a helper function so that we can reuse this multiple times for 
better maintainability?



-- 
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]

Reply via email to