コード例 #1
0
        public void SourceDoNotExists()
        {
            var obj     = @"{
                        query:{}
                        }";
            var jObject = JObject.Parse(obj);

            jObject = JsonPropertyEditor.ExcludeGrayLogMeta(jObject, JsonPropertyEditor.BASIC_TOKENS_TO_IGNORE);
            Assert.True(jObject["_source"] != null && ((JArray)jObject["_source"]["excludes"]).Count > 0);
        }
コード例 #2
0
        public void SourceExistsAppendExcludes()
        {
            var obj     = @"{
                        query:{},
                        _source:{excludes:['jora']},
                        }";
            var jObject = JObject.Parse(obj);

            jObject = JsonPropertyEditor.ExcludeGrayLogMeta(jObject, JsonPropertyEditor.BASIC_TOKENS_TO_IGNORE);
            Assert.True(((JArray)jObject["_source"]["excludes"]).Count > 1);
        }