01: /*
02: * Copyright (c) 2002-2006 by OpenSymphony
03: * All rights reserved.
04: */
05: package com.opensymphony.webwork.components;
06:
07: import com.opensymphony.webwork.views.jsp.AbstractUITagTest;
08: import com.opensymphony.webwork.TestAction;
09: import com.opensymphony.xwork.validator.validators.RequiredFieldValidator;
10:
11: import java.util.List;
12:
13: /**
14: * <code>FormTest</code>
15: *
16: * @author Rainer Hermanns
17: */
18: public class FormTest extends AbstractUITagTest {
19:
20: public void testTestFormGetValidators() {
21: Form form = new Form(stack, request, response);
22: form.getParameters().put("actionClass", TestAction.class);
23: List v = form.getValidators("foo");
24: assertEquals(1, v.size());
25: assertEquals(RequiredFieldValidator.class, v.get(0).getClass());
26: }
27: }
|