Exemplo n.º 1
0
        public virtual ApiDestinationServerRequestModel MapServerResponseToRequest(
            ApiDestinationServerResponseModel response)
        {
            var request = new ApiDestinationServerRequestModel();

            request.SetProperties(
                response.CountryId,
                response.Name,
                response.Order);
            return(request);
        }
        public void MapModelToEntity()
        {
            var mapper = new DALDestinationMapper();
            ApiDestinationServerRequestModel model = new ApiDestinationServerRequestModel();

            model.SetProperties(1, "A", 1);
            Destination response = mapper.MapModelToEntity(1, model);

            response.CountryId.Should().Be(1);
            response.Name.Should().Be("A");
            response.Order.Should().Be(1);
        }