String html = "<textarea id=\"id_field\" name=\"field\" rows=\"10\" cols=\"40\">hello</textarea>";
assertEquals(html, output);
}
public void testWithRowsColsAttrs() {
Widget w = new TextAreaWidget();
String[] value = new String[]{"hello"};
Map<String, Object> attrs = new LinkedHashMap<String, Object>();
attrs.put("id", "id_%s");
attrs.put("rows", "5");
attrs.put("cols", "20");
String output = w.render("field", value, attrs);
String html = "<textarea id=\"id_field\" rows=\"5\" cols=\"20\" name=\"field\">hello</textarea>";
assertEquals(html, output);
}