public void TestUpdateFlight() { Flight flightItem = flightsList.First(); AutoMapperConfig.Initialize(); var controller = new FlightController(_flightBLL, _airportBLL); flightItem.DepartureAirportId = 5; flightItem.DestinationAirportId = 10; flightItem.FlightTime = 2; flightItem.AirCratfFuelComsumpDistance = 400; flightItem.TakeOffEffort = 50; var result = controller.UpdadteFlight(flightItem); Assert.IsNotNull(result); Assert.AreEqual(result.Code, "OK"); FlightModel model = controller.GetFlightById(flightItem.Id); Assert.AreEqual(flightItem.FlightTime, model.FlightTime); Assert.AreEqual(flightItem.TakeOffEffort, model.TakeOffEffort); Assert.AreEqual(flightItem.AirCratfFuelComsumpDistance, model.AirCratfFuelComsumpDistance); Assert.AreEqual(flightItem.DepartureAirportId, model.DepartureAirportId); Assert.AreEqual(flightItem.DestinationAirportId, model.DestinationAirportId); }