use of org.opengis.filter.PropertyIsGreaterThanOrEqualTo in project ddf by codice.
the class TestCswRecordMapperFilterVisitor method testVisitPropertyIsGreaterThanOrEqualTo.
@Test
public void testVisitPropertyIsGreaterThanOrEqualTo() {
Expression val = factory.literal(8);
PropertyIsGreaterThanOrEqualTo filter = factory.greaterOrEqual(attrExpr, val);
Object obj = visitor.visit(filter, null);
assertThat(obj, instanceOf(PropertyIsGreaterThanOrEqualTo.class));
PropertyIsGreaterThanOrEqualTo duplicate = (PropertyIsGreaterThanOrEqualTo) obj;
assertThat(duplicate.getExpression1(), is(attrExpr));
assertThat(duplicate.getExpression2(), is(val));
}
use of org.opengis.filter.PropertyIsGreaterThanOrEqualTo in project ddf by codice.
the class TestCswRecordMapperFilterVisitor method testVisitPropertyIsGreaterThanOrEqualToTemporal.
@Ignore("not supported by solr provider")
@Test
public void testVisitPropertyIsGreaterThanOrEqualToTemporal() {
Expression val = factory.literal(new Date());
PropertyIsGreaterThanOrEqualTo filter = factory.greaterOrEqual(created, val);
Object obj = visitor.visit(filter, null);
assertThat(obj, instanceOf(Or.class));
Or duplicate = (Or) obj;
for (Filter child : duplicate.getChildren()) {
BinaryTemporalOperator binary = (BinaryTemporalOperator) child;
assertThat(binary, anyOf(instanceOf(TEquals.class), instanceOf(After.class)));
assertThat(binary.getExpression1(), is(created));
assertThat(binary.getExpression2(), is(val));
}
}
Aggregations