Methods Summary |
---|
public void | execute(com.opensymphony.xwork2.ActionInvocation invocation)
LOG.info("executing TestResult.");
if ((expectedValues != null) && (expectedValues.size() > 0) && (propertyNames != null) && (propertyNames.size() > 0))
{
ValueStack stack = ActionContext.getContext().getValueStack();
for (int i = 0; i < propertyNames.size(); i++) {
String propertyName = (String) propertyNames.get(i);
String expectedValue = null;
if (i < expectedValues.size()) {
expectedValue = (String) expectedValues.get(i);
}
String value = (String) stack.findValue(propertyName, String.class);
Assert.assertEquals(expectedValue, value);
}
} else {
LOG.error("One of expectedValues = " + expectedValues + " and propertyNames = " + propertyNames + " was null or empty.");
Assert.fail();
}
|
public java.util.List | getExpectedValues()
return expectedValues;
|
public java.util.List | getPropertyNames()
return propertyNames;
|
public void | setExpectedValue(int index, java.lang.String value)
expectedValues.set(index, value);
|
public void | setExpectedValue(java.lang.String value)
expectedValues.add(value);
|
public void | setPropertyName(int index, java.lang.String propertyName)
propertyNames.set(index, propertyName);
|
public void | setPropertyName(java.lang.String propertyName)
propertyNames.add(propertyName);
|