diff --git a/mifosng-provider/src/integrationTest/java/org/mifosplatform/integrationtests/WorkingDaysTest.java b/mifosng-provider/src/integrationTest/java/org/mifosplatform/integrationtests/WorkingDaysTest.java index f5fa117f8..92024f07f 100755 --- a/mifosng-provider/src/integrationTest/java/org/mifosplatform/integrationtests/WorkingDaysTest.java +++ b/mifosng-provider/src/integrationTest/java/org/mifosplatform/integrationtests/WorkingDaysTest.java @@ -5,11 +5,11 @@ */ package org.mifosplatform.integrationtests; -import com.jayway.restassured.builder.RequestSpecBuilder; -import com.jayway.restassured.builder.ResponseSpecBuilder; -import com.jayway.restassured.http.ContentType; -import com.jayway.restassured.specification.RequestSpecification; -import com.jayway.restassured.specification.ResponseSpecification; +import static org.junit.Assert.assertEquals; + +import java.util.HashMap; +import java.util.List; + import org.junit.Assert; import org.junit.Before; import org.junit.Test; @@ -17,10 +17,11 @@ import org.mifosplatform.integrationtests.common.CommonConstants; import org.mifosplatform.integrationtests.common.Utils; import org.mifosplatform.integrationtests.common.WorkingDaysHelper; -import java.util.HashMap; -import java.util.List; - -import static org.junit.Assert.assertEquals; +import com.jayway.restassured.builder.RequestSpecBuilder; +import com.jayway.restassured.builder.ResponseSpecBuilder; +import com.jayway.restassured.http.ContentType; +import com.jayway.restassured.specification.RequestSpecification; +import com.jayway.restassured.specification.ResponseSpecification; @SuppressWarnings({ "rawtypes", "unchecked" }) public class WorkingDaysTest { @@ -30,7 +31,7 @@ public class WorkingDaysTest { private ResponseSpecification generalResponseSpec; @Before - public void setUp(){ + public void setUp() { Utils.initializeRESTAssured(); this.requestSpec = new RequestSpecBuilder().setContentType(ContentType.JSON).build(); this.requestSpec.header("Authorization", "Basic " + Utils.loginIntoServerAndGetBase64EncodedAuthenticationKey()); @@ -40,16 +41,17 @@ public class WorkingDaysTest { } @Test - public void updateWorkingDays(){ - HashMap response = (HashMap)WorkingDaysHelper.updateWorkingDays(requestSpec, responseSpec); + public void updateWorkingDays() { + HashMap response = (HashMap) WorkingDaysHelper.updateWorkingDays(requestSpec, responseSpec); Assert.assertNotNull(response.get("resourceId")); } @Test - public void updateWorkingDaysWithWrongRecurrencePattern(){ - final List error = (List) WorkingDaysHelper.updateWorkingDaysWithWrongRecurrence(requestSpec, generalResponseSpec, CommonConstants.RESPONSE_ERROR); - assertEquals("Verify wrong recurrence pattern error", "error.msg.recurring.rule.parsing.error", error.get(0).get("userMessageGlobalisationCode")); + public void updateWorkingDaysWithWrongRecurrencePattern() { + final List error = (List) WorkingDaysHelper.updateWorkingDaysWithWrongRecurrence(requestSpec, generalResponseSpec, + CommonConstants.RESPONSE_ERROR); + assertEquals("Verify wrong recurrence pattern error", "error.msg.recurring.rule.parsing.error", + error.get(0).get("userMessageGlobalisationCode")); } - } diff --git a/mifosng-provider/src/integrationTest/java/org/mifosplatform/integrationtests/common/WorkingDaysHelper.java b/mifosng-provider/src/integrationTest/java/org/mifosplatform/integrationtests/common/WorkingDaysHelper.java index 80e688b15..22ed88aa8 100755 --- a/mifosng-provider/src/integrationTest/java/org/mifosplatform/integrationtests/common/WorkingDaysHelper.java +++ b/mifosng-provider/src/integrationTest/java/org/mifosplatform/integrationtests/common/WorkingDaysHelper.java @@ -33,7 +33,7 @@ public class WorkingDaysHelper { public static String updateWorkingDaysAsJson() { final HashMap map = new HashMap<>(); - map.put("recurrence", "FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH"); + map.put("recurrence", "FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR,SA,SU"); map.put("locale", "en"); map.put("repaymentRescheduleType", randomInt(1, 4)); System.out.println("map : " + map);