Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Check OpenJpa query validation.

  • Loading branch information...
commit 42718c57fe961253af12f1775fcb701385ec8ad8 1 parent 9734010
Oliver Gierke authored July 18, 2012
18  src/test/java/org/springframework/data/jpa/repository/OpenJpaNamespaceUserRepositoryTests.java
@@ -56,6 +56,24 @@ public void findsAllByGivenIds() {
56 56
 
57 57
 	}
58 58
 
  59
+	@Test
  60
+	public void checkQueryValidationWithOpenJpa() {
  61
+
  62
+		try {
  63
+			em.createQuery("something absurd");
  64
+			fail("Creating query did not validate it");
  65
+		} catch (Exception e) {
  66
+			// expected
  67
+		}
  68
+
  69
+		try {
  70
+			em.createNamedQuery("not available");
  71
+			fail("Creating invalid named query did not validate it");
  72
+		} catch (Exception e) {
  73
+			// expected
  74
+		}
  75
+	}
  76
+
59 77
 	/**
60 78
 	 * Test case for https://issues.apache.org/jira/browse/OPENJPA-2018
61 79
 	 */

0 notes on commit 42718c5

Please sign in to comment.
Something went wrong with that request. Please try again.