Export() public method

public Export ( ) : Newtonsoft.Json.Linq.JObject
return Newtonsoft.Json.Linq.JObject
        public void Export_Omits_Field_If_Not_Provided()
        {
            var query = new RegexpQuery("regex");

            var expected = JsonConvert.SerializeObject(new
            {
                regexp = "regex"
            }, Formatting.None);

            Assert.AreEqual(expected, query.Export().ToString(Formatting.None));
        }
        public void Export_Returns_Valud_Json()
        {
            var query = new RegexpQuery("regex")
                .Field("field");

            var expected = JsonConvert.SerializeObject(new
            {
                regexp = "regex",
                field = "field"
            }, Formatting.None);

            Assert.AreEqual(expected, query.Export().ToString(Formatting.None));
        }