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 @@ -43,6 +43,19 @@ public void populateDb(VertxTestContext context) {
4343 test ( context , getMutinySessionFactory ().withTransaction ( s -> s .persistAll ( pizza , schnitzel ) ) );
4444 }
4545
46+ @ Test
47+ public void testStatelessInsert (VertxTestContext context ) {
48+ LocationId nottingham = new LocationId ( "UK" , "Nottingham" );
49+ Delivery mushyPeas = new Delivery ( nottingham , "Mushy Peas with mint sauce" );
50+ test ( context , getMutinySessionFactory ()
51+ .withStatelessTransaction ( s -> s .insert ( mushyPeas ) )
52+ .chain ( () -> getMutinySessionFactory ()
53+ .withTransaction ( s -> s .find ( Delivery .class , nottingham ) )
54+ )
55+ .invoke ( result -> assertThat ( result ).isEqualTo ( mushyPeas ) )
56+ );
57+ }
58+
4659 @ Test
4760 public void testFindSingleId (VertxTestContext context ) {
4861 test ( context , getMutinySessionFactory ().withTransaction ( s -> s .find ( Delivery .class , verbania ) )
You can’t perform that action at this time.
0 commit comments