Skip to content

Commit ae3ce50

Browse files
committed
HHH-19846 - Drop JUnit 4 usage: org.hibernate.orm.test.jpa.transaction/version/xml
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
1 parent 18f301e commit ae3ce50

File tree

7 files changed

+365
-392
lines changed

7 files changed

+365
-392
lines changed

hibernate-core/src/test/java/org/hibernate/orm/test/jpa/transaction/CloseEntityManagerWithActiveTransactionTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public void testPersistThenCloseWithAnActiveTransaction(EntityManagerFactoryScop
119119
}
120120
scope.inEntityManager(
121121
em -> {
122-
final List results = em.createQuery( "from Box" ).getResultList();
122+
final List<Box> results = em.createQuery( "from Box", Box.class ).getResultList();
123123
assertThat( results.size(), is( 1 ) );
124124
}
125125
);
@@ -160,7 +160,7 @@ public void testMergeThenCloseWithAnActiveTransaction(EntityManagerFactoryScope
160160

161161
scope.inEntityManager(
162162
em -> {
163-
final List<Box> boxes = em.createQuery( "from Box" ).getResultList();
163+
final List<Box> boxes = em.createQuery( "from Box", Box.class ).getResultList();
164164
assertThat( boxes.size(), is( 1 ) );
165165
assertThat( boxes.get( 0 ).getMuffinSet().size(), is( 1 ) );
166166
}
@@ -202,7 +202,7 @@ public void testMergeWithDeletionOrphanRemovalThenCloseWithAnActiveTransaction(E
202202

203203
scope.inEntityManager(
204204
em -> {
205-
final List<SmallBox> boxes = em.createQuery( "from SmallBox" ).getResultList();
205+
final List<SmallBox> boxes = em.createQuery( "from SmallBox", SmallBox.class ).getResultList();
206206
assertThat( boxes.size(), is( 1 ) );
207207
assertTrue( boxes.get( 0 ).isEmpty() );
208208
}
@@ -243,7 +243,7 @@ public void testUpdateThenCloseWithAnActiveTransaction(EntityManagerFactoryScope
243243

244244
scope.inEntityManager(
245245
em -> {
246-
final List<Box> boxes = em.createQuery( "from Box" ).getResultList();
246+
final List<Box> boxes = em.createQuery( "from Box", Box.class ).getResultList();
247247
assertThat( boxes.size(), is( 1 ) );
248248
assertThat( boxes.get( 0 ).getMuffinSet().size(), is( 1 ) );
249249
}
@@ -286,7 +286,7 @@ public void testRemoveThenCloseWithAnActiveTransaction(EntityManagerFactoryScope
286286

287287
scope.inEntityManager(
288288
em -> {
289-
final List<Box> boxes = em.createQuery( "from Box" ).getResultList();
289+
final List<Box> boxes = em.createQuery( "from Box", Box.class ).getResultList();
290290
assertThat( boxes.size(), is( 0 ) );
291291
}
292292
);

0 commit comments

Comments
 (0)