public void Supplier_AddNewProduct4() { Supplier supplier = new Supplier() { ID = 8, UserName = "******", Password = "******", Company = "RadioShack" }; SupplierForms supplierForms = new SupplierForms(TestMode.On, supplier); supplierForms.input.Injections = new List <object>() { "Laptop", "500", 5 }; supplierForms.AddNewProduct(); List <Product> products = new StoreDAO().GetAllSupplierProducts(supplier.ID); Product product = products[products.Count - 1]; Assert.AreEqual(product.Name, "Laptop"); Assert.AreEqual(product.Price, 500); Assert.AreEqual(product.Quantity, 5); }
public void Supplier_AddNewProduct2() { Supplier supplier = new Supplier() { ID = 8, UserName = "******", Password = "******", Company = "RadioShack" }; SupplierForms supplierForms = new SupplierForms(TestMode.On, supplier); supplierForms.input.Injections = new List <object>() { "Laptop", -1 }; supplierForms.AddNewProduct(); }