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 三个都依次运行

原文地址:https://www.cnblogs.com/littlepage/p/9536144.html