コード例 #1
0
        public void CreatePatch()
        {
            var mapper = new ApiTagModelMapper();
            var model  = new ApiTagRequestModel();

            model.SetProperties(1, 1, "A", 1);

            JsonPatchDocument <ApiTagRequestModel> patch = mapper.CreatePatch(model);
            var response = new ApiTagRequestModel();

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