把多个单例测试组合成套件一起测试。
有MyTest、TestMain两个类,代码如下:
普通运行输出如下:
.=====setUp======
=====testMethodA start======
=====testMethodA end======
=====tearDown======
Time: 0
Junit运行输出如下:
test count:2
=====setUp======
=====testMethodA start======
=====testMethodA end======
=====testMethodB start======
=====tearDown======
=====TestMain.testMethodA start======
=====TestMain.testMethodA end======
参考资料地址:http://wenku.baidu.com/view/3504b7f8941ea76e58fa04f8.html