亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? teststockmanagementdata.java

?? java進銷存信息管理系統,實現了倉庫產品價格人員報表等功能
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
package junittest;

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

public class TestStockManagementData extends TestCase {
  private StockManagementData stockManagementData = null;

  protected void setUp() throws Exception {
    super.setUp();
    stockManagementData = new StockManagementData();
  }
  protected void tearDown() throws Exception {
    stockManagementData = null;
    super.tearDown();
  }
  //測試檢查用戶的方法
  public void testCheckUser() {
    //測試正確的用戶名
    String userName = "jack";
    String userPassword = "jack";
    //檢查用戶的方法
    int[] functions = stockManagementData.checkUser(userName, userPassword);
    this.assertEquals("return value", 0, functions[0]);
    //測試錯誤的用戶名
    userName = "jack1";
    userPassword = "jack";
    //檢查用戶的方法
    functions = stockManagementData.checkUser(userName, userPassword);
    this.assertEquals("return value", -1, functions[0]);
  }
  //測試創建用戶的方法
  public void testCreateUser() {
    String userName = "test";
    String userPassword = "test";
    int baseInforFunction = 0;
    int stockFunction = 0;
    int stockManageFunction = 0;
    int saleFunction = 0;
    User user = new User(userName, userPassword, baseInforFunction,
                         stockFunction, stockManageFunction, saleFunction);
    int result = stockManagementData.createUser(user);
    this.assertEquals("return value", 1, result);
  }
  //測試更新用戶的方法
  public void testUpdateUser() {
    String userName = "test";
    String userPassword = "test1";
    int baseInforFunction = 1;
    int stockFunction = 1;
    int stockManageFunction = 1;
    int saleFunction = 1;
    User user = new User(userName, userPassword, baseInforFunction,
                         stockFunction, stockManageFunction, saleFunction);
    int result = stockManagementData.updateUser(user);
    this.assertEquals("return value", 1, result);
  }
  //測試刪除用戶的方法
  public void testDeleteUser() {
    String userName = "test";
    String userPassword = "test";
    int baseInforFunction = 0;
    int stockFunction = 0;
    int stockManageFunction = 0;
    int saleFunction = 0;
    User user = new User(userName, userPassword, baseInforFunction,
                         stockFunction, stockManageFunction, saleFunction);
    int result = stockManagementData.deleteUser(user);
    this.assertEquals("return value", 1, result);
  }
  //測試查詢用戶的方法
  public void testGetUserByUserName() {
    String userName = "jack";
    String[][] result = stockManagementData.getUserByUserName(userName);
    this.assertEquals("return value", "jack", result[0][1]);
  }
  //測試日志數據表記錄的創建方法
  public void testCreateUserLog() throws Exception{
    String programName = "登陸窗口";
    String operationContent = "登陸";
    String userName = "jack";
    //int result = stockManagementData.createUserLog(programName, operationContent, userName);
    //this.assertEquals("return value", 1, result);
  }
  //測試日志數據表記錄的刪除方法
  public void testDeleteUserLog() throws Exception{
    Integer id = new Integer(1);
    //int result = stockManagementData.deleteUserLog(id);
    //this.assertEquals("return value", 1, result);
  }
  //測試返回數據庫的所有數據表名字方法
  public void testGetTableNames() throws Exception{
    String[] tableNames = stockManagementData.getTableNames();
    this.assertEquals("returnValue", "accountEntryLedger", tableNames[0]);
    //this.assertEquals("returnValue", "accountName", tableNames[1]);
  }
  //測試取得數據表數據的方法
  public void testGetDataByTableName() throws Exception{
    String[][] data = stockManagementData.getDataByTableName("userTable");
    this.assertEquals("returnValue", "ame", data[0][0]);
  }
  //測試寫入數據表數據的方法
  public void testSetDataByTableName() throws Exception{
    String[][] data = new String[][] {
        {"20040427", "0", "供應商", "請購員", "訂購員", "驗收員", "現金管理員", "收貨地址",
        "倉庫", "2004-04-26", "2004-4-26 18:16:10", "1", "備注"},
        {"20040426", "0", "aa1", "aa2", "aa3", "aa4", "aa5", "aa6", "aa7",
        "2004-04-26", "2004-4-26 18:16:10", "0", "ss"}
    };
    //向數據表stockLedger寫入記錄
    int result = stockManagementData.setDataByTableName("stockLedger", data);
    this.assertEquals("returnValue", 1, result);
    data = new String[][] {
        {"1", "20040427", "55566", "15.23", "58", "2004-04-26"},
        {"2", "20040426", "55566", "15.23", "58", "2004-04-26 13:45:12"}
    };
    //向數據表stockSubLedger寫入記錄
    result = stockManagementData.setDataByTableName("stockSubLedger", data);
    this.assertEquals("returnValue", 1, result);
  }
  //測試取得帳套名字的方法
  public void testGetLedgerNames() throws Exception{
    String[] ledgerNames = stockManagementData.getLedgerNames();
    this.assertEquals("return value", 1, ledgerNames.length);
  }
  //測試創建帳套的方法
  public void testCreateLedger()  throws Exception{
    String ledgerDate = "200405";
    int result = stockManagementData.createLedger(ledgerDate);
    this.assertEquals("return value", 1, result);
    result = stockManagementData.createLedger(ledgerDate);
    this.assertEquals("return value", 0, result);
  }

