use of org.opengis.filter.PropertyIsLessThanOrEqualTo in project ddf by codice.
the class TestCswRecordMapperFilterVisitor method testVisitPropertyIsLessThanOrEqualToTemporal.
@Ignore("not supported by solr provider")
@Test
public void testVisitPropertyIsLessThanOrEqualToTemporal() {
Expression val = factory.literal(new Date());
PropertyIsLessThanOrEqualTo filter = factory.lessOrEqual(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(Before.class)));
assertThat(binary.getExpression1(), is(created));
assertThat(binary.getExpression2(), is(val));
}
}
use of org.opengis.filter.PropertyIsLessThanOrEqualTo in project ddf by codice.
the class TestCswRecordMapperFilterVisitor method testVisitPropertyIsLessThanOrEqualTo.
@Test
public void testVisitPropertyIsLessThanOrEqualTo() {
Expression val = factory.literal(8);
PropertyIsLessThanOrEqualTo filter = factory.lessOrEqual(attrExpr, val);
Object obj = visitor.visit(filter, null);
assertThat(obj, instanceOf(PropertyIsLessThanOrEqualTo.class));
PropertyIsLessThanOrEqualTo duplicate = (PropertyIsLessThanOrEqualTo) obj;
assertThat(duplicate.getExpression1(), is(attrExpr));
assertThat(duplicate.getExpression2(), is(val));
}
use of org.opengis.filter.PropertyIsLessThanOrEqualTo in project ddf by codice.
the class CswRecordMapperFilterVisitorTest method testVisitPropertyIsLessThanOrEqualTo.
@Test
public void testVisitPropertyIsLessThanOrEqualTo() {
Expression val = factory.literal(8);
PropertyIsLessThanOrEqualTo filter = factory.lessOrEqual(attrExpr, val);
Object obj = visitor.visit(filter, null);
assertThat(obj, instanceOf(PropertyIsLessThanOrEqualTo.class));
PropertyIsLessThanOrEqualTo duplicate = (PropertyIsLessThanOrEqualTo) obj;
assertThat(duplicate.getExpression1(), is(attrExpr));
assertThat(duplicate.getExpression2(), is(val));
}
use of org.opengis.filter.PropertyIsLessThanOrEqualTo in project ddf by codice.
the class CswRecordMapperFilterVisitorTest method testVisitPropertyIsLessThanOrEqualToTemporal.
@Ignore("not supported by solr provider")
@Test
public void testVisitPropertyIsLessThanOrEqualToTemporal() {
Expression val = factory.literal(new Date());
PropertyIsLessThanOrEqualTo filter = factory.lessOrEqual(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(Before.class)));
assertThat(binary.getExpression1(), is(created));
assertThat(binary.getExpression2(), is(val));
}
}
Aggregations