alberto-art3ch commented on code in PR #3973:
URL: https://github.com/apache/fineract/pull/3973#discussion_r1679540088


##########
integration-tests/src/test/java/org/apache/fineract/integrationtests/savings/accrual/SavingsAccrualAccountingTest.java:
##########
@@ -0,0 +1,184 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.integrationtests.savings.accrual;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+import io.restassured.builder.RequestSpecBuilder;
+import io.restassured.builder.ResponseSpecBuilder;
+import io.restassured.http.ContentType;
+import io.restassured.specification.RequestSpecification;
+import io.restassured.specification.ResponseSpecification;
+import java.math.BigDecimal;
+import java.time.LocalDate;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Optional;
+import java.util.concurrent.atomic.AtomicLong;
+import org.apache.fineract.client.models.GetSavingsAccountsAccountIdResponse;
+import org.apache.fineract.client.models.GetSavingsAccountsTransaction;
+import org.apache.fineract.client.models.PostSavingsAccountTransactionsRequest;
+import 
org.apache.fineract.client.models.PostSavingsAccountTransactionsResponse;
+import org.apache.fineract.client.models.PostSavingsAccountsRequest;
+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.integrationtests.BaseSavingsIntegrationTest;
+import org.apache.fineract.integrationtests.common.BusinessDateHelper;
+import org.apache.fineract.integrationtests.common.ClientHelper;
+import org.apache.fineract.integrationtests.common.SchedulerJobHelper;
+import org.apache.fineract.integrationtests.common.Utils;
+import org.apache.fineract.integrationtests.common.accounting.Account;
+import org.apache.fineract.integrationtests.common.accounting.AccountHelper;
+import 
org.apache.fineract.integrationtests.common.accounting.JournalEntryHelper;
+import 
org.apache.fineract.integrationtests.common.savings.SavingsAccountHelper;
+import 
org.apache.fineract.integrationtests.common.savings.SavingsProductHelper;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class SavingsAccrualAccountingTest extends BaseSavingsIntegrationTest {
+
+    private static final Logger LOG = 
LoggerFactory.getLogger(SavingsAccrualAccountingTest.class);
+    private static ResponseSpecification responseSpec;
+    private static RequestSpecification requestSpec;
+    private static AccountHelper accountHelper;
+    private static BusinessDateHelper businessDateHelper;
+    private static ClientHelper clientHelper;
+    private static SavingsProductHelper savingsProductHelper;
+    private static SavingsAccountHelper savingsAccountHelper;
+    private static SchedulerJobHelper schedulerJobHelper;
+    private static JournalEntryHelper journalEntryHelper;
+
+    @BeforeAll
+    public static void setup() {
+        Utils.initializeRESTAssured();
+        requestSpec = new 
RequestSpecBuilder().setContentType(ContentType.JSON).build();
+        requestSpec.header("Authorization", "Basic " + 
Utils.loginIntoServerAndGetBase64EncodedAuthenticationKey());
+        requestSpec.header("Fineract-Platform-TenantId", "default");
+        responseSpec = new ResponseSpecBuilder().expectStatusCode(200).build();
+        businessDateHelper = new BusinessDateHelper();
+        accountHelper = new AccountHelper(requestSpec, responseSpec);
+        clientHelper = new ClientHelper(requestSpec, responseSpec);
+        savingsProductHelper = new SavingsProductHelper();
+        savingsAccountHelper = new SavingsAccountHelper(requestSpec, 
responseSpec);
+        schedulerJobHelper = new SchedulerJobHelper(requestSpec);
+        journalEntryHelper = new JournalEntryHelper(requestSpec, responseSpec);
+    }
+
+    // UC1: Simple Savings account creation with Accrual Accounting enabled
+    // 1. Create a client account
+    // 2. Create a Savings product with Accrual accounting enabled
+    // 3. Create a Savings account
+    // 4. Approve and Activate the Savings account
+    // 5. Add a Deposit
+    // 6.

Review Comment:
   Done! Comments updated
   
   ```
       // UC1: Simple Savings account creation with Accrual Accounting enabled
       // 1. Create a client account
       // 2. Create a Savings product with Accrual accounting enabled
       // 3. Create a Savings account
       // 4. Approve and Activate the Savings account
       // 5. Add a Deposit and validate the account balance
       // ------ Using a second business date
       // 6. Add a second Deposit transaction to have other balance
       // 7. Run the new batch job to Add the Accrual transactions in the 
Savings account
       // 8. Get the Savings details to:
       //    a) Validate the accrued till date
       //    b) Validate the total amount of the accrual transactions generated
       //    c) Validate the Journal Entry of the first Accrual transaction 
generated
   ```



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