public void Add_Duplicate_Make() { var context = new MockContext(); var store = new VehicleStore(context); var make = new Make { Id = 1, Name = "cow" }; context.Makes.Add(make); make.Id = 2; store.AddMake(make); }
public void Add_Make() { var context = new MockContext(); var store = new VehicleStore(context); store.AddMake(new Make { Id = 1, Name = "Cowaskai" }); var make = context.Makes.First(); Assert.AreEqual(1, make.Id); Assert.AreEqual("Cowaskai", make.Name); Assert.AreEqual(1, context.SaveChangesCalls); }