public void WriteToFileTest() { // Arrange var changedItems = new List<ILoggable>(); var customer = new Customer(1) { EmailAddress = "*****@*****.**", FirstName = "Frodo", LastName = "Baggins", AddressList = null }; changedItems.Add((ILoggable) customer); var product = new Product(2) { ProductName = "Rake", ProductDescription = "Garden Rake with Steel Head", CurrentPrice = 6M }; changedItems.Add((ILoggable) product); // Act LoggingService.WriteToFile(changedItems); //Assert //Nothing here to assert }
public Product Retrieve(int productid) { var product = new Product(productid); if (productid == 2) { product.ProductName = "Sunflowers"; product.ProductDescription = "Assorted "; product.CurrentPrice = 15.96M; } return product; }
public bool Save(Product product) { var success = true; if (product.HasChanges && product.IsValid) { if (product.IsNew) { // call an insert stored proc //Pizza } else { // Call an update stored proc } } return success; }