public void Customer_Add_SingleRecord() { dataSetup.AddOrUpdateCustomer(dataSetup.getCustomer2()); IList <Customer> customers = new List <Customer>(); using (var repo = new BaseRepository <Customer>()) { customers = (IList <Customer>)repo.findAll(); Assert.AreEqual(customers.Count, 1); repo.Delete(customers); repo.save(); } }
public void CustomerVehile_Add_SingleRecord() { Customer tcust = dataSetup.getCustomerWithVehicle(); dataSetup.AddOrUpdateCustomer(tcust); IList <Customer> customers = new List <Customer>(); using (var repo = new BaseRepository <Customer>()) { Customer tcust2 = repo.FindById(tcust.CustomerId); Assert.IsNotNull(tcust2); Assert.AreEqual(tcust2.Vehicles.Count, 1); } }