public void SaveTestInValid() { var prodcutRepository = new ProductRepositiory(); var updateProduct = new Product(2) { CurrentPrice = null, ProductName = "Mobile", HasChanges = true }; var acutal = prodcutRepository.Save(updateProduct); Assert.AreEqual(true, acutal); }
public void SaveTestMissingPrice() { //Arrange var productRepository = new ProductRepositiory(); var UpdatedProduct = new Product(2) { Current_price = null, Description = "Wooden oak 50cm high table", Name = "Table", HasChanges = true }; //Act var actual = productRepository.Save(UpdatedProduct); //Assert Assert.AreEqual(false, actual); }