Search in sources :

Example 61 with Location

use of com.opensymphony.xwork2.util.location.Location in project struts-examples by apache.

the class ConfigTest method assertResult.

protected void assertResult(ActionConfig config, String result_name, String result_value) {
    Map<String, ResultConfig> results = config.getResults();
    ResultConfig result = results.get(result_name);
    Map<String, String> params = result.getParams();
    String value = params.get("actionName");
    if (value == null) {
        value = params.get("location");
    }
    assertEquals("Wrong result value: [" + value + "]", result_value, value);
}
Also used : ResultConfig(com.opensymphony.xwork2.config.entities.ResultConfig)

Aggregations

ResultConfig (com.opensymphony.xwork2.config.entities.ResultConfig)32 ServletContext (javax.servlet.ServletContext)22 PackageConfig (com.opensymphony.xwork2.config.entities.PackageConfig)21 HashSet (java.util.HashSet)15 ConfigurationException (com.opensymphony.xwork2.config.ConfigurationException)11 ActionContext (com.opensymphony.xwork2.ActionContext)10 ValueStack (com.opensymphony.xwork2.util.ValueStack)10 HashMap (java.util.HashMap)9 ActionInvocation (com.opensymphony.xwork2.ActionInvocation)8 ActionConfig (com.opensymphony.xwork2.config.entities.ActionConfig)8 ServletActionContext (org.apache.struts2.ServletActionContext)8 ResultTypeConfig (com.opensymphony.xwork2.config.entities.ResultTypeConfig)7 Location (com.opensymphony.xwork2.util.location.Location)7 ArrayList (java.util.ArrayList)7 NoAnnotationAction (org.apache.struts2.convention.actions.NoAnnotationAction)7 ClassLevelResultPathAction (org.apache.struts2.convention.actions.resultpath.ClassLevelResultPathAction)6 Action (org.apache.struts2.convention.annotation.Action)6 NodeList (org.w3c.dom.NodeList)6 ActionProxy (com.opensymphony.xwork2.ActionProxy)5 HttpServletRequest (javax.servlet.http.HttpServletRequest)5