public void CreatePatch() { var mapper = new ApiAdminServerModelMapper(); var model = new ApiAdminServerRequestModel(); model.SetProperties(DateTime.Parse("1/1/1987 12:00:00 AM"), "A", "A", "A", "A", 1); JsonPatchDocument <ApiAdminServerRequestModel> patch = mapper.CreatePatch(model); var response = new ApiAdminServerRequestModel(); patch.ApplyTo(response); response.Birthday.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.Email.Should().Be("A"); response.FirstName.Should().Be("A"); response.LastName.Should().Be("A"); response.Phone.Should().Be("A"); response.UserId.Should().Be(1); }
public void CreatePatch() { var mapper = new ApiAdminServerModelMapper(); var model = new ApiAdminServerRequestModel(); model.SetProperties("A", "A", "A", "A", "A", "A"); JsonPatchDocument <ApiAdminServerRequestModel> patch = mapper.CreatePatch(model); var response = new ApiAdminServerRequestModel(); patch.ApplyTo(response); response.Email.Should().Be("A"); response.FirstName.Should().Be("A"); response.LastName.Should().Be("A"); response.Password.Should().Be("A"); response.Phone.Should().Be("A"); response.Username.Should().Be("A"); }