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(){
}
TestSuite创建方式(一)
最新推荐文章于 2023-03-20 09:40:37 发布