單元測試法(Junit)

package com.gxa.homework;

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

public class JunitTest {
    //準備數據
    @Before 
    public void testB(){
        System.out.println("before....");
    }
    
    @Test 
    public void testAdd(){
        //註解
        System.out.println("testAdd..");
        
    }
    @After 
    public void testA(){
        System.out.println("after....");
    }
}
相關文章
相關標籤/搜索