public void Write() { var record = new PizzaBox.Domain.Models.Elements.SalesTax(); record.Territory = "Mars"; record.Rate = 3.24; record.Save(); using (var context = new PizzaBox.Data.PizzaBoxDbContext()) if (context.StateTaxes.Find(record.Id).Id != System.Guid.Empty) { Assert.Pass("Value: {0}", record.Id); } else { Assert.Fail("Value: {0}", record.Id); } }
public void Delete() { var record = new PizzaBox.Domain.Models.Elements.SalesTax(); record.Territory = "Mars"; record.Rate = 3.24; record.Save(); System.Guid test = record.Id; record.Delete(); using (var context = new PizzaBox.Data.PizzaBoxDbContext()) if (context.StateTaxes.Find(test) == null) { Assert.Pass(); } else { Assert.Fail(); } }