mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#831 - EQL query language parser needs to throw exception on invalid query ... "find ..." - tests
This commit is contained in:
@@ -15,6 +15,12 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class EqlParserTest extends BaseTestCase {
|
||||
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void illegal_syntax() throws Exception {
|
||||
parse("find Article where name = :p0");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void where_eq() throws Exception {
|
||||
|
||||
@@ -52,6 +58,11 @@ public class EqlParserTest extends BaseTestCase {
|
||||
assertThat(query.getGeneratedSql()).contains("where t0.name = ?");
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void where_namedParam_otherOrder() {
|
||||
parse("where :name < plannedEnd");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void where_namedParam_startsWith() throws Exception {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user