This is an automated email from the ASF dual-hosted git repository.
nazeer1100126 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 1848056 Revert "FINERACT-820 - Fixing Integration Test which fails on
Sundays"
1848056 is described below
commit 1848056e6f2b6b88916f61b1a584aa797f3d5bb0
Author: Shaik Nazeer Hussain <[email protected]>
AuthorDate: Sun Jan 26 17:41:56 2020 +0530
Revert "FINERACT-820 - Fixing Integration Test which fails on Sundays"
This reverts commit e9e0bbc930ded7e1b3be942d237e228bacdb52b8.
---
.../fineract/integrationtests/ClientLoanIntegrationTest.java | 9 ++++++++-
.../integrationtests/LoanReschedulingWithinCenterTest.java | 2 +-
.../org/apache/fineract/integrationtests/common/Utils.java | 11 -----------
3 files changed, 9 insertions(+), 13 deletions(-)
diff --git
a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/ClientLoanIntegrationTest.java
b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/ClientLoanIntegrationTest.java
index a9b2167..c6aede4 100644
---
a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/ClientLoanIntegrationTest.java
+++
b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/ClientLoanIntegrationTest.java
@@ -5070,7 +5070,14 @@ public class ClientLoanIntegrationTest {
}
public Integer getDayOfWeek(Calendar date) {
- return Utils.getDayOfWeek(date) ;
+ int dayOfWeek = 0;
+ if (null != date) {
+ dayOfWeek = date.get(Calendar.DAY_OF_WEEK) - 1;
+ if (dayOfWeek == 0) {
+ dayOfWeek = 7;
+ }
+ }
+ return Integer.valueOf(dayOfWeek);
}
public Integer getDayOfMonth(Calendar date) {
diff --git
a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/LoanReschedulingWithinCenterTest.java
b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/LoanReschedulingWithinCenterTest.java
index dc3b97c..24d1f95 100644
---
a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/LoanReschedulingWithinCenterTest.java
+++
b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/LoanReschedulingWithinCenterTest.java
@@ -175,7 +175,7 @@ public class LoanReschedulingWithinCenterTest {
final String startDate = dateFormat.format(today.getTime());
final String frequency = "2"; // 2:Weekly
final String interval = "2"; // Every one week
- final Integer repeatsOnDay = Utils.getDayOfWeek(today) ;
+ final Integer repeatsOnDay = today.get(Calendar.DAY_OF_WEEK) - 1;
Integer calendarId =
CalendarHelper.createMeetingForGroup(this.requestSpec, this.responseSpec,
centerId, startDate, frequency,
interval, repeatsOnDay.toString());
diff --git
a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/Utils.java
b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/Utils.java
index 3eeefb0..68142e0 100644
---
a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/Utils.java
+++
b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/common/Utils.java
@@ -262,16 +262,5 @@ public class Utils {
.andReturn().asString();
return templateLocation.substring(1,templateLocation.length()-1);
}
-
- public static Integer getDayOfWeek(Calendar date) {
- int dayOfWeek = 0;
- if (null != date) {
- dayOfWeek = date.get(Calendar.DAY_OF_WEEK) - 1;
- if (dayOfWeek == 0) {
- dayOfWeek = 7;
- }
- }
- return Integer.valueOf(dayOfWeek);
- }
}