use of com.opensymphony.xwork2.ActionSupport in project entando-core by entando.
the class TestNumberAttributeFilterAction method testFailureAddRangeNumberFilter_3.
public void testFailureAddRangeNumberFilter_3() throws Throwable {
String result = this.executeSaveRangeNumberFilter("6", "wrongFormat");
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");
// numberEnd wrong Format
assertEquals(1, numberValueErrors.size());
}
use of com.opensymphony.xwork2.ActionSupport in project entando-core by entando.
the class TestContentFinderViewerAction method testFailureJoinContent_1.
public void testFailureJoinContent_1() throws Throwable {
// ID Nullo
String result = this.executeJoinContent("admin", "pagina_11", "1", null);
assertEquals(Action.INPUT, result);
ActionSupport action = this.getAction();
Map<String, List<String>> fieldErrors = action.getFieldErrors();
assertEquals(1, fieldErrors.size());
List<String> contentIdFieldErrors = fieldErrors.get("contentId");
assertEquals(1, contentIdFieldErrors.size());
}
use of com.opensymphony.xwork2.ActionSupport in project entando-core by entando.
the class TestContentViewerWidgetAction method testFailureJoinContent_1.
public void testFailureJoinContent_1() throws Throwable {
// ID Nullo
String result = this.executeJoinContent("admin", "pagina_11", "1", null);
assertEquals(Action.INPUT, result);
ActionSupport action = this.getAction();
Map<String, List<String>> fieldErrors = action.getFieldErrors();
assertEquals(1, fieldErrors.size());
List<String> contentIdFieldErrors = fieldErrors.get("contentId");
assertEquals(1, contentIdFieldErrors.size());
}
use of com.opensymphony.xwork2.ActionSupport in project entando-core by entando.
the class TestContentViewerWidgetAction method testFailureJoinContent_3.
public void testFailureJoinContent_3() throws Throwable {
// ID di contenuto non autorizzato
String result = this.executeJoinContent("admin", "pagina_11", "1", "ART122");
assertEquals(Action.INPUT, result);
ActionSupport action = this.getAction();
Map<String, List<String>> fieldErrors = action.getFieldErrors();
assertEquals(1, fieldErrors.size());
List<String> contentIdFieldErrors = (List<String>) fieldErrors.get("contentId");
assertEquals(1, contentIdFieldErrors.size());
}
use of com.opensymphony.xwork2.ActionSupport in project entando-core by entando.
the class TestResourceAction method testSaveNewResource_1.
public void testSaveNewResource_1() throws Throwable {
this.setUserOnSession("admin");
this.initAction("/do/jacms/Resource", "save");
this.addParameter("strutsAction", String.valueOf(ApsAdminSystemConstants.ADD));
String result = this.executeAction();
assertEquals(Action.INPUT, result);
ActionSupport action = this.getAction();
Map<String, List<String>> actionFieldErrors = action.getFieldErrors();
assertEquals(4, actionFieldErrors.size());
assertEquals(1, actionFieldErrors.get("resourceTypeCode").size());
assertEquals(1, actionFieldErrors.get("descr").size());
assertEquals(1, actionFieldErrors.get("mainGroup").size());
assertEquals(1, actionFieldErrors.get("upload").size());
}
Aggregations