TestSuite创建方式(一)

来源:互联网 发布:动漫软件 编辑:程序博客网 时间:2024/06/05 15:04
public class MyTestSuite extends TestCase {    public MyTestSuite () {        super();    }    public static Test suite() {        TestSuite suite = new TestSuite();        suite.addTest(new JUnit4TestAdapter(A.class));        suite.addTest(new JUnit4TestAdapter(B.class));        TestSetup wrapper = new TestSetup(suite) {            @Before            protected void setUp() throws LTFSLEBaseException, Exception {                 oneTimeSetUp();            }           @After            protected void tearDown() throws LTFSLEBaseException, Exception {                oneTimeTearDown();            }        };        return wrapper;    }    protected static void oneTimeSetUp() {    }    protected static void oneTimeTearDown(){    }


原创粉丝点击