@@ -95,6 +95,8 @@ public void scenario1() {
9595 try {
9696 globalConfigurationHelper .updateGlobalConfiguration (GlobalConfigurationConstants .ENABLE_BUSINESS_DATE ,
9797 new PutGlobalConfigurationsRequest ().enabled (true ));
98+ globalConfigurationHelper .updateGlobalConfiguration (GlobalConfigurationConstants .ALLOW_CASH_AND_NON_CASH_ACCRUAL ,
99+ new PutGlobalConfigurationsRequest ().enabled (false ));
98100 businessDateHelper .updateBusinessDate (new BusinessDateUpdateRequest ().type (BusinessDateUpdateRequest .TypeEnum .BUSINESS_DATE )
99101 .date ("2023.02.01" ).dateFormat ("yyyy.MM.dd" ).locale ("en" ));
100102
@@ -178,6 +180,8 @@ public void scenario1() {
178180 } finally {
179181 globalConfigurationHelper .updateGlobalConfiguration (GlobalConfigurationConstants .ENABLE_BUSINESS_DATE ,
180182 new PutGlobalConfigurationsRequest ().enabled (false ));
183+ globalConfigurationHelper .updateGlobalConfiguration (GlobalConfigurationConstants .ALLOW_CASH_AND_NON_CASH_ACCRUAL ,
184+ new PutGlobalConfigurationsRequest ().enabled (true ));
181185 }
182186 }
183187
@@ -202,6 +206,8 @@ public void scenario2() {
202206 new PutGlobalConfigurationsRequest ().enabled (true ));
203207 businessDateHelper .updateBusinessDate (new BusinessDateUpdateRequest ().type (BusinessDateUpdateRequest .TypeEnum .BUSINESS_DATE )
204208 .date ("2023.02.01" ).dateFormat ("yyyy.MM.dd" ).locale ("en" ));
209+ globalConfigurationHelper .updateGlobalConfiguration (GlobalConfigurationConstants .ALLOW_CASH_AND_NON_CASH_ACCRUAL ,
210+ new PutGlobalConfigurationsRequest ().enabled (false ));
205211
206212 Integer penalty = ChargesHelper .createCharges (requestSpec , responseSpec ,
207213 ChargesHelper .getLoanSpecifiedDueDateJSON (ChargesHelper .CHARGE_CALCULATION_TYPE_FLAT , "50" , true ));
@@ -291,6 +297,8 @@ public void scenario2() {
291297 } finally {
292298 globalConfigurationHelper .updateGlobalConfiguration (GlobalConfigurationConstants .ENABLE_BUSINESS_DATE ,
293299 new PutGlobalConfigurationsRequest ().enabled (false ));
300+ globalConfigurationHelper .updateGlobalConfiguration (GlobalConfigurationConstants .ALLOW_CASH_AND_NON_CASH_ACCRUAL ,
301+ new PutGlobalConfigurationsRequest ().enabled (true ));
294302 }
295303 }
296304
@@ -625,6 +633,8 @@ public void scenario6() {
625633 new PutGlobalConfigurationsRequest ().enabled (true ));
626634 businessDateHelper .updateBusinessDate (new BusinessDateUpdateRequest ().type (BusinessDateUpdateRequest .TypeEnum .BUSINESS_DATE )
627635 .date ("2023.03.01" ).dateFormat ("yyyy.MM.dd" ).locale ("en" ));
636+ globalConfigurationHelper .updateGlobalConfiguration (GlobalConfigurationConstants .ALLOW_CASH_AND_NON_CASH_ACCRUAL ,
637+ new PutGlobalConfigurationsRequest ().enabled (false ));
628638
629639 Integer fee = ChargesHelper .createCharges (requestSpec , responseSpec ,
630640 ChargesHelper .getLoanSpecifiedDueDateJSON (ChargesHelper .CHARGE_CALCULATION_TYPE_FLAT , "20" , false ));
@@ -679,6 +689,8 @@ public void scenario6() {
679689 } finally {
680690 globalConfigurationHelper .updateGlobalConfiguration (GlobalConfigurationConstants .ENABLE_BUSINESS_DATE ,
681691 new PutGlobalConfigurationsRequest ().enabled (false ));
692+ globalConfigurationHelper .updateGlobalConfiguration (GlobalConfigurationConstants .ALLOW_CASH_AND_NON_CASH_ACCRUAL ,
693+ new PutGlobalConfigurationsRequest ().enabled (true ));
682694 }
683695 }
684696
@@ -696,6 +708,8 @@ public void scenario7() {
696708 new PutGlobalConfigurationsRequest ().enabled (true ));
697709 businessDateHelper .updateBusinessDate (new BusinessDateUpdateRequest ().type (BusinessDateUpdateRequest .TypeEnum .BUSINESS_DATE )
698710 .date ("2023.01.28" ).dateFormat ("yyyy.MM.dd" ).locale ("en" ));
711+ globalConfigurationHelper .updateGlobalConfiguration (GlobalConfigurationConstants .ALLOW_CASH_AND_NON_CASH_ACCRUAL ,
712+ new PutGlobalConfigurationsRequest ().enabled (false ));
699713
700714 Integer penalty = ChargesHelper .createCharges (requestSpec , responseSpec ,
701715 ChargesHelper .getLoanSpecifiedDueDateJSON (ChargesHelper .CHARGE_CALCULATION_TYPE_FLAT , "15" , true ));
@@ -809,6 +823,8 @@ public void scenario7() {
809823 } finally {
810824 globalConfigurationHelper .updateGlobalConfiguration (GlobalConfigurationConstants .ENABLE_BUSINESS_DATE ,
811825 new PutGlobalConfigurationsRequest ().enabled (false ));
826+ globalConfigurationHelper .updateGlobalConfiguration (GlobalConfigurationConstants .ALLOW_CASH_AND_NON_CASH_ACCRUAL ,
827+ new PutGlobalConfigurationsRequest ().enabled (true ));
812828 }
813829 }
814830
@@ -825,6 +841,8 @@ public void scenario8() {
825841 try {
826842 globalConfigurationHelper .updateGlobalConfiguration (GlobalConfigurationConstants .ENABLE_BUSINESS_DATE ,
827843 new PutGlobalConfigurationsRequest ().enabled (true ));
844+ globalConfigurationHelper .updateGlobalConfiguration (GlobalConfigurationConstants .ALLOW_CASH_AND_NON_CASH_ACCRUAL ,
845+ new PutGlobalConfigurationsRequest ().enabled (false ));
828846 businessDateHelper .updateBusinessDate (new BusinessDateUpdateRequest ().type (BusinessDateUpdateRequest .TypeEnum .BUSINESS_DATE )
829847 .date ("2023.02.15" ).dateFormat ("yyyy.MM.dd" ).locale ("en" ));
830848
@@ -1026,6 +1044,8 @@ public void scenario8() {
10261044 } finally {
10271045 globalConfigurationHelper .updateGlobalConfiguration (GlobalConfigurationConstants .ENABLE_BUSINESS_DATE ,
10281046 new PutGlobalConfigurationsRequest ().enabled (false ));
1047+ globalConfigurationHelper .updateGlobalConfiguration (GlobalConfigurationConstants .ALLOW_CASH_AND_NON_CASH_ACCRUAL ,
1048+ new PutGlobalConfigurationsRequest ().enabled (true ));
10291049 }
10301050 }
10311051
@@ -1045,6 +1065,8 @@ public void scenario9() {
10451065 try {
10461066 globalConfigurationHelper .updateGlobalConfiguration (GlobalConfigurationConstants .ENABLE_BUSINESS_DATE ,
10471067 new PutGlobalConfigurationsRequest ().enabled (true ));
1068+ globalConfigurationHelper .updateGlobalConfiguration (GlobalConfigurationConstants .ALLOW_CASH_AND_NON_CASH_ACCRUAL ,
1069+ new PutGlobalConfigurationsRequest ().enabled (false ));
10481070 businessDateHelper .updateBusinessDate (new BusinessDateUpdateRequest ().type (BusinessDateUpdateRequest .TypeEnum .BUSINESS_DATE )
10491071 .date ("2023.02.15" ).dateFormat ("yyyy.MM.dd" ).locale ("en" ));
10501072
@@ -1332,6 +1354,8 @@ public void scenario9() {
13321354 } finally {
13331355 globalConfigurationHelper .updateGlobalConfiguration (GlobalConfigurationConstants .ENABLE_BUSINESS_DATE ,
13341356 new PutGlobalConfigurationsRequest ().enabled (false ));
1357+ globalConfigurationHelper .updateGlobalConfiguration (GlobalConfigurationConstants .ALLOW_CASH_AND_NON_CASH_ACCRUAL ,
1358+ new PutGlobalConfigurationsRequest ().enabled (true ));
13351359 }
13361360 }
13371361
@@ -1351,6 +1375,8 @@ public void scenario10() {
13511375 .date ("2023.05.14" ).dateFormat ("yyyy.MM.dd" ).locale ("en" ));
13521376 globalConfigurationHelper .updateGlobalConfiguration (GlobalConfigurationConstants .CHARGE_ACCRUAL_DATE ,
13531377 new PutGlobalConfigurationsRequest ().stringValue ("submitted-date" ));
1378+ globalConfigurationHelper .updateGlobalConfiguration (GlobalConfigurationConstants .ALLOW_CASH_AND_NON_CASH_ACCRUAL ,
1379+ new PutGlobalConfigurationsRequest ().enabled (false ));
13541380
13551381 Integer fee = ChargesHelper .createCharges (requestSpec , responseSpec ,
13561382 ChargesHelper .getLoanSpecifiedDueDateJSON (ChargesHelper .CHARGE_CALCULATION_TYPE_FLAT , "3.65" , false ));
@@ -1513,6 +1539,8 @@ public void scenario10() {
15131539 new PutGlobalConfigurationsRequest ().enabled (false ));
15141540 globalConfigurationHelper .updateGlobalConfiguration (GlobalConfigurationConstants .CHARGE_ACCRUAL_DATE ,
15151541 new PutGlobalConfigurationsRequest ().stringValue ("due-date" ));
1542+ globalConfigurationHelper .updateGlobalConfiguration (GlobalConfigurationConstants .ALLOW_CASH_AND_NON_CASH_ACCRUAL ,
1543+ new PutGlobalConfigurationsRequest ().enabled (true ));
15161544 }
15171545 }
15181546
@@ -1532,6 +1560,8 @@ public void scenario11() {
15321560 .date ("2023.05.14" ).dateFormat ("yyyy.MM.dd" ).locale ("en" ));
15331561 globalConfigurationHelper .updateGlobalConfiguration (GlobalConfigurationConstants .CHARGE_ACCRUAL_DATE ,
15341562 new PutGlobalConfigurationsRequest ().stringValue ("submitted-date" ));
1563+ globalConfigurationHelper .updateGlobalConfiguration (GlobalConfigurationConstants .ALLOW_CASH_AND_NON_CASH_ACCRUAL ,
1564+ new PutGlobalConfigurationsRequest ().enabled (false ));
15351565
15361566 Integer fee = ChargesHelper .createCharges (requestSpec , responseSpec ,
15371567 ChargesHelper .getLoanSpecifiedDueDateJSON (ChargesHelper .CHARGE_CALCULATION_TYPE_FLAT , "3.65" , false ));
@@ -1694,6 +1724,8 @@ public void scenario11() {
16941724 new PutGlobalConfigurationsRequest ().enabled (false ));
16951725 globalConfigurationHelper .updateGlobalConfiguration (GlobalConfigurationConstants .CHARGE_ACCRUAL_DATE ,
16961726 new PutGlobalConfigurationsRequest ().stringValue ("due-date" ));
1727+ globalConfigurationHelper .updateGlobalConfiguration (GlobalConfigurationConstants .ALLOW_CASH_AND_NON_CASH_ACCRUAL ,
1728+ new PutGlobalConfigurationsRequest ().enabled (true ));
16971729 }
16981730 }
16991731
0 commit comments