????Eclipse???Junit????????e??????????б?д?????????????????
??????????????Junit??
???????д?????????????????????Junit???????????????????Properties??Java Build Path??Libraries???????

????Add Library?????Junit:

??????Next???Junit?汾?????Finish?????????
??????д????????
????????????????
????package choon.test;
????public class Calculate {
????public int  Add(int x??int y) {
????return x + y;
????}
????}
?????????д???????????£?
package choon.test;
import static org.junit.Assert.*;
import org.junit.Test;
public class Test1 {
@Test
public void test() {
Calculate calculate = new Calculate();
assertEquals(8?? calculate.Add(3?? 5));
}
}
??????test???????Run As Junit Test???????иò?????????

?????????????????????????????????????????????????