use of org.opengis.filter.expression.Literal in project ddf by codice.
the class TestCswRecordMapperFilterVisitor method testLiteralWithNoType.
@Test
public void testLiteralWithNoType() {
Date date = new Date();
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS");
String dateString = formatter.format(date);
Literal val = factory.literal(dateString);
Literal literal = (Literal) visitor.visit(val, null);
assertThat(literal.getValue(), instanceOf(String.class));
assertThat(literal.getValue(), is(dateString));
}
Aggregations