Revert "FINERACT-820 - Fixing Integration Test which fails on Sundays"

This reverts commit e9e0bbc930.
This commit is contained in:
Shaik Nazeer Hussain
2020-01-26 17:43:15 +05:30
parent 7774766245
commit 1848056e6f
3 changed files with 9 additions and 13 deletions
@@ -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) {
@@ -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());
@@ -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);
}
}