peter-kovacs-dpc commented on code in PR #5837:
URL: https://github.com/apache/fineract/pull/5837#discussion_r3265630045


##########
fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/WorkingCapitalLoanAccountStepDef.java:
##########
@@ -2728,19 +2730,26 @@ public void 
verifyMultipleWorkingCapitalLoanTransactionsJournalEntries(int expec
     public void 
verifyReversedWorkingCapitalLoanTransactionJournalEntries(String 
transactionType, String transactionDate, DataTable table)
             throws IOException {
         Long loanId = getCreatedLoanId();
-        List<GetWorkingCapitalLoanTransactionIdResponse> transactionsMatch = 
findMatchingTransactions(loanId, transactionType,
+        TransactionType resolvedTransactionType = 
resolveTransactionType(transactionType);
+        List<GetWorkingCapitalLoanTransactionIdResponse> transactionsMatch = 
findMatchingTransactions(loanId, resolvedTransactionType,
                 transactionDate, true);
         verifyJournalEntries(transactionsMatch, loanId, table);
     }
 
-    private List<GetWorkingCapitalLoanTransactionIdResponse> 
findMatchingTransactions(Long loanId, String transactionType,
+    private TransactionType resolveTransactionType(String transactionType) {
+        return Arrays.stream(TransactionType.values()).filter(t -> 
t.name().equalsIgnoreCase(transactionType.replace(" ", "_"))).findFirst()

Review Comment:
   done



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