📄 simpleaddtest.java
字号:
package com.free.test.simple;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
/**
* <p>Title: Eclipse Plugin Development</p>
* <p>Description: Free download</p>
* <p>Copyright: Copyright (c) 2006</p>
* <p>Company: Free</p>
* @author gan.shu.man
* @version 1.0
*/
public class SimpleAddTest extends TestCase {
/**
* 执行初始化操作
* */
protected void setUp() throws Exception {
//TODO test方法执行前的环境初始化
}
/**
* 执行清理操作
* */
protected void tearDown() throws Exception {
//TODO test方法执行后的环境清理
}
/**
* 测试SimpleAdd类的StringAdd方法
* */
public void testIntegerAdd() {
SimpleAdd simpleAdd = new SimpleAdd();
assertEquals(new Integer(9), simpleAdd.integerAdd(new Integer(4),
new Integer(5)));
}
public void testStringAdd() {
SimpleAdd simpleAdd = new SimpleAdd();
assertEquals(new Integer(9), simpleAdd.StringAdd("4","5"));
}
//其它test方法的实现
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -