コード例 #1
0
        public virtual ApiDestinationResponseModel MapBOToModel(
            BODestination boDestination)
        {
            var model = new ApiDestinationResponseModel();

            model.SetProperties(boDestination.Id, boDestination.CountryId, boDestination.Name, boDestination.Order);

            return(model);
        }
コード例 #2
0
        public void MapResponseToRequest()
        {
            var mapper = new ApiDestinationModelMapper();
            var model  = new ApiDestinationResponseModel();

            model.SetProperties(1, 1, "A", 1);
            ApiDestinationRequestModel response = mapper.MapResponseToRequest(model);

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