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

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