KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > servletunit > struts > tests > NullPointerForm


1 package servletunit.struts.tests;
2
3 import org.apache.struts.action.*;
4 import javax.servlet.http.*;
5
6 /**
7  * An Action Form that always throws a NullPointerAction during validation.
8  * Used in unit testing
9  * @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, HttpServletRequest request){
18         throw new NullPointerException JavaDoc("NullPointer during validation");
19     }
20 }
Popular Tags