Skip to content

Commit

Permalink
Check OpenJpa query validation.
Browse files Browse the repository at this point in the history
  • Loading branch information
odrotbohm committed Jul 18, 2012
1 parent 9734010 commit 42718c5
Showing 1 changed file with 18 additions and 0 deletions.
Expand Up @@ -56,6 +56,24 @@ public void findsAllByGivenIds() {


} }


@Test
public void checkQueryValidationWithOpenJpa() {

try {
em.createQuery("something absurd");
fail("Creating query did not validate it");
} catch (Exception e) {
// expected
}

try {
em.createNamedQuery("not available");
fail("Creating invalid named query did not validate it");
} catch (Exception e) {
// expected
}
}

/** /**
* Test case for https://issues.apache.org/jira/browse/OPENJPA-2018 * Test case for https://issues.apache.org/jira/browse/OPENJPA-2018
*/ */
Expand Down

0 comments on commit 42718c5

Please sign in to comment.