public void PASS_CreateQuery()
 {
     DoubleRangeFilter query = new DoubleRangeFilter("field", 1.1);
     Assert.IsNotNull(query);
     Assert.AreEqual("field", query.Field);
     Assert.AreEqual(1.1, query.GreaterThan);
 }
        public void PASS_Serializer()
        {
            DoubleRangeFilter query = new DoubleRangeFilter("field", 1.1);
            string json = JsonConvert.SerializeObject(query);
            Assert.IsNotNull(json);

            string expectedJson = "{\"range\":{\"field\":{\"gt\":1.1}}}";
            Assert.AreEqual(expectedJson, json);
        }
 public void FAIL_CreateQuery_Range()
 {
     try
     {
         DoubleRangeFilter query = new DoubleRangeFilter("field");
         Assert.Fail();
     }
     catch (ArgumentNullException ex)
     {
         Assert.AreEqual("range", ex.ParamName);
     }
 }