ого вау работает
This commit is contained in:
parent
0434d1b3b8
commit
f1b09d7994
@ -63,9 +63,7 @@ public class JpaCustomerTests {
|
||||
Assertions.assertThrows(EntityNotFoundException.class, () -> orderService.findOrder(-1L));
|
||||
// 2 покупателя
|
||||
final Customer customer2 = customerService.addCustomer("Иннокентий", "Иванов");
|
||||
// 3 сеанса
|
||||
final Session session3 = sessionService.addSession(300.0,
|
||||
new Timestamp(System.currentTimeMillis()), cinema2.getId());
|
||||
|
||||
// 1 заказ
|
||||
final Order order2 = orderService
|
||||
.addOrder(customerService.findCustomer(customer2.getId()));
|
||||
@ -75,6 +73,9 @@ public class JpaCustomerTests {
|
||||
// у заказа 1 сеанс
|
||||
orderService.deleteSessionInOrder(order2.getId(), session2.getId());
|
||||
// у заказа 0 сеансов
|
||||
// 3 сеанса
|
||||
final Session session3 = sessionService.addSession(300.0,
|
||||
new Timestamp(System.currentTimeMillis()), cinema2.getId());
|
||||
// осталось 2 сеанса
|
||||
sessionService.deleteSession(session1.getId());
|
||||
Assertions.assertEquals(sessionService.findAllSessions().size(), 2);
|
||||
|
Loading…
Reference in New Issue
Block a user