public void Create_When_DepartureModel_is_valid_Then_returns_id() { var flightService = new FlightService(unitOfWork, mapper, new FlightValidator()); var expectedDeparture = new DepartureDto() { Date = DateTime.Now, Number = flightService.Get(1).Number, CrewId = 1, PlaneId = 1 }; var id = service.Create(expectedDeparture); var actualDeparture = service.Get(id); Assert.AreEqual(expectedDeparture.Date, actualDeparture.Date); Assert.AreEqual(expectedDeparture.Number, actualDeparture.Number); }