use of org.opengis.filter.PropertyIsGreaterThan in project ddf by codice.
the class TestCswRecordMapperFilterVisitor method testVisitPropertyIsGreaterThanTemporal.
@Test
public void testVisitPropertyIsGreaterThanTemporal() {
Expression val = factory.literal(new Date(System.currentTimeMillis() - 1000));
Expression test = new AttributeExpressionImpl(new NameImpl(new QName(CswConstants.DUBLIN_CORE_SCHEMA, "TestDate", CswConstants.DUBLIN_CORE_NAMESPACE_PREFIX)));
PropertyIsGreaterThan filter = factory.greater(test, val);
Object obj = visitor.visit(filter, null);
assertThat(obj, instanceOf(During.class));
During duplicate = (During) obj;
assertThat(duplicate.getExpression1(), is(test));
assertThat(duplicate.getExpression2(), is(val));
}
use of org.opengis.filter.PropertyIsGreaterThan in project ddf by codice.
the class TestCswRecordMapperFilterVisitor method testVisitPropertyIsGreaterThan.
@Test
public void testVisitPropertyIsGreaterThan() {
Expression val = factory.literal(8);
PropertyIsGreaterThan filter = factory.greater(attrExpr, val);
Object obj = visitor.visit(filter, null);
assertThat(obj, instanceOf(PropertyIsGreaterThan.class));
PropertyIsGreaterThan duplicate = (PropertyIsGreaterThan) obj;
assertThat(duplicate.getExpression1(), is(attrExpr));
assertThat(duplicate.getExpression2(), is(val));
}
Aggregations