public void CreatePatch() { var mapper = new ApiTenantModelMapper(); var model = new ApiTenantRequestModel(); model.SetProperties("A"); JsonPatchDocument <ApiTenantRequestModel> patch = mapper.CreatePatch(model); var response = new ApiTenantRequestModel(); patch.ApplyTo(response); response.Name.Should().Be("A"); }
public void CreatePatch() { var mapper = new ApiTenantModelMapper(); var model = new ApiTenantRequestModel(); model.SetProperties(BitConverter.GetBytes(1), "A", "A", "A", "A"); JsonPatchDocument <ApiTenantRequestModel> patch = mapper.CreatePatch(model); var response = new ApiTenantRequestModel(); patch.ApplyTo(response); response.DataVersion.Should().BeEquivalentTo(BitConverter.GetBytes(1)); response.JSON.Should().Be("A"); response.Name.Should().Be("A"); response.ProjectIds.Should().Be("A"); response.TenantTags.Should().Be("A"); }