File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
hibernate-reactive-core/src/test/java/org/hibernate/reactive Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,19 @@ public void populateDb(VertxTestContext context) {
4242 test ( context , getMutinySessionFactory ().withTransaction ( s -> s .persistAll ( pizza , schnitzel ) ) );
4343 }
4444
45+ @ Test
46+ public void testStatelessInsert (VertxTestContext context ) {
47+ LocationId nottingham = new LocationId ( "UK" , "Nottingham" );
48+ Delivery mushyPeas = new Delivery ( nottingham , "Mushy Peas with mint sauce" );
49+ test ( context , getMutinySessionFactory ()
50+ .withStatelessTransaction ( s -> s .insert ( mushyPeas ) )
51+ .chain ( () -> getMutinySessionFactory ()
52+ .withTransaction ( s -> s .find ( Delivery .class , nottingham ) )
53+ )
54+ .invoke ( result -> assertThat ( result ).isEqualTo ( mushyPeas ) )
55+ );
56+ }
57+
4558 @ Test
4659 public void testFindSingleId (VertxTestContext context ) {
4760 test ( context , getMutinySessionFactory ().withTransaction ( s -> s .find ( Delivery .class , verbania ) )
You can’t perform that action at this time.
0 commit comments