Test for insert values

This commit is contained in:
gavinking 2020-02-16 01:25:49 +01:00 committed by Steve Ebersole
parent 95ff568b3d
commit 0381da76b9
1 changed files with 11 additions and 0 deletions

View File

@ -43,6 +43,17 @@ public class InsertUpdateTests {
);
}
@Test
public void testInsertValues(SessionFactoryScope scope) {
scope.inTransaction(
session -> {
session.createQuery("delete from Ticket").executeUpdate();
session.createQuery("insert into Ticket (id, key, subject, details) values (6, 'ABC123', 'Outage', 'Something is broken')").executeUpdate();
session.createQuery("insert into Ticket (id, key, subject, details) values (2, 'XYZ123', 'Outage', 'Something is broken'), (13, 'HIJ456', 'x', 'x')").executeUpdate();
}
);
}
@Test
public void testInsertSelect(SessionFactoryScope scope) {
scope.inTransaction(