?? testmath.java
字號:
package junit.example;
import junit.framework.TestCase;
public class Testmath extends TestCase {
private math math = null;
public Testmath(String name) {
super(name);
}
protected void setUp() throws Exception {
super.setUp();
/**@todo verify the constructors*/
math = new math();
}
protected void tearDown() throws Exception {
math = null;
super.tearDown();
}
public void testAdd() {
int a =10;
int b = 0;
int expectedReturn = 0;
int actualReturn = math.add(a, b);
assertEquals("return value", new Integer(expectedReturn), new Integer(actualReturn));
/**@todo fill in the test code*/
}
public void testSubtract() {
int a = 1;
int b = 0;
int expectedReturn = 70;
int actualReturn = math.subtract(a, b);
//assertEquals("return value", expectedReturn, actualReturn);
/**@todo fill in the test code*/
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -