JUnit的Annoation:
1. @Test: 测试方法
a) (expected=XXException.class)
b) (timeout=xxx)
2. @Ignore: 忽略测试方法
3. @Before: 每一个测试方法之前运行
4. @After: 每一个测试方法之后运行
5. @BeforeClass: 所有测试开始之前运行,别忘了方法是静态的.
6. @AfterClass: 所有测试结束之后运行
参考:
http://www.jianshu.com/p/7088822e21a3
http://blog.youkuaiyun.com/a672489861/article/details/10065133#
http://www.cnblogs.com/xwdreamer/archive/2012/03/29/2423136.html