FINERACT-820 - Fixing Integration Test which fails on Sundays
This commit is contained in:
+1
-8
@@ -5070,14 +5070,7 @@ public class ClientLoanIntegrationTest {
|
||||
}
|
||||
|
||||
public 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);
|
||||
return Utils.getDayOfWeek(date) ;
|
||||
}
|
||||
|
||||
public Integer getDayOfMonth(Calendar date) {
|
||||
|
||||
+1
-1
@@ -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 = today.get(Calendar.DAY_OF_WEEK) - 1;
|
||||
final Integer repeatsOnDay = Utils.getDayOfWeek(today) ;
|
||||
|
||||
Integer calendarId = CalendarHelper.createMeetingForGroup(this.requestSpec, this.responseSpec, centerId, startDate, frequency,
|
||||
interval, repeatsOnDay.toString());
|
||||
|
||||
+11
@@ -262,5 +262,16 @@ 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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user