Jtest的简单使用

Jtest主要用于快速测试自己的代码是否正确

条件,导入相应的Jtest包

    @Test
    public void test() {
        System.out.println("hello junit");
    }
    @Before
    public void testbefore() {
        System.out.println("hello before");
    }
    @After
    public void testafter() {
        System.out.println("hello after");
    }

 

运行结果先后为,before test after 三个都依次运行

 

posted @ 2018-08-26 02:28  SteveYu  阅读(920)  评论(0编辑  收藏  举报