Пример #1
0
  public void testToFilter() throws Exception {
    String filter = "IN('foo','bar')";
    try {
      CQL.toFilter(filter);
      fail("filter should have thrown exception");
    } catch (CQLException e) {
    }

    Filter f1 = ECQL.toFilter(filter);
    Filter f2 = XCQL.toFilter(filter);
    assertEquals(f1, f2);
  }
Пример #2
0
  public void testToFilterFallback() throws Exception {
    String filter = "id = 2";

    try {
      ECQL.toFilter(filter);
      fail("filter should have thrown exception");
    } catch (CQLException e) {
    }

    Filter f1 = CQL.toFilter(filter);
    Filter f2 = XCQL.toFilter(filter);
    assertEquals(f1, f2);
  }