亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
欧美中文字幕一区二区三区 | 欧美一区二区三区免费| 日韩视频免费观看高清完整版| 国产日韩欧美不卡| 日本视频一区二区| 色欧美日韩亚洲| 久久精品欧美日韩| 免费成人结看片| 欧美在线不卡一区| 国产精品白丝在线| 国产99精品国产| 久久久噜噜噜久久中文字幕色伊伊| 偷拍日韩校园综合在线| 色综合色综合色综合| 国产精品美女视频| 国产精品亚洲成人| 精品91自产拍在线观看一区| 偷窥国产亚洲免费视频| 欧美中文字幕一二三区视频| 国产精品高潮呻吟| 成人免费毛片app| 国产日韩欧美精品综合| 国产久卡久卡久卡久卡视频精品| 日韩一区二区免费电影| 日韩电影免费一区| 欧美日韩视频专区在线播放| 亚洲网友自拍偷拍| 欧美亚洲一区二区三区四区| 亚洲美女视频在线观看| 91免费精品国自产拍在线不卡| 国产日韩视频一区二区三区| 国产一本一道久久香蕉| 久久亚洲精品小早川怜子| 久久成人精品无人区| 精品动漫一区二区三区在线观看| 日本亚洲最大的色成网站www| 91精品欧美久久久久久动漫 | 国产精品欧美久久久久无广告| 国产一区二区三区四| 国产亚洲欧美日韩日本| 99精品视频在线播放观看| 亚洲视频一区在线观看| 91麻豆成人久久精品二区三区| 亚洲黄色小说网站| 欧美撒尿777hd撒尿| 日韩成人免费电影| 精品日韩一区二区三区免费视频| 国产麻豆9l精品三级站| 欧美激情艳妇裸体舞| 91欧美一区二区| 亚洲国产成人av网| 日韩视频一区二区在线观看| 国产美女一区二区三区| 日本一区二区三区免费乱视频| 成人黄色国产精品网站大全在线免费观看 | 51精品视频一区二区三区| 美女视频黄 久久| 久久久国产一区二区三区四区小说 | 欧美精品自拍偷拍动漫精品| 麻豆精品在线看| 国产日韩成人精品| 在线观看视频91| 激情综合网av| 国产精品入口麻豆九色| 在线亚洲欧美专区二区| 蜜桃在线一区二区三区| 日本一区二区成人在线| 欧美天堂一区二区三区| 韩国一区二区视频| 亚洲最新视频在线观看| 精品国产麻豆免费人成网站| 91亚洲精品一区二区乱码| 午夜欧美电影在线观看| 中文字幕第一区二区| 欧美精品乱码久久久久久按摩| 国产成人精品一区二 | 国产精品无码永久免费888| 色嗨嗨av一区二区三区| 国内一区二区在线| 亚洲一区av在线| 日本一区二区三区国色天香| 91精品国产麻豆| 91丨porny丨国产| 久久国产精品72免费观看| 亚洲综合色婷婷| 中文字幕国产精品一区二区| 日韩一区二区免费在线电影| 在线视频国内自拍亚洲视频| 成人一级片在线观看| 毛片av一区二区| 亚洲一本大道在线| 综合欧美亚洲日本| 欧美国产激情一区二区三区蜜月| 欧美一级精品在线| 欧美二区三区91| 色狠狠av一区二区三区| 99视频在线观看一区三区| 韩国在线一区二区| 精品一区二区日韩| 免费一级欧美片在线观看| 亚洲美女一区二区三区| 成人免费一区二区三区视频| 国产精品久久久久久久久晋中| 久久久另类综合| 精品国产欧美一区二区| 日韩欧美专区在线| 日韩欧美一级精品久久| 3atv一区二区三区| 正在播放亚洲一区| 6080国产精品一区二区| 欧美日韩国产精品成人| 欧美亚洲丝袜传媒另类| 91黄视频在线| 色av综合在线| 欧美日韩免费不卡视频一区二区三区 | 美国毛片一区二区| 麻豆国产欧美日韩综合精品二区 | 69p69国产精品| 91精品欧美福利在线观看| 538在线一区二区精品国产| 欧美一区二视频| 日韩精品一区二区三区四区视频| 欧美成人伊人久久综合网| 日韩欧美国产wwwww| 久久久久久夜精品精品免费| 久久蜜桃一区二区| 欧美激情一区二区三区蜜桃视频 | 肉丝袜脚交视频一区二区| 亚洲国产精品久久久久婷婷884| 亚洲影视在线观看| 五月天婷婷综合| 精品一区二区三区不卡 | 日韩成人av影视| 精品一区二区三区免费毛片爱| 国产精品88888| 99久久夜色精品国产网站| 欧美日韩中文字幕一区二区| 欧美电影免费观看完整版| 久久亚洲精品国产精品紫薇 | 久久亚洲精品小早川怜子| 国产蜜臀97一区二区三区| 亚洲欧美另类小说视频| 秋霞午夜av一区二区三区| 国产一区二区在线影院| 99久久精品国产麻豆演员表| 欧美日韩久久久| 国产午夜精品一区二区| 亚洲国产美女搞黄色| 久草在线在线精品观看| 99久久精品国产一区二区三区| 欧美精品在欧美一区二区少妇 | 538在线一区二区精品国产| 久久久久久9999| 夜夜嗨av一区二区三区中文字幕| 麻豆国产精品777777在线| 99视频热这里只有精品免费| 7777精品伊人久久久大香线蕉的 | 成人动漫一区二区| 在线综合+亚洲+欧美中文字幕| 国产亚洲精品bt天堂精选| 亚洲国产一区二区三区青草影视| 国产综合久久久久影院| 欧美欧美午夜aⅴ在线观看| 久久精品亚洲麻豆av一区二区| 亚洲成人动漫在线免费观看| 国产成人精品一区二区三区网站观看 | 亚洲电影欧美电影有声小说| 国产成人三级在线观看| 欧美久久久一区| 亚洲欧美视频在线观看视频| 韩国女主播一区| 欧美日韩精品欧美日韩精品| 中文字幕 久热精品 视频在线| 奇米亚洲午夜久久精品| 在线视频国内自拍亚洲视频| 国产精品免费aⅴ片在线观看| 久久99国产精品麻豆| 欧美日韩成人综合在线一区二区| 中文字幕视频一区二区三区久| 美日韩黄色大片| 欧美高清你懂得| 亚洲自拍欧美精品| 99精品欧美一区| 久久精品一区四区| 国产在线播放一区| 精品成人一区二区三区| 青青草原综合久久大伊人精品优势| 色老综合老女人久久久| 国产精品不卡在线| 成人av在线一区二区三区| 国产欧美一区二区三区在线老狼 | 婷婷丁香激情综合| 色av成人天堂桃色av| 亚洲精品久久久蜜桃| 91啪亚洲精品| 亚洲综合在线第一页| 欧美天堂一区二区三区| 亚洲大片在线观看| 69久久夜色精品国产69蝌蚪网 | 亚洲精品视频在线看|