KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > junitx > example > ErrorSetupTestSetup


1 package junitx.example;
2
3 import junit.extensions.TestSetup;
4 import junit.framework.Test;
5 import junit.framework.TestCase;
6 import junit.framework.TestSuite;
7
8 /**
9  * @version $Revision: 1.2 $, $Date: 2003/05/08 02:51:15 $
10  * @author <a HREF="mailto:vbossica@users.sourceforge.net">Vladimir Ritz Bossicard</a>
11  */

12 public class ErrorSetupTestSetup extends TestCase {
13
14     public static Test suite() {
15         return new TestSetup(new TestSuite(ErrorSetupTestSetup.class)) {
16             protected void setUp() {
17                 throw new NullPointerException JavaDoc();
18             }
19
20             protected void tearDown() {
21             }
22         };
23     }
24     
25     public void testFailure() {
26         fail();
27     }
28
29     public void testError() {
30         throw new NullPointerException JavaDoc();
31     }
32
33     public void testSuccess() {
34     }
35     
36 }
37
Popular Tags