1 45 package org.openejb.test; 46 47 import java.util.Enumeration ; 48 49 import junit.framework.Test; 50 import junit.framework.TestResult; 51 52 57 public class TestSuite extends junit.framework.TestSuite{ 58 59 public TestSuite() { 60 super(); 61 } 62 63 66 public void run(TestResult result) { 67 try{ 68 setUp(); 69 70 for (Enumeration e= tests(); e.hasMoreElements(); ) { 71 if ( result.shouldStop() ) break; 72 Test test= (Test)e.nextElement(); 73 test.run(result); 74 } 75 76 tearDown(); 77 } catch (Exception e) { 78 result.addError(this, e); 79 } 80 } 81 82 protected void setUp() throws Exception { 83 } 84 85 protected void tearDown() throws Exception { 86 } 87 88 } 89 90 91 | Popular Tags |