[hibernate-commits] Hibernate SVN: r15380 - annotations/trunk/src/test/org/hibernate/test/annotations/generics.
hibernate-commits at lists.jboss.org
hibernate-commits at lists.jboss.org
Thu Oct 23 05:33:15 EDT 2008
Author: jcosta at redhat.com
Date: 2008-10-23 05:33:14 -0400 (Thu, 23 Oct 2008)
New Revision: 15380
Modified:
annotations/trunk/src/test/org/hibernate/test/annotations/generics/EmbeddedGenericsTest.java
Log:
ANN-778 - changed the test case to use parent's session/exception handling
Modified: annotations/trunk/src/test/org/hibernate/test/annotations/generics/EmbeddedGenericsTest.java
===================================================================
--- annotations/trunk/src/test/org/hibernate/test/annotations/generics/EmbeddedGenericsTest.java 2008-10-23 08:54:17 UTC (rev 15379)
+++ annotations/trunk/src/test/org/hibernate/test/annotations/generics/EmbeddedGenericsTest.java 2008-10-23 09:33:14 UTC (rev 15380)
@@ -28,17 +28,12 @@
public void setUp() throws Exception {
super.setUp();
- session = getSessions().openSession();
+ session = openSession();
session.getTransaction().begin();
edition = new Edition<String>();
edition.name = "Second";
}
- public void tearDown() throws Exception {
- session.close();
- super.tearDown();
- }
-
public void testWorksWithGenericEmbedded() {
Book b = new Book();
b.edition = edition;
@@ -48,6 +43,7 @@
assertEquals( "Second", retrieved.edition.name );
clean( Book.class, b.id );
+ session.close();
}
public void testWorksWithGenericCollectionOfElements() {
@@ -59,6 +55,7 @@
assertEquals( "Second", retrieved.editions.iterator().next().name );
clean( PopularBook.class, b.id );
+ session.close();
}
protected Class[] getMappings() {
More information about the hibernate-commits
mailing list