public void TestGreaterThanString() { var filter = new FilterBuilder(); filter.Where("field").GreaterThan("something"); Assert.AreEqual("field gt \"something\"", filter.ToString()); }
public void TestGreaterThanInt() { var filter = new FilterBuilder(); filter.Where("field").GreaterThan(1); Assert.AreEqual("field gt 1", filter.ToString()); }
public void TestStartsWithString() { var filter = new FilterBuilder(); filter.Where("field").StartsWith("something"); Assert.AreEqual("field sw \"something\"", filter.ToString()); }
public void TestStartsWithInt() { var filter = new FilterBuilder(); filter.Where("field").StartsWith(1); Assert.AreEqual("field sw 1", filter.ToString()); }
public void TestContainsString() { var filter = new FilterBuilder(); filter.Where("field").Contains("something"); Assert.AreEqual("field co \"something\"", filter.ToString()); }
public void TestContainsInt() { var filter = new FilterBuilder(); filter.Where("field").Contains(1); Assert.AreEqual("field co 1", filter.ToString()); }
public void TestEqualToDate() { var filter = new FilterBuilder(); filter.Where("field").EqualTo(new DateTime(2014,1,1)); Assert.AreEqual("field eq \"2014-01-01T00:00:00.000Z\"", filter.ToString()); }
public void TestEqualToBoolean() { var filter = new FilterBuilder(); filter.Where("field").EqualTo(true); Assert.AreEqual("field eq true", filter.ToString()); }
public void TestEqualToInt() { var filter = new FilterBuilder(); filter.Where("field").EqualTo(1); Assert.AreEqual("field eq 1", filter.ToString()); }
public void TestLessThanOrEqualDate() { var filter = new FilterBuilder(); filter.Where("field").LessThanOrEqual(new DateTime(2014, 1, 1)); Assert.AreEqual("field le \"2014-01-01T00:00:00.000Z\"", filter.ToString()); }
public void TestLessThanOrEqualInt() { var filter = new FilterBuilder(); filter.Where("field").LessThanOrEqual(1); Assert.AreEqual("field le 1", filter.ToString()); }
public void TestLessThanOrEqualString() { var filter = new FilterBuilder(); filter.Where("field").LessThanOrEqual("something"); Assert.AreEqual("field le \"something\"", filter.ToString()); }
public void TestEqualToString() { var filter = new FilterBuilder(); filter.Where("field").EqualTo("something"); Assert.AreEqual("field eq \"something\"", filter.ToString()); }