public void test_Render_TextArea_Component()
{
IRequestCycle cycle = newMock(IRequestCycle.class);
checkOrder(cycle, false);
ResponseBuilder resp = newMock(ResponseBuilder.class);
IEngineService engine = newMock(IEngineService.class);
IEngine cengine = newMock(IEngine.class);
ILink link = newMock(ILink.class);
IScript script = newMock(IScript.class);
PageRenderSupport prs = newMock(PageRenderSupport.class);
TranslatedFieldSupport translator = newMock(TranslatedFieldSupport.class);
ValidatableFieldSupport validator = newMock(ValidatableFieldSupport.class);
IValidationDelegate delegate = new ValidationDelegate();
IForm form = newMock(IForm.class);
IMarkupWriter writer = newBufferWriter();
Suggest comp = newInstance(Suggest.class,
"response", resp,
"templateTagName", "textarea",
"name", "suggest",
"clientId", "suggest",
"form", form,
"translatedFieldSupport", translator,
"validatableFieldSupport", validator,
"engineService", engine,
"script", script,
"options", "{afterUpdateElement:myapp.processUpdate,other:other}");
expect(cycle.isRewinding()).andReturn(false).anyTimes();
expect(resp.isDynamic()).andReturn(false);
expect(cycle.getAttribute(TapestryUtils.FORM_ATTRIBUTE)).andReturn(form).anyTimes();
expect(form.wasPrerendered(writer, comp)).andReturn(false).anyTimes();
expect(form.getDelegate()).andReturn(delegate).anyTimes();
expect(form.getElementId(comp)).andReturn("suggest");