adamsaghy commented on code in PR #5900:
URL: https://github.com/apache/fineract/pull/5900#discussion_r3348782830


##########
integration-tests/src/test/java/org/apache/fineract/integrationtests/common/accounting/AccountRuleHelper.java:
##########
@@ -18,54 +18,28 @@
  */
 package org.apache.fineract.integrationtests.common.accounting;
 
-import com.google.common.reflect.TypeToken;
-import com.google.gson.Gson;
-import io.restassured.specification.RequestSpecification;
-import io.restassured.specification.ResponseSpecification;
-import java.lang.reflect.Type;
+import static org.apache.fineract.client.feign.util.FeignCalls.ok;
+
 import java.util.ArrayList;
+import org.apache.fineract.client.models.AccountRuleRequest;
 import org.apache.fineract.client.models.AccountingRuleData;
 import org.apache.fineract.client.models.PostAccountingRulesResponse;
-import org.apache.fineract.client.util.JSON;
+import org.apache.fineract.integrationtests.common.FineractFeignClientHelper;
 import org.apache.fineract.integrationtests.common.Utils;
 
-public class AccountRuleHelper {
-
-    private static final Gson GSON = new JSON().getGson();
-
-    private static final String ACCOUNTINGRULES_URL = 
"/fineract-provider/api/v1/accountingrules?" + Utils.TENANT_IDENTIFIER;
+public final class AccountRuleHelper {
 
-    private final RequestSpecification requestSpec;
-    private final ResponseSpecification responseSpec;
+    private AccountRuleHelper() {}
 
-    // TODO: Rewrite to use fineract-client instead!
-    // Example: 
org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long,
-    // org.apache.fineract.client.models.PostLoansLoanIdRequest)
-    @Deprecated(forRemoval = true)
-    public AccountRuleHelper(final RequestSpecification requestSpec, final 
ResponseSpecification responseSpec) {
-        this.requestSpec = requestSpec;
-        this.responseSpec = responseSpec;
+    public static ArrayList<AccountingRuleData> getAccountingRules() {
+        return new ArrayList<>(ok(() -> 
FineractFeignClientHelper.getFineractFeignClient().accountingRules().retrieveAllAccountingRules()));

Review Comment:
   No need to rewrap into a list. Change the return datatype to `List`



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