[关闭]
@liruiyi962464 2017-03-24T03:22:13.000000Z 字数 288 阅读 357

测试使用

java

  1. package com.倒包测试;
  2. import org.junit.After;
  3. import org.junit.Before;
  4. import org.junit.Test;
  5. public class Test1 {
  6. public String a;
  7. @Before
  8. public void befort(){
  9. a = "张三";
  10. System.out.println("开始");
  11. }
  12. @Test
  13. public void test(){
  14. System.out.println(a);
  15. int s = 10 / 0;
  16. }
  17. @After
  18. public void after(){
  19. System.out.println("执行完毕");
  20. }
  21. }
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注