购物车模块实例。购物车模块可以浏览商品类别;可以根据商品类别浏览商品信息;可以购买商品;可以查看购物车的商品;可以修改购买商品的数量和删除购买的商品。

源代码在线查看: testcart.java~1~

软件大小: 5617 K
上传用户: jellylihui
关键词: 模块 修改 删除
下载地址: 免注册下载 普通下载 VIP

相关代码

				package junittest;
				
				import junit.framework.*;
				import data.*;
				import java.util.*;
				
				public class TestCart extends TestCase {
				  private Cart cart = null;
				
				  protected void setUp() throws Exception {
				    super.setUp();
				    /**@todo verify the constructors*/
				    cart = new Cart();
				  }
				
				  protected void tearDown() throws Exception {
				    cart = null;
				    super.tearDown();
				  }
				
				  public void testAddGoods() {
				    Hashtable goods = null;
				    cart.addGoods(goods);
				    /**@todo fill in the test code*/
				  }
				
				  public void testDecodeGoodsStr() {
				    String goodStr = null;
				    String[] expectedReturn = null;
				    String[] actualReturn = cart.decodeGoodsStr(goodStr);
				    assertEquals("return value", expectedReturn, actualReturn);
				    /**@todo fill in the test code*/
				  }
				
				  public void testGetCustomer() {
				    String expectedReturn = null;
				    String actualReturn = cart.getCustomer();
				    assertEquals("return value", expectedReturn, actualReturn);
				    /**@todo fill in the test code*/
				  }
				
				  public void testGetGoods() {
				    Hashtable expectedReturn = null;
				    Hashtable actualReturn = cart.getGoods();
				    assertEquals("return value", expectedReturn, actualReturn);
				    /**@todo fill in the test code*/
				  }
				
				  public void testGetGoodsobjs() {
				    Object[][] expectedReturn = null;
				    Object[][] actualReturn = cart.getGoodsobjs();
				    assertEquals("return value", expectedReturn, actualReturn);
				    /**@todo fill in the test code*/
				  }
				
				  public void testRemoveGoods() {
				    Collection goodsId = null;
				    cart.removeGoods(goodsId);
				    /**@todo fill in the test code*/
				  }
				
				  public void testSetCustomer() {
				    String customer = null;
				    cart.setCustomer(customer);
				    /**@todo fill in the test code*/
				  }
				
				  public void testUpdateGoods() {
				    Hashtable goods = null;
				    cart.updateGoods(goods);
				    /**@todo fill in the test code*/
				  }
				
				}
							

相关资源