-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BE] 체크리스트 업데이트 시 지하철 역도 변경되도록 수정한다 #882
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -157,6 +157,15 @@ public static ChecklistRequest CHECKLIST_UPDATE_REQUEST() { | |||||
); | ||||||
} | ||||||
|
||||||
public static ChecklistRequestV1 CHECKLIST_UPDATE_REQUEST_V1() { | ||||||
return new ChecklistRequestV1( | ||||||
RoomFixture.ROOM_UPDATE_REQUEST(), List.of(1, 2, 3, 4), | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 반영했습니다! |
||||||
List.of(QUESTION_1_CREATE_REQUEST(), QUESTION_2_CREATE_REQUEST(), | ||||||
QUESTION_3_CREATE_REQUEST(), QUESTION_5_UPDATE_REQUEST()), | ||||||
ChecklistStationRequest.of(37.5, 127.1) | ||||||
); | ||||||
} | ||||||
|
||||||
public static ChecklistRequest CHECKLIST_UPDATE_REQUEST_NO_ROOM_NAME() { | ||||||
return new ChecklistRequest( | ||||||
RoomFixture.ROOM_CREATE_REQUEST_NO_ROOM_NAME(), | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ | |
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
public class ChecklistRepositoryTest extends IntegrationTestSupport { | ||
public class ChecklistStationRepositoryTest extends IntegrationTestSupport { | ||
|
||
@Autowired | ||
RoomRepository roomRepository; | ||
|
@@ -30,11 +30,12 @@ public class ChecklistRepositoryTest extends IntegrationTestSupport { | |
@Autowired | ||
UserRepository userRepository; | ||
|
||
@Autowired | ||
ChecklistStationRepository checklistStationRepository; | ||
|
||
Room room; | ||
User user; | ||
Checklist checklist; | ||
@Autowired | ||
ChecklistStationRepository checklistStationRepository; | ||
|
||
@BeforeEach | ||
void setUp() { | ||
|
@@ -63,4 +64,19 @@ void findByChecklistId_noData_exception() { | |
assertThat(checklistStationRepository.findByChecklist(checklist)) | ||
.isEmpty(); | ||
} | ||
|
||
@DisplayName("체크리스트 아이디를 통한 삭제 성공") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. DisplayName에 지하철에 대한 내용이 포함되면 좋겠어요! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ChecklistStationRepositoryTest라 저는 포함하지 않아도 괜찮을 것 같아요! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 일단 안붙이는 방향으로 가보겠습니다! |
||
@Test | ||
void deleteAllByChecklistId_noData_exception() { | ||
// given | ||
ChecklistStation checklistStation1 = new ChecklistStation(checklist, "잠실", "2호선", 5); | ||
ChecklistStation checklistStation2 = new ChecklistStation(checklist, "잠실", "8호선", 6); | ||
checklistStationRepository.saveAll(List.of(checklistStation1, checklistStation2)); | ||
|
||
// when | ||
checklistStationRepository.deleteAllByChecklistId(checklist.getId()); | ||
|
||
// then | ||
assertThat(checklistStationRepository.findByChecklist(checklist)).isEmpty(); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@param 붙여주세용 ㅠㅠ 자꾸 터져요 ..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
반영했습니다!