public void UpdateUsingPartialWithNull() { var originalProject = new ElasticsearchProject { Id = 1, Name = "NEST", Country = "UK" }; var partialUpdate = new PartialElasticsearchProjectWithNull { Country = null }; var s = new UpdateDescriptor<ElasticsearchProject, PartialElasticsearchProjectWithNull>() .IdFrom(originalProject) //only used to infer the id .Doc(partialUpdate); //the actual partial update statement; this.JsonEquals(s, MethodBase.GetCurrentMethod()); }
public void UpdateUsingPartialWithNull() { var originalProject = new ElasticsearchProject { Id = 1, Name = "NEST", Country = "UK" }; var partialUpdate = new PartialElasticsearchProjectWithNull { Country = null }; var s = new UpdateDescriptor <ElasticsearchProject, PartialElasticsearchProjectWithNull>() .IdFrom(originalProject) //only used to infer the id .Doc(partialUpdate); //the actual partial update statement; this.JsonEquals(s, MethodBase.GetCurrentMethod()); }