BenjaminYang In solitude, where we are least alone

java的unity单元测试

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class TestUnit {
    public static void main(String[] args) {
        System.out.println("aa");
    }
    
    @Test
    public void testJunit(){
        System.out.println("hello junit!");
    }
    
    @Before
    public void testBefore(){
        System.out.println("before!");
    }
    
    @After
    public void testAfter(){
        System.out.println("after!");
    }
    
    
}

可以定义方法的执行顺序

posted @ 2018-06-10 22:29  benjamin杨  阅读(168)  评论(0编辑  收藏  举报