1 package test.sample; 2 3 import junit.framework.Assert; 4 import junit.framework.TestCase; 5 import junit.framework.TestSuite; 6 7 /** 8 * 9 * @author lukas 10 */ 11 public abstract class JUnitSample4 extends TestCase { 12 13 private int i = 0; 14 15 public JUnitSample4(String name, int i) { 16 super(name); 17 this.i = i; 18 } 19 20 public void testXY() { 21 Assert.assertEquals(1, 1); 22 } 23 24 public static TestSuite suite() { 25 TestSuite ts = new TestSuite("Sample Suite"); 26 for (int i = 0; i < 3; i++) { 27 ts.addTest(new T(i)); 28 } 29 return ts; 30 } 31 32 private static class T extends JUnitSample4 { 33 34 public T(int i) { 35 super("testXY", i); 36 } 37 } 38 } 39