为什么在IDEA中用JUnit做测试没有tearDownAfterClass这些方法呢?只有两个before() 和 after()方法
/**
* Play Tester.
*
* @author <Authors name>
* @since <pre>Apr 4, 2015</pre>
* @version 1.0
*/
public class PlayTest {
@Before
public void before() throws Exception {
System.out.println("Before");
}
@After
public void after() throws Exception {
System.out.println("After");
}
/**
*
* Method: play(String a)
*
*/
@Test
public void testPlay() throws Exception {
System.out.println("test play");
}
/**
*
* Method: add(int a, int b)
*
*/
@Test
public void testAdd() throws Exception {
System.out.println("test add");
}
/**
*
* Method: divide(Double a, Double b)
*
*/
@Test
public void testDivide() throws Exception {
System.out.println("test divide");
}
}知道了~原来都要自己写。。。。