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());
		}
示例#2
0
        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());
        }