public void CreatePatch() { var mapper = new ApiPersonModelMapper(); var model = new ApiPersonRequestModel(); model.SetProperties("A"); JsonPatchDocument <ApiPersonRequestModel> patch = mapper.CreatePatch(model); var response = new ApiPersonRequestModel(); patch.ApplyTo(response); response.PersonName.Should().Be("A"); }
public void CreatePatch() { var mapper = new ApiPersonModelMapper(); var model = new ApiPersonRequestModel(); model.SetProperties("A", "A", 1, "A", "A", "A", DateTime.Parse("1/1/1987 12:00:00 AM"), true, "A", Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"), "A", "A"); JsonPatchDocument <ApiPersonRequestModel> patch = mapper.CreatePatch(model); var response = new ApiPersonRequestModel(); patch.ApplyTo(response); response.AdditionalContactInfo.Should().Be("A"); response.Demographic.Should().Be("A"); response.EmailPromotion.Should().Be(1); response.FirstName.Should().Be("A"); response.LastName.Should().Be("A"); response.MiddleName.Should().Be("A"); response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.NameStyle.Should().Be(true); response.PersonType.Should().Be("A"); response.Rowguid.Should().Be(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da")); response.Suffix.Should().Be("A"); response.Title.Should().Be("A"); }