1 package junit.extensions; 2 3 import junit.framework.Assert; 4 import junit.framework.Test; 5 import junit.framework.TestResult; 6 7 13 public class TestDecorator extends Assert implements Test { 14 protected Test fTest; 15 16 public TestDecorator(Test test) { 17 fTest= test; 18 } 19 20 23 public void basicRun(TestResult result) { 24 fTest.run(result); 25 } 26 27 public int countTestCases() { 28 return fTest.countTestCases(); 29 } 30 31 public void run(TestResult result) { 32 basicRun(result); 33 } 34 35 @Override 36 public String toString() { 37 return fTest.toString(); 38 } 39 40 public Test getTest() { 41 return fTest; 42 } 43 } | Popular Tags |