use of org.z3950.zing.cql.cql2pgjson.FieldException in project raml-module-builder by folio-org.
the class CQLWrapperTest method allRecords.
@Test
public void allRecords() throws FieldException {
CQLWrapper wrapper = new CQLWrapper().setField(new CQL2PgJSON("field")).setQuery("cql.allRecords=1");
assertThat(wrapper.toString(), is(" WHERE true"));
}
use of org.z3950.zing.cql.cql2pgjson.FieldException in project raml-module-builder by folio-org.
the class CQLWrapperTest method wrap.
@Test
public void wrap() throws FieldException {
CQLWrapper wrapper = new CQLWrapper().setField(new CQL2PgJSON("field")).setQuery("cql.allRecords=1");
wrapper.addWrapper(wrapper);
wrapper.addWrapper(wrapper, "or");
assertThat(wrapper.toString(), is(" WHERE true and true or true"));
}
use of org.z3950.zing.cql.cql2pgjson.FieldException in project raml-module-builder by folio-org.
the class CQLWrapperTest method invalidCQL.
@Test(expected = IllegalStateException.class)
public void invalidCQL() throws FieldException {
CQLWrapper wrapper = new CQLWrapper().setField(new CQL2PgJSON("field")).setQuery("or name=miller");
wrapper.toString();
}
Aggregations