public void UpdateCarTest() { var carGuid = Guid.NewGuid(); var car = new Car { Guid = carGuid, Mark = "Matiz", Model = "Sedan" }; DbCarWorker.AddCar(car); var getCar = DbCarWorker.GetCar(carGuid); Assert.IsNotNull(getCar); getCar.Mark = "Matizy"; getCar.Model = "Sedany"; DbCarWorker.UpdateCar(getCar); var updatedCar = DbCarWorker.GetCar(carGuid); Assert.IsNotNull(getCar); Assert.AreEqual(getCar.Mark, "Matizy"); Assert.AreEqual(getCar.Model, "Sedany"); DbCarWorker.DeleteCar(carGuid); }
private OrderWindowModel CreateModelByCar(Guid carGuid) { var model = new OrderWindowModel() { Car = DbCarWorker.GetCar(carGuid), AdditionalServices = DbReferenceWorker.GetAdditionalServiceReference() }; return(model); }
public void GetCarTest() { var carGuid = Guid.NewGuid(); var car = new Car { Guid = carGuid, Mark = "Audi", Model = "Sedan" }; DbCarWorker.AddCar(car); var getCar = DbCarWorker.GetCar(carGuid); Assert.IsNotNull(getCar); DbCarWorker.DeleteCar(carGuid); }