use of com.opensymphony.xwork2.ActionSupport in project entando-core by entando.
the class TestDateAttributeFilterAction method testFailureAddRangeDateFilter_2.
public void testFailureAddRangeDateFilter_2() throws Throwable {
String result = // Data Start inserita
this.executeSaveRangeDateFilter(// Data Start inserita
IContentListFilterAction.INSERTED_DATE_FILTER, // Data Start inserita
"25/09/1972", IContentListFilterAction.INSERTED_DATE_FILTER, // Data End Inserita
"21/04/1972");
assertEquals(Action.INPUT, result);
ActionSupport action = this.getAction();
Map<String, List<String>> fieldsErrors = action.getFieldErrors();
assertEquals(1, fieldsErrors.size());
List<String> dateValueErrors = fieldsErrors.get("dateEnd");
// dateStart.after(dateEnd)
assertEquals(1, dateValueErrors.size());
}
use of com.opensymphony.xwork2.ActionSupport in project entando-core by entando.
the class TestDateAttributeFilterAction method testFailureAddDateValueFilter_1.
public void testFailureAddDateValueFilter_1() throws Throwable {
// Opzione nessuna Data inserita
String result = this.executeSaveValueDateFilter(IContentListFilterAction.NO_DATE_FILTER, "");
assertEquals(Action.INPUT, result);
ActionSupport action = this.getAction();
Map<String, List<String>> fieldsErrors = action.getFieldErrors();
assertEquals(1, fieldsErrors.size());
List<String> dateValueErrors = fieldsErrors.get("dateValueType");
assertEquals(1, dateValueErrors.size());
}
use of com.opensymphony.xwork2.ActionSupport in project entando-core by entando.
the class TestDateAttributeFilterAction method testFailureAddRangeDateFilter_1.
public void testFailureAddRangeDateFilter_1() throws Throwable {
String result = // Data Start inserita
this.executeSaveRangeDateFilter(// Data Start inserita
IContentListFilterAction.INSERTED_DATE_FILTER, // Data Start inserita
"", IContentListFilterAction.INSERTED_DATE_FILTER, // Data End Inserita
"25/09/1972");
assertEquals(Action.INPUT, result);
ActionSupport action = this.getAction();
Map<String, List<String>> fieldsErrors = action.getFieldErrors();
assertEquals(1, fieldsErrors.size());
List<String> dateValueErrors = fieldsErrors.get("dateStart");
// required dateStart
assertEquals(1, dateValueErrors.size());
}
use of com.opensymphony.xwork2.ActionSupport in project entando-core by entando.
the class TestNumberAttributeFilterAction method testFailureAddRangeNumberFilter_1.
public void testFailureAddRangeNumberFilter_1() throws Throwable {
String result = this.executeSaveRangeNumberFilter("", "");
assertEquals(Action.INPUT, result);
ActionSupport action = this.getAction();
Map<String, List<String>> fieldsErrors = action.getFieldErrors();
assertEquals(1, fieldsErrors.size());
List<String> numberValueErrors = fieldsErrors.get("numberEnd");
// richiesto uno dei campi
assertEquals(1, numberValueErrors.size());
}
use of com.opensymphony.xwork2.ActionSupport in project entando-core by entando.
the class TestNumberAttributeFilterAction method testFailureAddNumberValueFilter_1.
public void testFailureAddNumberValueFilter_1() throws Throwable {
String result = this.executeSaveNumberValueFilter("");
assertEquals(Action.INPUT, result);
ActionSupport action = this.getAction();
Map<String, List<String>> fieldsErrors = action.getFieldErrors();
assertEquals(1, fieldsErrors.size());
List<String> numberValueErrors = fieldsErrors.get("numberValue");
assertEquals(1, numberValueErrors.size());
}
Aggregations