コード例 #1
0
        public virtual ApiVoteTypeResponseModel MapBOToModel(
            BOVoteType boVoteType)
        {
            var model = new ApiVoteTypeResponseModel();

            model.SetProperties(boVoteType.Id, boVoteType.Name);

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

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

            response.Name.Should().Be("A");
        }