购物车模块实例。购物车模块可以浏览商品类别;可以根据商品类别浏览商品信息;可以购买商品;可以查看购物车的商品;可以修改购买商品的数量和删除购买的商品。
源代码在线查看: testnumberverify.java~2~
package junittest;
import junit.framework.*;
import data.*;
public class TestNumberVerify extends TestCase {
private NumberVerify numberVerify = null;
protected void setUp() throws Exception {
super.setUp();
numberVerify = new NumberVerify();
}
protected void tearDown() throws Exception {
numberVerify = null;
super.tearDown();
}
public void testVerifyNum() {
String str = null;
boolean expectedReturn = false;
boolean actualReturn = numberVerify.verifyNum(str);
assertEquals("return value", expectedReturn, actualReturn);
/**@todo fill in the test code*/
}
}