Assert.assertFalse(between.evaluate(f));
}
@Test
public void testComparatorFilter() throws GeomajasException {
Filter lt = filterService.createCompareFilter("a", "<", "10");
TestFeature f = new TestFeature();
f.expectAndReturn("a", 9);
Assert.assertTrue(lt.evaluate(f));
f.clear();
f.expectAndReturn("a", 11);
Assert.assertFalse(lt.evaluate(f));
Filter lte = filterService.createCompareFilter("a", "<=", "10");
f.clear();
f.expectAndReturn("a", 9);
Assert.assertTrue(lte.evaluate(f));
f.clear();
f.expectAndReturn("a", 10);
Assert.assertTrue(lte.evaluate(f));
f.clear();
f.expectAndReturn("a", 11);
Assert.assertFalse(lte.evaluate(f));
Filter gt = filterService.createCompareFilter("a", ">", "10");
f.clear();
f.expectAndReturn("a", 9);
Assert.assertFalse(gt.evaluate(f));
f.clear();
f.expectAndReturn("a", 11);
Assert.assertTrue(gt.evaluate(f));
Filter gte = filterService.createCompareFilter("a", ">=", "10");
f.clear();
f.expectAndReturn("a", 9);
Assert.assertFalse(gte.evaluate(f));
f.clear();
f.expectAndReturn("a", 10);
Assert.assertTrue(gte.evaluate(f));
f.clear();
f.expectAndReturn("a", 11);
Assert.assertTrue(gte.evaluate(f));
Filter ne = filterService.createCompareFilter("a", "<>", "10");
f.clear();
f.expectAndReturn("a", 9);
Assert.assertTrue(ne.evaluate(f));
f.clear();
f.expectAndReturn("a", 10);
Assert.assertFalse(ne.evaluate(f));
f.clear();
f.expectAndReturn("a", 11);
Assert.assertTrue(ne.evaluate(f));
}