  //測試刪除帳套的方法
  public void testDeleteLedger()  throws Exception{
    String ledgerDate = "200403";
    int result = stockManagementData.deleteLedger(ledgerDate);
    this.assertEquals("return value", 0, result);
  }
  //測試商品類別的創建方法
  public void testCreateGoodsCategory() throws Exception{
    /*int parentId = 0;
    String categoryName = "商品類別1";
    String categoryDescription = "商品類別1的描述";
    int result = stockManagementData.createGoodsCategory(parentId, categoryName, categoryDescription);
    this.assertEquals("return value", 1, result);
    parentId = 0;
    categoryName = "商品類別2";
    categoryDescription = "商品類別2的描述";
    result = stockManagementData.createGoodsCategory(parentId, categoryName, categoryDescription);
    this.assertEquals("return value", 1, result);*/
  }
  //測試商品類別的更新方法
  public void testUpdateGoodsCategory() throws Exception{
    int categoryId = 1;
    int parentId = 0;
    String categoryName = "商品類別1(更新)";
    String categoryDescription = "商品類別1的描述";
    int result = stockManagementData.updateGoodsCategory(categoryId, parentId,
        categoryName, categoryDescription);
    this.assertEquals("return value", 1, result);
  }
  //測試商品類別的findAll方法
  public void testFindAll() throws Exception{
    String[][] detail = stockManagementData.getAllGoodsCategory();
    this.assertEquals("", 2, detail.length);
  }
  //測試商品類別的刪除方法
  public void testDeleteGoodsCategory() throws Exception{
    /*int categoryId = 1;
    int result = stockManagementData.deleteGoodsCategory(categoryId);
    this.assertEquals("return value", 1, result);
    categoryId = 2;
    result = stockManagementData.deleteGoodsCategory(categoryId);
    this.assertEquals("return value", 1, result);*/
  }
  //測試商品創建方法
  public void testGoodsCreate() throws Exception {
    /*String goodsBarCode = "10000001";
    int categoryId = 1;
    String goodsName  = "類別1的商品1";
    String goodsNickName = "別名1";
    String goodsAssistantName = "助記碼1";
    String goodsPYName = "LBDSP1";
    String unit = "件";
    String specification = "每箱10件";
    String producer = "生產廠商1";
    int upperLimit = 0;
    int lowerLimit = 0;
    double salePrice = 15;
    double discount = 1;
    //創建商品
    int result = stockManagementData.createGoods(goodsBarCode, categoryId,
                     goodsName, goodsNickName, goodsAssistantName, goodsPYName, unit,
                     specification, producer, upperLimit, lowerLimit, salePrice, discount);
    this.assertEquals("return value", 1, result);
    goodsBarCode = "10000002";
    categoryId = 1;
    goodsName  = "類別1的商品2";
    goodsNickName = "別名2";
    goodsAssistantName = "助記碼2";
    goodsPYName = "LBDSP2";
    unit = "件";
    specification = "每箱10件";
    producer = "生產廠商2";
    upperLimit = 0;
    lowerLimit = 0;
    salePrice = 20.12;
    discount = 0.56;
    //創建商品
    result = stockManagementData.createGoods(goodsBarCode, categoryId, goodsName,
                  goodsNickName, goodsAssistantName, goodsPYName, unit,
                  specification, producer, upperLimit, lowerLimit, salePrice, discount);
    this.assertEquals("return value", 1, result);*/
  }
  //測試商品更新方法
  public void testGoodsUpdate() throws Exception {
    String goodsBarCode = "10000001";
    int categoryId = 1;
    String goodsName  = "類別1的商品1(更新)";
    String goodsNickName = "別名1";
    String goodsAssistantName = "助記碼1";
    String goodsPYName = "LBDSP1";
    String unit = "件";
    String specification = "每箱10件";
    String producer = "生產廠商1";
    int upperLimit = 0;
    int lowerLimit = 0;
    double salePrice = 15;
    double discount = 1;
    int result = stockManagementData.updateGoods(goodsBarCode, categoryId, goodsName,
                  goodsNickName, goodsAssistantName, goodsPYName, unit,
                  specification, producer, upperLimit, lowerLimit, salePrice, discount);
    this.assertEquals("return value", 1, result);
  }
  //測試根據類別取得商品的方法
  public void testFindByGoodsCategory() throws Exception {
    int goodsCategory = 1;
    String[][] detail = stockManagementData.getGoodsByGoodsCategory(goodsCategory);
    this.assertEquals("", 2, detail.length);
  }
  //測試根據條形碼取得商品的方法
  public void testFindByGoodsBarCode() throws Exception {
    String goodsBarCode = "1";
    String[][] detail = stockManagementData.getGoodsByGoodsBarCode(goodsBarCode);
    this.assertEquals("", 3, detail.length);
  }
  //測試根據商品名字取得商品的方法
  public void testFindByGoodsName() throws Exception {
    String goodsName = "商品";
    String[][] detail = stockManagementData.getGoodsByGoodsName(goodsName);
    this.assertEquals("", 3, detail.length);
  }
  //測試根據生產廠商取得商品的方法
  public void testFindByProducer() throws Exception {
    String goodsName = "生產廠商";
    String[][] detail = stockManagementData.getGoodsByProducer(goodsName);
    this.assertEquals("", 3, detail.length);
  }
  //測試設置商品折扣的方法
  public void testSetGoodsDiscount() throws Exception {
    String goodsBarCode = "10000001";
    double discount = 0.85;
    int result = stockManagementData.setGoodsDiscount(goodsBarCode, discount);
    this.assertEquals("return value", 1, result);
  }
  //測試取得折扣商品的方法
  public void testFindDiscountGoods() throws Exception {
    String[][] detail = stockManagementData.getDiscountGoods();
    this.assertEquals("", 2, detail.length);
  }
  //測試商品刪除方法
  public void testGoodsDelete() throws Exception {
    /*String goodsBarCode = "10000001";
    int result = stockManagementData.deleteGoods(goodsBarCode);
    this.assertEquals("return value", 1, result);
    goodsBarCode = "10000002";
    result = stockManagementData.deleteGoods(goodsBarCode);
    this.assertEquals("return value", 1, result);*/
  }
  //測試供應商創建方法
  public void testSupplierCreate() throws Exception{
    //創建供應商數組
    String[] supplier = new String[]{"測試供應商1", "南部", "拼音碼1", "簡稱1", "021-556892",
        "張凡", "1350058956", "021-896523", "021-963258", "地址1", "511896",
        "中行", "銀行帳號", "jack@hotmail.com", "www.jack.com", "備注1"};
    //創建供應商
    int result = stockManagementData.createSupplier(supplier);
    this.assertEquals("", 1, result);
    supplier = new String[]{"測試供應商2", "北部", "拼音碼2", "簡稱2", "021-556892",
        "張凡", "1350058956", "021-896523", "021-963258", "地址2", "511896",
        "中行", "銀行帳號", "jack@hotmail.com", "www.jack.com", "備注2"};
    //創建供應商
    result = stockManagementData.createSupplier(supplier);
    this.assertEquals("", 1, result);
    supplier = new String[]{"測試供應商3", "南部", "拼音碼3", "簡稱3", "021-556892",
        "張凡", "1350058956", "021-896523", "021-963258", "地址3", "511896",
        "中行", "銀行帳號", "jack@hotmail.com", "www.jack.com", "備注3"};
    //創建供應商

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
麻豆91在线看| 亚洲欧洲国产日本综合| 日本欧美加勒比视频| 欧美一区二区三区视频免费| 视频精品一区二区| 欧美精品一区二区不卡| 国产精品一二三区在线| 中文子幕无线码一区tr| 91在线观看地址| 亚洲gay无套男同| 欧美tickling网站挠脚心| 国产综合成人久久大片91| 欧美国产精品专区| 欧美亚洲一区二区在线观看| 日韩在线一二三区| 久久久久久97三级| aa级大片欧美| 日韩经典一区二区| 国产日韩v精品一区二区| 91社区在线播放| 午夜视频一区二区| 国产午夜一区二区三区| 一本一本久久a久久精品综合麻豆| 亚洲国产一区二区在线播放| 精品入口麻豆88视频| 99免费精品视频| 丝袜美腿亚洲综合| 欧美极品少妇xxxxⅹ高跟鞋 | 精品少妇一区二区三区视频免付费| 国产精品亚洲а∨天堂免在线| 国产精品福利av| 4438亚洲最大| 99这里都是精品| 免费视频一区二区| 亚洲免费观看高清完整版在线观看熊 | 亚洲黄色免费电影| 精品国产一区二区三区不卡| 色综合久久综合| 国内一区二区在线| 亚洲一线二线三线视频| 国产欧美日韩另类视频免费观看| 欧美日韩综合在线| 高潮精品一区videoshd| 日韩av一区二区三区四区| 国产精品你懂的| 日韩欧美高清在线| 欧美性色综合网| 不卡欧美aaaaa| 精品在线一区二区| 午夜伦欧美伦电影理论片| 国产精品久久久久精k8| 2023国产一二三区日本精品2022| 91久久香蕉国产日韩欧美9色| 7777精品久久久大香线蕉| 福利视频网站一区二区三区| 久久成人麻豆午夜电影| 亚洲二区在线视频| 亚洲人成网站色在线观看| 亚洲国产成人一区二区三区| 日韩免费一区二区三区在线播放| 欧美午夜一区二区| 色播五月激情综合网| av日韩在线网站| 国产精品一区二区久激情瑜伽| 午夜精品久久久久| 亚洲国产综合色| 一区二区三区日韩欧美| 尤物在线观看一区| 亚洲精品水蜜桃| 综合欧美一区二区三区| 国产精品卡一卡二卡三| 欧美激情综合五月色丁香小说| 日韩欧美一区电影| 日韩视频永久免费| 日韩欧美成人午夜| 日韩免费看网站| 日韩午夜电影在线观看| 日韩免费看的电影| ww亚洲ww在线观看国产| 久久色.com| 国产亚洲综合在线| 国产精品欧美一区喷水| 日韩一区中文字幕| 亚洲欧美日韩一区| 一区二区国产盗摄色噜噜| 亚洲激情图片一区| 午夜精品福利一区二区三区av| 日日摸夜夜添夜夜添国产精品| 日日夜夜一区二区| 裸体歌舞表演一区二区| 国产一区二区三区国产| 成人av网站免费观看| 99久久久精品| 色爱区综合激月婷婷| 欧美嫩在线观看| 日韩欧美高清一区| 国产精品免费看片| 一区二区三区在线视频观看| 性做久久久久久免费观看| 日精品一区二区三区| 久久se精品一区二区| 成人激情午夜影院| 91蜜桃网址入口| 欧美日韩国产经典色站一区二区三区| 8x8x8国产精品| 久久久久国产精品厨房| 1000部国产精品成人观看| 亚洲一区二区免费视频| 激情欧美日韩一区二区| 成人免费视频caoporn| 欧美日韩国产综合一区二区| 欧美不卡视频一区| 亚洲欧美激情在线| 免费成人在线播放| www.综合网.com| 日韩视频永久免费| 亚洲男同性恋视频| 久久精品国产精品亚洲综合| 99久久精品国产导航| 丝袜亚洲另类丝袜在线| 成人黄色在线视频| 欧美精品欧美精品系列| 中文字幕高清一区| 日韩av电影免费观看高清完整版| 国产盗摄精品一区二区三区在线 | 99精品国产一区二区三区不卡| 欧美美女激情18p| 国产亚洲一区二区三区四区| 亚洲成人免费在线观看| 国产精品一区二区黑丝| 欧美久久久一区| 亚洲视频一区二区在线| 国产一区二区在线免费观看| 欧美日韩国产美女| 亚洲欧洲成人av每日更新| 久久aⅴ国产欧美74aaa| 欧美色综合天天久久综合精品| 久久精品网站免费观看| 另类小说欧美激情| 欧美性三三影院| 亚洲欧洲国产日本综合| 国产精品1024久久| 日韩一级二级三级精品视频| 亚洲自拍欧美精品| 99精品视频在线免费观看| 精品国一区二区三区| 日日夜夜精品视频免费| 日本乱码高清不卡字幕| 国产精品高潮久久久久无| 国产伦精品一区二区三区免费迷| 欧美日本高清视频在线观看| 亚洲免费av观看| 成人美女视频在线观看| 国产丝袜欧美中文另类| 韩国三级在线一区| 日韩欧美国产一区二区三区| 日本成人在线电影网| 777午夜精品视频在线播放| 亚洲不卡在线观看| 欧美性色综合网| 亚洲一区二区三区爽爽爽爽爽| 91一区二区在线观看| 亚洲女爱视频在线| 在线视频一区二区免费| 亚洲一区二区精品久久av| 欧美性生活大片视频| 午夜av一区二区三区| 欧美久久久久久蜜桃| 日韩精品成人一区二区三区| 欧美一级艳片视频免费观看| 同产精品九九九| 欧美精品一二三区| 日本不卡一二三| 日韩欧美一区二区久久婷婷| 狠狠色丁香久久婷婷综合_中| 欧美成人r级一区二区三区| 久久国产麻豆精品| 久久久久国产一区二区三区四区 | 视频一区欧美精品| 日韩午夜激情av| 狠狠久久亚洲欧美| 欧美高清在线视频| zzijzzij亚洲日本少妇熟睡| 一区二区三区蜜桃网| 欧美日韩成人一区二区| 看片网站欧美日韩| 国产欧美综合在线| 日本韩国欧美一区二区三区| 91视频在线观看免费| 一区二区三区中文字幕在线观看| 欧美三级视频在线播放| 男女性色大片免费观看一区二区| 精品久久久久99| 大胆欧美人体老妇| 悠悠色在线精品| 欧美高清精品3d| 国产一区二区不卡老阿姨| 最新国产成人在线观看| 91麻豆精品91久久久久同性| 国产麻豆一精品一av一免费|