DeathGun44 commented on code in PR #6050:
URL: https://github.com/apache/fineract/pull/6050#discussion_r3488193236
##########
integration-tests/src/test/java/org/apache/fineract/integrationtests/client/feign/modules/LoanTestValidators.java:
##########
@@ -60,16 +60,20 @@ public static void
verifyTransactions(GetLoansLoanIdResponse loanDetails, LoanTe
return;
}
- boolean found = transactionsByDate.stream()
- .anyMatch(item ->
Objects.equals(Utils.getDoubleValue(item.getAmount()), tr.amount)
- && Objects.equals(item.getType().getValue(),
tr.type)
- &&
Objects.equals(Utils.getDoubleValue(item.getOutstandingLoanBalance()),
tr.outstandingPrincipal)
- &&
Objects.equals(Utils.getDoubleValue(item.getPrincipalPortion()),
tr.principalPortion)
- &&
Objects.equals(Utils.getDoubleValue(item.getInterestPortion()),
tr.interestPortion)
- &&
Objects.equals(Utils.getDoubleValue(item.getFeeChargesPortion()), tr.feePortion)
- &&
Objects.equals(Utils.getDoubleValue(item.getPenaltyChargesPortion()),
tr.penaltyPortion)
- &&
Objects.equals(Utils.getDoubleValue(item.getOverpaymentPortion()),
tr.overpaymentPortion)
- &&
Objects.equals(Utils.getDoubleValue(item.getUnrecognizedIncomePortion()),
tr.unrecognizedPortion));
+ boolean found = transactionsByDate.stream().anyMatch(item ->
Objects.equals(Utils.getDoubleValue(item.getAmount()), tr.amount)
Review Comment:
you're right the (field == null || equals(...)) pattern changed semantics
from “must be null” to “don’t care”. Reverted and also added a separate
Transaction overload (same pattern as the base class’s simple Transaction
verify path) so we only check amount/type/date when portions aren’t specified.
--
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]