From db66ccb006096d93b219083d2c1b26686fb5e6b4 Mon Sep 17 00:00:00 2001 From: punkryn Date: Fri, 14 Jun 2024 10:52:19 +0900 Subject: [PATCH] =?UTF-8?q?=EB=A6=AC=EB=B7=B0=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ticketing/controller/dto/PostTicketingRequestDto.java | 8 +------- .../ticketing/usecase/dto/CreateTicketingCommandDto.java | 5 +---- .../ticketing/controller/TicketingControllerTest.java | 8 -------- .../ticketing/usecase/CreateTicketingUseCaseTest.java | 1 - .../ticketing/usecase/DeleteTicketingUseCaseTest.java | 6 ------ .../ticketing/usecase/UpdateTicketingUseCaseTest.java | 4 ---- .../com/tiketeer/Tiketeer/infra/redis/RedisCacheTest.java | 4 ---- 7 files changed, 2 insertions(+), 34 deletions(-) diff --git a/src/main/java/com/tiketeer/Tiketeer/domain/ticketing/controller/dto/PostTicketingRequestDto.java b/src/main/java/com/tiketeer/Tiketeer/domain/ticketing/controller/dto/PostTicketingRequestDto.java index 57e325bd..d97fcaa8 100644 --- a/src/main/java/com/tiketeer/Tiketeer/domain/ticketing/controller/dto/PostTicketingRequestDto.java +++ b/src/main/java/com/tiketeer/Tiketeer/domain/ticketing/controller/dto/PostTicketingRequestDto.java @@ -46,9 +46,6 @@ public class PostTicketingRequestDto { @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss", timezone = "Asia/Seoul") private final LocalDateTime saleEnd; - @NotNull - private final List tickets; - @Builder public PostTicketingRequestDto( @NotBlank String title, @@ -58,8 +55,7 @@ public PostTicketingRequestDto( @NotNull Integer runningMinutes, @NotNull LocalDateTime eventTime, @NotNull LocalDateTime saleStart, - @NotNull LocalDateTime saleEnd, - @NotNull List tickets) { + @NotNull LocalDateTime saleEnd) { this.title = title; this.description = description; this.location = location; @@ -68,7 +64,6 @@ public PostTicketingRequestDto( this.eventTime = eventTime; this.saleStart = saleStart; this.saleEnd = saleEnd; - this.tickets = tickets; } public CreateTicketingCommandDto convertToDto(String memberEmail, MultipartFile thumbnail) { @@ -83,7 +78,6 @@ public CreateTicketingCommandDto convertToDto(String memberEmail, MultipartFile .eventTime(eventTime) .saleStart(saleStart) .saleEnd(saleEnd) - .tickets(tickets) .build(); } } diff --git a/src/main/java/com/tiketeer/Tiketeer/domain/ticketing/usecase/dto/CreateTicketingCommandDto.java b/src/main/java/com/tiketeer/Tiketeer/domain/ticketing/usecase/dto/CreateTicketingCommandDto.java index 7e71511a..9758a7cc 100644 --- a/src/main/java/com/tiketeer/Tiketeer/domain/ticketing/usecase/dto/CreateTicketingCommandDto.java +++ b/src/main/java/com/tiketeer/Tiketeer/domain/ticketing/usecase/dto/CreateTicketingCommandDto.java @@ -25,7 +25,6 @@ public class CreateTicketingCommandDto { private final LocalDateTime saleEnd; private final MultipartFile thumbnail; private LocalDateTime commandCreatedAt = LocalDateTime.now(); - private final List tickets; @Builder public CreateTicketingCommandDto( @@ -38,8 +37,7 @@ public CreateTicketingCommandDto( MultipartFile thumbnail, LocalDateTime eventTime, LocalDateTime saleStart, - LocalDateTime saleEnd, LocalDateTime commandCreatedAt, - List tickets) { + LocalDateTime saleEnd, LocalDateTime commandCreatedAt) { this.memberEmail = memberEmail; this.title = title; this.description = description; @@ -53,6 +51,5 @@ public CreateTicketingCommandDto( if (commandCreatedAt != null) { this.commandCreatedAt = commandCreatedAt; } - this.tickets = tickets; } } diff --git a/src/test/java/com/tiketeer/Tiketeer/domain/ticketing/controller/TicketingControllerTest.java b/src/test/java/com/tiketeer/Tiketeer/domain/ticketing/controller/TicketingControllerTest.java index e3632aa0..9d83041a 100644 --- a/src/test/java/com/tiketeer/Tiketeer/domain/ticketing/controller/TicketingControllerTest.java +++ b/src/test/java/com/tiketeer/Tiketeer/domain/ticketing/controller/TicketingControllerTest.java @@ -184,10 +184,6 @@ void postTicketingSuccess() throws Exception { .eventTime(now.plusYears(3)) .saleStart(now.plusYears(1)) .saleEnd(now.plusYears(2)) - .tickets(Arrays.asList( - new CreateTicketMetadata(10, 10, "Gold", "", 2000), - new CreateTicketMetadata(10, 10, "Silver", "", 1000) - )) .build(); var content = objectMapper.writeValueAsString(req); @@ -344,10 +340,6 @@ private CreateTicketingCommandDto createCreateTicketingCommand(String email, Str .saleStart(now.plusYears(1)) .saleEnd(now.plusYears(2)) .eventTime(now.plusYears(3)) - .tickets(Arrays.asList( - new CreateTicketMetadata(10, 10, "Gold", "", 2000), - new CreateTicketMetadata(10, 10, "Silver", "", 1000) - )) .build(); } diff --git a/src/test/java/com/tiketeer/Tiketeer/domain/ticketing/usecase/CreateTicketingUseCaseTest.java b/src/test/java/com/tiketeer/Tiketeer/domain/ticketing/usecase/CreateTicketingUseCaseTest.java index f964e755..beaba2bd 100644 --- a/src/test/java/com/tiketeer/Tiketeer/domain/ticketing/usecase/CreateTicketingUseCaseTest.java +++ b/src/test/java/com/tiketeer/Tiketeer/domain/ticketing/usecase/CreateTicketingUseCaseTest.java @@ -195,7 +195,6 @@ private CreateTicketingCommandDto createTicketingCommand(String email, LocalDate .saleStart(saleStart) .saleEnd(saleEnd) .thumbnail(thumbnail) - .tickets(tickets) .build(); } diff --git a/src/test/java/com/tiketeer/Tiketeer/domain/ticketing/usecase/DeleteTicketingUseCaseTest.java b/src/test/java/com/tiketeer/Tiketeer/domain/ticketing/usecase/DeleteTicketingUseCaseTest.java index 788236ad..23e8607e 100644 --- a/src/test/java/com/tiketeer/Tiketeer/domain/ticketing/usecase/DeleteTicketingUseCaseTest.java +++ b/src/test/java/com/tiketeer/Tiketeer/domain/ticketing/usecase/DeleteTicketingUseCaseTest.java @@ -132,8 +132,6 @@ void deleteTicketingSuccess() { Assertions.assertThat(ticketingOpt.isPresent()).isTrue(); var ticketing = ticketingOpt.get(); - Assertions.assertThat(ticketRepository.findAllByTicketing(ticketing).size()) - .isEqualTo(createTicketingCommand.getTickets().size()); var deleteTicketingCommand = DeleteTicketingCommandDto.builder() .ticketingId(ticketingId) @@ -164,10 +162,6 @@ private CreateTicketingCommandDto createTicketingCommand(String email, LocalDate .eventTime(eventTime) .saleStart(saleStart) .saleEnd(saleEnd) - .tickets(Arrays.asList( - new CreateTicketMetadata(10, 10, "Gold", "", 2000), - new CreateTicketMetadata(10, 10, "Silver", "", 1000) - )) .build(); } diff --git a/src/test/java/com/tiketeer/Tiketeer/domain/ticketing/usecase/UpdateTicketingUseCaseTest.java b/src/test/java/com/tiketeer/Tiketeer/domain/ticketing/usecase/UpdateTicketingUseCaseTest.java index ffa20fd2..d635698b 100644 --- a/src/test/java/com/tiketeer/Tiketeer/domain/ticketing/usecase/UpdateTicketingUseCaseTest.java +++ b/src/test/java/com/tiketeer/Tiketeer/domain/ticketing/usecase/UpdateTicketingUseCaseTest.java @@ -326,10 +326,6 @@ private CreateTicketingCommandDto createTicketingCommand(String email, LocalDate .eventTime(eventTime) .saleStart(saleStart) .saleEnd(saleEnd) - .tickets(Arrays.asList( - new CreateTicketMetadata(10, 10, "Gold", "", 2000), - new CreateTicketMetadata(10, 10, "Silver", "", 1000) - )) .build(); } } diff --git a/src/test/java/com/tiketeer/Tiketeer/infra/redis/RedisCacheTest.java b/src/test/java/com/tiketeer/Tiketeer/infra/redis/RedisCacheTest.java index 1be97aa9..e95d71c2 100644 --- a/src/test/java/com/tiketeer/Tiketeer/infra/redis/RedisCacheTest.java +++ b/src/test/java/com/tiketeer/Tiketeer/infra/redis/RedisCacheTest.java @@ -154,10 +154,6 @@ private CreateTicketingResultDto createTicketing(String email, LocalDateTime sal .location("") .category("") .description("") - .tickets(Arrays.asList( - new CreateTicketMetadata(10, 10, "Gold", "", 2000), - new CreateTicketMetadata(10, 10, "Silver", "", 1000) - )) .build(); return createTicketingUseCase.createTicketing(createTicketingCommandDto); }