FINERACT-2421: Move E2E init data into runner

This commit is contained in:
Adam Saghy
2026-01-16 10:37:26 +01:00
parent ea1609120f
commit 0f73ae1eb7
19 changed files with 12 additions and 13 deletions
@@ -143,7 +143,6 @@ import org.apache.fineract.test.helper.BusinessDateHelper;
import org.apache.fineract.test.helper.CodeHelper; import org.apache.fineract.test.helper.CodeHelper;
import org.apache.fineract.test.helper.ErrorMessageHelper; import org.apache.fineract.test.helper.ErrorMessageHelper;
import org.apache.fineract.test.helper.Utils; import org.apache.fineract.test.helper.Utils;
import org.apache.fineract.test.initializer.global.LoanProductGlobalInitializerStep;
import org.apache.fineract.test.messaging.EventAssertion; import org.apache.fineract.test.messaging.EventAssertion;
import org.apache.fineract.test.messaging.config.EventProperties; import org.apache.fineract.test.messaging.config.EventProperties;
import org.apache.fineract.test.messaging.config.JobPollingProperties; import org.apache.fineract.test.messaging.config.JobPollingProperties;
@@ -3213,8 +3212,8 @@ public class LoanStepDef extends AbstractStepDef {
if (transactionTypeToChange.equals(transactionTypeOriginal)) { if (transactionTypeToChange.equals(transactionTypeOriginal)) {
futureInstallmentAllocationRule = futureInstallmentAllocationRuleNew; futureInstallmentAllocationRule = futureInstallmentAllocationRuleNew;
} }
newPaymentAllocation.add(LoanProductGlobalInitializerStep.editPaymentAllocationFutureInstallment(transactionTypeOriginal, newPaymentAllocation.add(editPaymentAllocationFutureInstallment(transactionTypeOriginal, futureInstallmentAllocationRule,
futureInstallmentAllocationRule, paymentAllocationOrder)); paymentAllocationOrder));
}); });
PutLoanProductsProductIdRequest putLoanProductsProductIdRequest = new PutLoanProductsProductIdRequest() PutLoanProductsProductIdRequest putLoanProductsProductIdRequest = new PutLoanProductsProductIdRequest()
@@ -5907,4 +5906,14 @@ public class LoanStepDef extends AbstractStepDef {
assertEquals(Integer.valueOf(numberOfRelations), relationshipOptional.size(), "Missed relationship for transaction"); assertEquals(Integer.valueOf(numberOfRelations), relationshipOptional.size(), "Missed relationship for transaction");
} }
public static AdvancedPaymentData editPaymentAllocationFutureInstallment(String transactionType, String futureInstallmentAllocationRule,
List<PaymentAllocationOrder> paymentAllocationOrder) {
AdvancedPaymentData advancedPaymentData = new AdvancedPaymentData();
advancedPaymentData.setTransactionType(transactionType);
advancedPaymentData.setFutureInstallmentAllocationRule(futureInstallmentAllocationRule);
advancedPaymentData.setPaymentAllocationOrder(paymentAllocationOrder);
return advancedPaymentData;
}
} }
@@ -4485,16 +4485,6 @@ public class LoanProductGlobalInitializerStep implements FineractGlobalInitializ
return advancedPaymentData; return advancedPaymentData;
} }
public static AdvancedPaymentData editPaymentAllocationFutureInstallment(String transactionType, String futureInstallmentAllocationRule,
List<PaymentAllocationOrder> paymentAllocationOrder) {
AdvancedPaymentData advancedPaymentData = new AdvancedPaymentData();
advancedPaymentData.setTransactionType(transactionType);
advancedPaymentData.setFutureInstallmentAllocationRule(futureInstallmentAllocationRule);
advancedPaymentData.setPaymentAllocationOrder(paymentAllocationOrder);
return advancedPaymentData;
}
private static CreditAllocationData createCreditAllocation(String transactionType, List<String> creditAllocationRules) { private static CreditAllocationData createCreditAllocation(String transactionType, List<String> creditAllocationRules) {
CreditAllocationData creditAllocationData = new CreditAllocationData(); CreditAllocationData creditAllocationData = new CreditAllocationData();
creditAllocationData.setTransactionType(transactionType); creditAllocationData.setTransactionType(transactionType);