예제 #1
0
 public void AddNewProductTest()
 {
     _productManagement._writeNewData += EventHandler;
     String[] list = new String[] { "name", "999", "category", "path", "detail" };
     _productManagement.AddNewProduct(list);
     Assert.AreEqual(_productManagement.GetEditProduct(), _productManagement.GetLatestProduct());
     Assert.AreEqual(_productManagement.GetEditProduct().ProductName, "name");
     Assert.AreEqual(_productManagement.GetEditProduct().ProductPrice, "999");
     Assert.AreEqual(_productManagement.GetEditProduct().ProductCategory, "category");
     Assert.AreEqual(_productManagement.GetEditProduct().ProductPicturePath, "path");
     Assert.AreEqual(_productManagement.GetEditProduct().ProductDetail, "detail");
     Assert.AreEqual(_productManagement.GetEditProduct().ProductQuantity, "0");
     _productManagement._writeNewData += EventHandler;
 }
예제 #2
0
 // 新增商品
 public void AddNewProduct(String[] content)
 {
     _productManagement.AddNewProduct(content);
 }