单元测试法(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....");
    }
}

你可能感兴趣的:(单元测试法(Junit))