testcart.java~1~

来自「购物车模块实例。购物车模块可以浏览商品类别;可以根据商品类别浏览商品信息;可以购」· JAVA~1~ 代码 · 共 75 行

JAVA~1~
75
字号
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*/
  }

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?