public virtual ApiAirTransportResponseModel MapBOToModel( BOAirTransport boAirTransport) { var model = new ApiAirTransportResponseModel(); model.SetProperties(boAirTransport.AirlineId, boAirTransport.FlightNumber, boAirTransport.HandlerId, boAirTransport.Id, boAirTransport.LandDate, boAirTransport.PipelineStepId, boAirTransport.TakeoffDate); return(model); }
public void MapResponseToRequest() { var mapper = new ApiAirTransportModelMapper(); var model = new ApiAirTransportResponseModel(); model.SetProperties(1, "A", 1, 1, DateTime.Parse("1/1/1987 12:00:00 AM"), 1, DateTime.Parse("1/1/1987 12:00:00 AM")); ApiAirTransportRequestModel response = mapper.MapResponseToRequest(model); response.FlightNumber.Should().Be("A"); response.HandlerId.Should().Be(1); response.Id.Should().Be(1); response.LandDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.PipelineStepId.Should().Be(1); response.TakeoffDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); }