File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
hibernate-core/src/test/java/org/hibernate/test/annotations Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 88//$Id$
99package org .hibernate .test .annotations ;
1010
11+ import javax .persistence .PersistenceException ;
12+
1113import org .hibernate .HibernateException ;
1214import org .hibernate .Query ;
1315import org .hibernate .Session ;
1416import org .hibernate .SessionFactory ;
1517import org .hibernate .Transaction ;
1618import org .hibernate .cfg .Configuration ;
1719import org .hibernate .cfg .Environment ;
20+ import org .hibernate .hql .internal .ast .QuerySyntaxException ;
1821
1922import org .junit .Test ;
2023
24+ import static org .hibernate .testing .junit4 .ExtraAssertions .assertTyping ;
2125import static org .junit .Assert .assertEquals ;
2226import static org .junit .Assert .assertNotNull ;
2327import static org .junit .Assert .assertTrue ;
@@ -59,7 +63,8 @@ public void testIgnoringHbm() throws Exception {
5963 s .createQuery ( "from Boat" ).list ();
6064 fail ( "Boat should not be mapped" );
6165 }
62- catch (HibernateException e ) {
66+ catch (IllegalArgumentException e ) {
67+ assertTyping ( QuerySyntaxException .class , e .getCause ());
6368 //all good
6469 }
6570 q = s .createQuery ( "from Plane" );
You can’t perform that action at this time.
0 commit comments