mirror of
https://github.com/apache/struts.git
synced 2026-08-11 01:27:14 +00:00
add test for parameter with name "value"
Verified that the value parameter is added as the nameValue parameter.
This commit is contained in:
@@ -271,4 +271,16 @@ public class UIBeanTest extends StrutsInternalTestCase {
|
||||
assertEquals(accesskeyValue, txtFld.getParameters().get("accesskey"));
|
||||
}
|
||||
|
||||
public void testValueParameterEvaluation() {
|
||||
String value = "myValue";
|
||||
ValueStack stack = ActionContext.getContext().getValueStack();
|
||||
MockHttpServletRequest req = new MockHttpServletRequest();
|
||||
MockHttpServletResponse res = new MockHttpServletResponse();
|
||||
|
||||
TextField txtFld = new TextField(stack, req, res);
|
||||
txtFld.addParameter("value", value);
|
||||
txtFld.evaluateParams();
|
||||
|
||||
assertEquals(value, txtFld.getParameters().get("nameValue"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user