JAVA項目加上Junit4依賴ide
//基本註解
測試
package com.laiwenhua.junitTest;spa
import org.junit.After;對象
import org.junit.AfterClass;it
import org.junit.Before;class
import org.junit.BeforeClass;test
import org.junit.Test;import
public class ArrayListTest {List
public ArrayListTest(){im
System.out.println("------構建對象--------");
}
@Test
public void testAdd() {
System.out.println("------測試中--------");
}
@BeforeClass
public static void beforeClass() {
System.out.println("------BeforeClass--------");
}
@AfterClass
public static void afterClass() {
System.out.println("------AfterClass--------");
}
@Before
public void before() {
System.out.println("------Before--------");
}
@After
public void after() {
System.out.println("------After--------");
}
}