public void GetProductByID3() { DTO.Warehouse.DtoProduct dto = new DTO.Warehouse.DtoProduct("SP871", "USB Tosiba", "Phụ kiện", 60, 100000.0000, 150000.0000, 20, "cái", "Hàng Trung Qu?c"); bool expected = false; DTO.Warehouse.DtoProduct actual = product.GetProductByID(dto.MaSanPham); Assert.AreEqual(expected, dto.Equals(actual)); }
public void AddProduct3() { DTO.Warehouse.DtoProduct dto = new DTO.Warehouse.DtoProduct("SP497", "USB Tofffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffsiba", "Phụ kiện", 60, 100000.0000, 150000.0000, 20, "cái", "Hàng Trung Qu?c"); Console.WriteLine(dto.ToString()); int expected = 0; int actual = product.AddProduct(dto); Assert.AreEqual(expected, actual); }
public void DeleteProduct3() { DTO.Warehouse.DtoProduct dto = new DTO.Warehouse.DtoProduct("SP35", "USB Tosffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffiba", "Phụ kiện", 60, 100000.0000, 150000.0000, 20, "cái", "Hàng Trung Qu?c"); int expected = 0; int actual = product.DeleteProduct(dto.MaSanPham); Assert.AreEqual(expected, actual); }
public void EditProduct3() { DTO.Warehouse.DtoProduct dto = new DTO.Warehouse.DtoProduct("SP097", "USBffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffTosiba", "Phụ kiện", 60, 100000.0000, 150000.0000, 20, "cái", "Hàng Trung Qu?c"); int expected = 0; int actual = product.EditProduct(dto); Assert.AreEqual(expected, actual); }
public void AddProduct3() { DTO.Warehouse.DtoProduct dto = new DTO.Warehouse.DtoProduct("SP497", "USB Tofffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffsiba", "Phụ kiện", 60, 100000.0000, 150000.0000, 20, "cái", "Hàng Trung Qu?c"); Console.WriteLine(dto.ToString()); int expected = 0; int actual = product.AddProduct(dto); Assert.AreEqual(expected, actual); }
public void EditProduct6() { DTO.Warehouse.DtoProduct dto = new DTO.Warehouse.DtoProduct("SP7", "USBffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffTosiba", "Phụ kiện", 60, 100000.0000, 150000.0000, 20, "cái", "Hàng Trung Qu?c"); bool expected = false; product.EditProduct(dto); DTO.Warehouse.DtoProduct actual = product.GetProductByID(dto.MaSanPham); Assert.AreEqual(expected, actual.Equals(dto)); }
public void AddProduct1() { DTO.Warehouse.DtoProduct dto = new DTO.Warehouse.DtoProduct("SP127", "USB Tosiba", "Phụ kiện", 60, 100000.0000, 150000.0000, 20, "cái", "Hàng Trung Qu?c"); int expected = 1; int actual = product.AddProduct(dto); Assert.AreEqual(expected, actual); //delete product.DeleteProduct(dto.MaSanPham); }
public void AddProduct1() { DTO.Warehouse.DtoProduct dto = new DTO.Warehouse.DtoProduct("SP127", "USB Tosiba", "Phụ kiện", 60, 100000.0000, 150000.0000, 20, "cái", "Hàng Trung Qu?c"); int expected = 1; int actual = product.AddProduct(dto); Assert.AreEqual(expected, actual); //delete product.DeleteProduct(dto.MaSanPham); }
public void AddProduct5() { DTO.Warehouse.DtoProduct dto = new DTO.Warehouse.DtoProduct("SP45", "USB Tosiba", "Phụ", 60, 100000.0000, 150000.0000, 20, "cái", "Hàng Trung Qu?c"); bool expected = true; product.AddProduct(dto); DTO.Warehouse.DtoProduct actual = product.GetProductByID(dto.MaSanPham); Assert.AreEqual(expected, actual.Equals(dto)); //delete product.DeleteProduct(dto.MaSanPham); }
public void AddProduct4() { DTO.Warehouse.DtoProduct dto = new DTO.Warehouse.DtoProduct("SP12", "USB Tosiba", "Phụ kiện", 60, 100000.0000, 150000.0000, 20, "cái", "Hàng Trung Qu?c"); bool expected = true; product.AddProduct(dto); DTO.Warehouse.DtoProduct actual = product.GetProductByID(dto.MaSanPham); Assert.AreEqual(expected, actual.Equals(dto)); //delete product.DeleteProduct(dto.MaSanPham); }
public void AddProduct4() { int expected1 = product.GetListProducts().Rows.Count; int actual1 = 0; DTO.Warehouse.DtoProduct dto = new DTO.Warehouse.DtoProduct("SP1", "USB Tosiba", "Phụ kiện", 60, 100000.0000, 150000.0000, 20, "cái", "Hàng Trung Qu?c"); int expected = 0; int actual = product.AddProduct(dto); Assert.AreEqual(expected, actual); actual1 = product.GetListProducts().Rows.Count; Assert.AreEqual(actual, expected); Assert.AreEqual(actual1, expected1); }
public void EditProduct2() { int expected1 = 0; int actual1 = 0; DTO.Warehouse.DtoProduct dto = new DTO.Warehouse.DtoProduct("SP234234", "USB Tosiba", "Phụ kiện", 90, 100000.0000, 150000.0000, 20, "cái", "Hàng Trung Qu?c"); int expected = 0; int actual = product.EditProduct(dto); actual1 = product.GetProductByID(dto.MaSanPham).ThoiGianBaoHanh; Assert.AreEqual(actual, expected); Assert.AreEqual(actual1, expected1); dto.ThoiGianBaoHanh = 60; product.EditProduct(dto); }
public void EditProduct3() { int expected1 = 0; int actual1 = 0; DTO.Warehouse.DtoProduct dto = new DTO.Warehouse.DtoProduct("SP1", "USB Tosiba", "Phụ kiện", 60, 100000.0000, 150000.0000, 20, "cái", "Hàng Trung Qu?c"); int expected = 1; int actual = product.DeleteProduct(dto.MaSanPham); Assert.AreEqual(expected, actual); actual1 = product.EditProduct(dto); Assert.AreEqual(actual1, expected1); product.AddProduct(dto); }
public void DeleteProduct1() { int expected1 = product.GetListProducts().Rows.Count; int actual1 = 0; DTO.Warehouse.DtoProduct dto = new DTO.Warehouse.DtoProduct("SP112312", "USB Tosiba", "Phụ kiện", 60, 100000.0000, 150000.0000, 20, "cái", "Hàng Trung Qu?c"); int expected = 1; int actual = product.AddProduct(dto); int expected0 = 1; int actual0 = product.DeleteProduct(dto.MaSanPham); actual1 = product.GetListProducts().Rows.Count; Assert.AreEqual(expected0, actual0); Assert.AreEqual(actual, expected); Assert.AreEqual(actual1, expected1); }
public void GetProductByID3() { DTO.Warehouse.DtoProduct dto = new DTO.Warehouse.DtoProduct("SP871", "USB Tosiba", "Phụ kiện", 60, 100000.0000, 150000.0000, 20, "cái", "Hàng Trung Qu?c"); bool expected = false; DTO.Warehouse.DtoProduct actual = product.GetProductByID(dto.MaSanPham); Assert.AreEqual(expected,dto.Equals(actual)); }
public void EditProduct6() { DTO.Warehouse.DtoProduct dto = new DTO.Warehouse.DtoProduct("SP7", "USBffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffTosiba", "Phụ kiện", 60, 100000.0000, 150000.0000, 20, "cái", "Hàng Trung Qu?c"); bool expected = false; product.EditProduct(dto); DTO.Warehouse.DtoProduct actual = product.GetProductByID(dto.MaSanPham); Assert.AreEqual(expected, actual.Equals(dto)); }
public void EditProduct3() { DTO.Warehouse.DtoProduct dto = new DTO.Warehouse.DtoProduct("SP097", "USBffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffTosiba", "Phụ kiện", 60, 100000.0000, 150000.0000, 20, "cái", "Hàng Trung Qu?c"); int expected = 0; int actual = product.EditProduct(dto); Assert.AreEqual(expected, actual); }
public void DeleteProduct3() { DTO.Warehouse.DtoProduct dto = new DTO.Warehouse.DtoProduct("SP35", "USB Tosffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffiba", "Phụ kiện", 60, 100000.0000, 150000.0000, 20, "cái", "Hàng Trung Qu?c"); int expected = 0; int actual = product.DeleteProduct(dto.MaSanPham); Assert.AreEqual(expected, actual); }