From f1b09d79944d3edaa78cf131792bf927fe4d2a82 Mon Sep 17 00:00:00 2001 From: dasha Date: Mon, 27 Mar 2023 23:05:30 +0400 Subject: [PATCH] =?UTF-8?q?=D0=BE=D0=B3=D0=BE=20=D0=B2=D0=B0=D1=83=20?= =?UTF-8?q?=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=D0=B5=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/test/java/com/labwork1/app/JpaCustomerTests.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/test/java/com/labwork1/app/JpaCustomerTests.java b/src/test/java/com/labwork1/app/JpaCustomerTests.java index 97ed41c..7f405e1 100644 --- a/src/test/java/com/labwork1/app/JpaCustomerTests.java +++ b/src/test/java/com/labwork1/app/JpaCustomerTests.java @@ -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);