01: package servletunit.struts.tests;
02:
03: import org.apache.struts.action.*;
04: import javax.servlet.http.*;
05:
06: /**
07: * An Action Form that always throws a NullPointerAction during validation.
08: * Used in unit testing
09: * @author Sean Pritchard
10: * @version 1.0
11: */
12: public class NullPointerForm extends ActionForm {
13:
14: public NullPointerForm() {
15: }
16:
17: public ActionErrors validate(ActionMapping mapping,
18: HttpServletRequest request) {
19: throw new NullPointerException("NullPointer during validation");
20: }
21: }
|