⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testcartmethod.java~11~

📁 购物车模块实例。购物车模块可以浏览商品类别;可以根据商品类别浏览商品信息;可以购买商品;可以查看购物车的商品;可以修改购买商品的数量和删除购买的商品。
💻 JAVA~11~
字号:
package junittest;

import junit.framework.*;
import data.*;

public class TestCartMethod extends TestCase {
  private CartMethod cartMethod = null;

  protected void setUp() throws Exception {
    super.setUp();
    cartMethod = new CartMethod();
  }
  protected void tearDown() throws Exception {
    cartMethod = null;
    super.tearDown();
  }
  //测试分解分符串的方法
  public void testDecodeGoodsStr() {
    String goodStr = "糖果@@每箱30盒@@10@@5";
    String[] actualReturn = cartMethod.decodeGoodsStr(goodStr);
    assertEquals("return value", "每箱30盒", actualReturn[1]);
  }
  //测试四舍五入的方法,保留2个小数点
  public void test

}

⌨️ 快捷键说明

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