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 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 (); 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 (); 31 } 32 33 public void testSuccess() { 34 } 35 36 } 37 | Popular Tags |