public void UpdateUsingPartial() { var originalProject = new ElasticSearchProject { Id = 1, Name = "NeST", Country = "UK" }; var partialUpdate = new PartialElasticSearchProject { Name = "NEST", Country = "Netherlands" }; var s = new UpdateDescriptor<ElasticSearchProject, PartialElasticSearchProject>() .Object(originalProject) //only used to infer the id .Document(partialUpdate); //the actual partial update statement; this.JsonEquals(s, MethodInfo.GetCurrentMethod()); }
public void UpdateUsingPartial() { var originalProject = new ElasticSearchProject { Id = 1, Name = "NeST", Country = "UK" }; var partialUpdate = new PartialElasticSearchProject { Name = "NEST", Country = "Netherlands" }; var s = new UpdateDescriptor <ElasticSearchProject, PartialElasticSearchProject>() .Object(originalProject) //only used to infer the id .Document(partialUpdate); //the actual partial update statement; this.JsonEquals(s, MethodInfo.GetCurrentMethod()); }