mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-09 08:42:18 +00:00
#831 - EQL query language parser needs to throw exception on invalid query ... "find ..." - tests
This commit is contained in:
1 parent
504a209a78
commit
d6cd41f8d2
1 file changed
+11
@@ -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