示例#1
0
        public virtual ApiTagResponseModel MapBOToModel(
            BOTag boTag)
        {
            var model = new ApiTagResponseModel();

            model.SetProperties(boTag.Id, boTag.Count, boTag.ExcerptPostId, boTag.TagName, boTag.WikiPostId);

            return(model);
        }
示例#2
0
        public void MapResponseToRequest()
        {
            var mapper = new ApiTagModelMapper();
            var model  = new ApiTagResponseModel();

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

            response.Count.Should().Be(1);
            response.ExcerptPostId.Should().Be(1);
            response.TagName.Should().Be("A");
            response.WikiPostId.Should().Be(1);
        }