-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
1 addition
and
272 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 0 additions & 40 deletions
40
src/main/java/com/tiketeer/Tiketeer/domain/purchase/usecase/GetPurchaseTicketsUseCase.java
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
.../java/com/tiketeer/Tiketeer/domain/purchase/usecase/dto/GetPurchaseTicketsCommandDto.java
This file was deleted.
Oops, something went wrong.
28 changes: 0 additions & 28 deletions
28
...java/com/tiketeer/Tiketeer/domain/purchase/usecase/dto/GetPurchaseTicketsResponseDto.java
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
...n/java/com/tiketeer/Tiketeer/domain/purchase/usecase/dto/GetPurchaseTicketsResultDto.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,12 +35,10 @@ | |
import com.tiketeer.Tiketeer.domain.purchase.repository.PurchaseItemRepository; | ||
import com.tiketeer.Tiketeer.domain.purchase.repository.PurchaseRepository; | ||
import com.tiketeer.Tiketeer.domain.purchase.usecase.dto.CreatePurchaseCommandDto; | ||
import com.tiketeer.Tiketeer.domain.purchase.usecase.dto.GetPurchaseTicketsResponseDto; | ||
import com.tiketeer.Tiketeer.domain.role.constant.RoleEnum; | ||
import com.tiketeer.Tiketeer.domain.ticket.repository.TicketRepository; | ||
import com.tiketeer.Tiketeer.domain.ticketing.TicketingTestHelper; | ||
import com.tiketeer.Tiketeer.infra.redis.RedisService; | ||
import com.tiketeer.Tiketeer.response.ApiResponse; | ||
import com.tiketeer.Tiketeer.testhelper.RedisTestHelper; | ||
import com.tiketeer.Tiketeer.testhelper.TestHelper; | ||
|
||
|
@@ -402,42 +400,4 @@ void deletePurchaseAllTicketsSuccess() throws Exception { | |
assertThat(purchaseRepository.findById(purchase.getId())).isEmpty(); | ||
assertThat(purchaseItemRepository.findAll().size()).isEqualTo(0); | ||
} | ||
|
||
@Test | ||
@DisplayName("티켓팅 및 티켓 생성 및 구매 > 구매 하위 티켓 목록 조회 > 성공") | ||
@Transactional | ||
void getPurchaseTicketsSuccess() throws Exception { | ||
//given | ||
String token = testHelper.registerAndLoginAndReturnAccessToken("[email protected]", RoleEnum.SELLER); | ||
Member member = memberRepository.findAll().getFirst(); | ||
Cookie cookie = new Cookie(JwtMetadata.ACCESS_TOKEN, token); | ||
var ticketing = ticketingTestHelper.createTicketing(member.getId(), 1, 1000, 4); | ||
var ticketId = ticketRepository.findAll().getFirst().getId(); | ||
var purchaseTicketPair = purchaseTestHelper.createPurchase(member.getId(), ticketId, 2); | ||
var purchase = purchaseTicketPair.getFirst(); | ||
var purchaseItems = purchaseTicketPair.getSecond(); | ||
|
||
// when | ||
var result = mockMvc | ||
.perform(get("/api/purchases/{purchaseId}/tickets", purchase.getId()) | ||
.contextPath("/api") | ||
.contentType(MediaType.APPLICATION_JSON) | ||
.characterEncoding("utf-8") | ||
.cookie(cookie) | ||
) | ||
//then | ||
.andExpect(status().isOk()); | ||
//then | ||
|
||
ApiResponse<GetPurchaseTicketsResponseDto> response = testHelper.getDeserializedApiResponse( | ||
result.andReturn().getResponse().getContentAsString(), | ||
GetPurchaseTicketsResponseDto.class); | ||
|
||
var ticketIds = response.getData().getTicketIds(); | ||
assertThat(ticketIds.size()).isEqualTo(2); | ||
purchaseItems.forEach(ticket -> { | ||
assertThat(ticketIds.contains(ticket.getId())).isTrue(); | ||
}); | ||
} | ||
|
||
} |
103 changes: 0 additions & 103 deletions
103
...est/java/com/tiketeer/Tiketeer/domain/purchase/usecase/GetPurchaseTicketsUseCaseTest.java
This file was deleted.
Oops, something went wrong.