-
Notifications
You must be signed in to change notification settings - Fork 279
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
Step3 경로조회 기능 #629
base: owen-q
Are you sure you want to change the base?
Step3 경로조회 기능 #629
Conversation
|
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.
3단계 미션도 빠르게 진행해주셨네요! 👍
코멘트 확인해주시고, 다시 리뷰 요청 주세요!
Assertions.assertThat(shortestPath.getDistance()).isEqualTo(16); | ||
Assertions.assertThat(shortestPath.getStations().get(0)).isEqualTo(stationD); | ||
Assertions.assertThat(shortestPath.getStations().get(1)).isEqualTo(stationA); | ||
Assertions.assertThat(shortestPath.getStations().get(2)).isEqualTo(stationB); | ||
Assertions.assertThat(shortestPath.getStations().get(3)).isEqualTo(stationC); |
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.
- assertThat 앞에 Assertions가 붙는데요, static import를 사용해보면 어떨까요?
- assertThat에서 리스트 내부 객체의 순서를 검증할 땐 containsExactly를 사용해면 어떨까요?
void 오류가발생한다() { | ||
ExtractableResponse<Response> response = RestAssured.given().log().all() | ||
.when().get(getPathUrl(stationC2.getId(), stationC2.getId())) | ||
.then().log().all().extract(); | ||
|
||
Assertions.assertThat(response.statusCode()).isEqualTo(HttpStatus.BAD_REQUEST.value()); | ||
} |
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.
오류 케이스까지 꼼꼼히 작성해주셨네요! 💯
@Configuration | ||
public class ShortedPathFinderConfiguration { | ||
|
||
@Bean | ||
public ShortestPathFinder shortestPathFinder() { | ||
return new DijkstraShortestPathFinder(); | ||
} | ||
} |
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.
DI로 조립해주셨군요! 👍
step3 진행하였습니다~!