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