Search in sources :

Example 11 with BadNumericResponseException

use of org.mifos.platform.questionnaire.exceptions.BadNumericResponseException in project head by mifos.

the class ValidationExceptionMessageExtractorTest method testBadNumericResponseExceptionUpperBoundOnly.

@Test
public void testBadNumericResponseExceptionUpperBoundOnly() {
    BadNumericResponseException e = new BadNumericResponseException("Title", null, 100);
    testBadNumericResponseException(e, "questionnaire.invalid.numeric.max.response");
}
Also used : BadNumericResponseException(org.mifos.platform.questionnaire.exceptions.BadNumericResponseException) Test(org.junit.Test)

Example 12 with BadNumericResponseException

use of org.mifos.platform.questionnaire.exceptions.BadNumericResponseException in project head by mifos.

the class ValidationExceptionMessageExtractorTest method testBadNumericResponseExceptionNoBound.

@Test
public void testBadNumericResponseExceptionNoBound() {
    BadNumericResponseException e = new BadNumericResponseException("Title", null, null);
    testBadNumericResponseException(e, "questionnaire.invalid.numeric.response");
}
Also used : BadNumericResponseException(org.mifos.platform.questionnaire.exceptions.BadNumericResponseException) Test(org.junit.Test)

Aggregations

BadNumericResponseException (org.mifos.platform.questionnaire.exceptions.BadNumericResponseException)12 Test (org.junit.Test)11 ValidationException (org.mifos.platform.validations.ValidationException)8 MessageMatcher (org.mifos.platform.matchers.MessageMatcher)4 QuestionGroupDetail (org.mifos.platform.questionnaire.service.QuestionGroupDetail)4 QuestionDetail (org.mifos.platform.questionnaire.service.QuestionDetail)3 SectionDetail (org.mifos.platform.questionnaire.service.SectionDetail)3 SectionQuestionDetail (org.mifos.platform.questionnaire.service.SectionQuestionDetail)3 ActionErrors (org.apache.struts.action.ActionErrors)1 ActionMessage (org.apache.struts.action.ActionMessage)1 MandatoryAnswerNotFoundException (org.mifos.platform.questionnaire.exceptions.MandatoryAnswerNotFoundException)1 QuestionnaireServiceFacade (org.mifos.platform.questionnaire.service.QuestionnaireServiceFacade)1