Skip to content

Commit

Permalink
test: orElseThrow() → get()을 통해 값을 가져오도록 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
yeonise committed Mar 20, 2024
1 parent be11bd7 commit 888a000
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ void createSuccess() {
RoomCode roomCode = roomService.create(sessionCode, address, roomSettings);

// then
Room room = roomStorage.findById(roomCode.getRoomCode()).orElseThrow();
User user = userStorage.findById(sessionCode).orElseThrow();
Room room = roomStorage.findById(roomCode.getRoomCode()).get();
User user = userStorage.findById(sessionCode).get();

assertThat(roomCode.getRoomCode()).hasSize(ROOM_CODE_LENGTH);
assertThat(roomCode.getRoomCode()).isEqualTo(room.getCode());
Expand Down

0 comments on commit 888a000

Please sign in to comment.