use of org.folio.rest.persist.cql.CQLWrapper 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.folio.rest.persist.cql.CQLWrapper 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