Methods Summary |
---|
protected com.opensymphony.xwork2.config.entities.ActionConfig | assertClass(java.lang.String namespace, java.lang.String action_name, java.lang.String class_name)
RuntimeConfiguration configuration = configurationManager.getConfiguration().getRuntimeConfiguration();
ActionConfig config = configuration.getActionConfig(namespace, action_name);
assertNotNull("Mssing action", config);
assertTrue("Wrong class name: [" + config.getClassName() + "]",
class_name.equals(config.getClassName()));
return config;
|
protected com.opensymphony.xwork2.config.entities.ActionConfig | assertClass(java.lang.String action_name, java.lang.String class_name)
return assertClass("", action_name, class_name);
|
protected void | assertFieldError(java.util.Map field_errors, java.lang.String field_name, java.lang.String error_message)
List errors = (List) field_errors.get(field_name);
assertNotNull("Expected errors for " + field_name, errors);
assertTrue("Expected errors for " + field_name, errors.size()>0);
// TODO: Should be a loop
assertEquals(error_message,errors.get(0));
|
protected java.util.Map | assertFieldErrors(com.opensymphony.xwork2.ActionSupport action)
assertTrue(action.hasFieldErrors());
return action.getFieldErrors();
|
protected void | assertInput(java.lang.String result)
assertTrue("Expected an input result!",
ActionSupport.INPUT.equals(result));
|
protected void | assertResult(com.opensymphony.xwork2.config.entities.ActionConfig config, java.lang.String result_name, java.lang.String result_value)
Map results = config.getResults();
ResultConfig result = (ResultConfig) results.get(result_name);
Map params = result.getParams();
String value = (String) params.get("actionName");
if (value == null)
value = (String) params.get("location");
assertTrue("Wrong result value: [" + value + "]",
result_value.equals(value));
|
protected void | assertSuccess(java.lang.String result)
assertTrue("Expected a success result!",
ActionSupport.SUCCESS.equals(result));
|
protected void | setUp()
super.setUp();
XmlConfigurationProvider c = new XmlConfigurationProvider("struts.xml");
configurationManager.addConfigurationProvider(c);
configurationManager.reload();
|
public void | testConfig()
assertNotNull(configurationManager);
|