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


##########
integration-tests/src/test/java/org/apache/fineract/integrationtests/FixedDepositTest.java:
##########
@@ -126,6 +137,65 @@ public void setup() {
         TimeZone.setDefault(TimeZone.getTimeZone(Utils.TENANT_TIME_ZONE));
     }
 
+    /***
+     * Test case for Fixed Deposit Account Interest Calculation
+     */
+    @Test
+    public void 
testFixedDepositInterestCalculationWithWrongCompoundingPeriod() {
+        JsonObject jsonObject = new JsonObject();
+        jsonObject.addProperty("principalAmount", 100);
+        jsonObject.addProperty("annualInterestRate", 5);
+        jsonObject.addProperty("tenureInMonths", 12);
+        jsonObject.addProperty("interestPostingPeriodInMonths", 3);
+        jsonObject.addProperty("interestCompoundingPeriodInMonths", 7);
+        JsonParser parser = new JsonParser();
+        String apiRequestBodyAsJson = jsonObject.toString();
+        JsonElement element = parser.parse(apiRequestBodyAsJson);
+        fixedDepositAccountInterestCalculationServiceImpl = new 
FixedDepositAccountInterestCalculationServiceImpl(
+                new DepositAccountDataValidator(new FromJsonHelper(), null), 
new FromJsonHelper());
+
+        assertThrows(PlatformApiDataValidationException.class, () -> 
fixedDepositAccountInterestCalculationServiceImpl

Review Comment:
   Please validate the thrown error message!



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