This is an automated email from the ASF dual-hosted git repository.
adamsaghy pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git
The following commit(s) were added to refs/heads/develop by this push:
new 76a5ec89cc FINERACT-2181: Fix savings integration tests
76a5ec89cc is described below
commit 76a5ec89ccda35d7e338f57cc1b6840471b28f95
Author: mariiaKraievska <[email protected]>
AuthorDate: Thu Apr 10 16:49:57 2025 +0300
FINERACT-2181: Fix savings integration tests
---
.../integrationtests/savings/SavingsInterestPostingTest.java | 7 ++++---
.../integrationtests/savings/base/BaseSavingsIntegrationTest.java | 4 ++--
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git
a/integration-tests/src/test/java/org/apache/fineract/integrationtests/savings/SavingsInterestPostingTest.java
b/integration-tests/src/test/java/org/apache/fineract/integrationtests/savings/SavingsInterestPostingTest.java
index 82c074a972..867195e080 100644
---
a/integration-tests/src/test/java/org/apache/fineract/integrationtests/savings/SavingsInterestPostingTest.java
+++
b/integration-tests/src/test/java/org/apache/fineract/integrationtests/savings/SavingsInterestPostingTest.java
@@ -23,6 +23,7 @@ import java.security.SecureRandom;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.IntStream;
+import org.apache.fineract.client.models.PostSavingsAccountsResponse;
import org.apache.fineract.client.models.PostSavingsProductsRequest;
import org.apache.fineract.client.models.PostSavingsProductsResponse;
import org.apache.fineract.client.models.SavingsAccountData;
@@ -46,13 +47,13 @@ public class SavingsInterestPostingTest extends
BaseSavingsIntegrationTest {
// Create product
PostSavingsProductsRequest productsRequest =
dailyInterestPostingProduct();
PostSavingsProductsResponse product =
createProduct(productsRequest);
- Integer productId = product.getResourceId();
+ Long productId = product.getResourceId();
// Create accounts
IntStream.range(0, 200)//
- .parallel().mapToObj(i -> applySavingsRequest(clientId,
productId.longValue(), "01 January 2023"))//
+ .parallel().mapToObj(i -> applySavingsRequest(clientId,
productId, "01 January 2023"))//
.map(this::applySavingsAccount) //
- .mapToLong(savingsAccount ->
savingsAccount.getResourceId().longValue()) //
+ .mapToLong(PostSavingsAccountsResponse::getResourceId) //
.forEach(savingsId -> {
approveSavingsAccount(savingsId, "01 January 2023");
activateSavingsAccount(savingsId, "01 January 2023");
diff --git
a/integration-tests/src/test/java/org/apache/fineract/integrationtests/savings/base/BaseSavingsIntegrationTest.java
b/integration-tests/src/test/java/org/apache/fineract/integrationtests/savings/base/BaseSavingsIntegrationTest.java
index 95e5f92f1c..25d1c9068b 100644
---
a/integration-tests/src/test/java/org/apache/fineract/integrationtests/savings/base/BaseSavingsIntegrationTest.java
+++
b/integration-tests/src/test/java/org/apache/fineract/integrationtests/savings/base/BaseSavingsIntegrationTest.java
@@ -129,8 +129,8 @@ public class BaseSavingsIntegrationTest extends
IntegrationTest {
}
protected PostSavingsAccountsRequest applySavingsRequest(Long clientId,
Long productId, String submittedDate) {
- return new
PostSavingsAccountsRequest().clientId(clientId.intValue()).productId(productId.intValue()).dateFormat(DATETIME_PATTERN)
- .locale("en").submittedOnDate(submittedDate);
+ return new
PostSavingsAccountsRequest().clientId(clientId).productId(productId).dateFormat(DATETIME_PATTERN).locale("en")
+ .submittedOnDate(submittedDate);
}
protected PostSavingsAccountsResponse
applySavingsAccount(PostSavingsAccountsRequest request) {