-
Notifications
You must be signed in to change notification settings - Fork 237
refactor: MVC Response 학습테스트 실패환경 구성 #1
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
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.
고생 많으셨습니다!
기존 학습 테스트에서 변경된 부분에 대해서도 코멘트를 남겨주시면 감사하겠습니다!
그리고 작업 시 README 파일도 함께 변경이 필요할 것 같아요 :)
| import org.springframework.ui.Model; | ||
|
|
||
| @Controller | ||
| public class MemberController { |
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.
혹시 컨트롤러 이름이 변경된 이유가 있을까요?
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.
| public Model world() { | ||
| // TODO: /hello 요청 시 resources/templates/hello.html 페이지가 응답할 수 있도록 설정한다. | ||
| return null; | ||
| } |
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.
리턴타입이 String에서 Model로 변경되었네요! 혹시 이유가 있을까요?
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.
Model을 활용하는 예제를 생각하다가 잘못 작성한 부분인 것 같습니다 😅
String으로 다시 변경하겠습니다!
| public Person json() { | ||
| // TODO: /json 요청 시 {"name": "brown", "age": 20} 응답할 수 있도록 설정한다. | ||
| return null; | ||
| } |
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.
요청 url도 변경이 발생했네요! 혹시 이유가 있을까요?
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.
| @Test | ||
| void responseTemplatesHelloPage() { | ||
| var response = RestAssured | ||
| .given().log().all() | ||
| .when().get("/hello") | ||
| .then().log().all().extract(); | ||
|
|
||
| assertThat(response.statusCode()).isEqualTo(HttpStatus.OK.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.
새로운 학습 테스트 👍
|
브라운 안녕하세요~! 변경된 구조에 맞춰 반영해봤습니다! LMS 자료에 맞춰 코드를 재구성했습니다! 특이사항정적파일 로드와 관련하여 hello.html이 아닌 static.html을 이용하도록 문서를 변경했습니다. 만약 반영된다면 이에 대한 LMS 자료 수정이 필요할 것 같아 별도로 특이사항으로 구분하여 말씀드립니다 |
boorownie
left a comment
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.
제안 주신 부분 좋습니다! 그렇게 반영하시죠 👍
누락된 부분이 보여서 코멘트 드립니다!
| .when().get("/person") | ||
| .then().log().all().extract(); | ||
| .given().log().all() | ||
| .when().get("/person") |
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.
이 부분이 누락된 것 같습니다.
| .when().get("/person") | |
| .when().get("/json") |
| .then().log().all().extract(); | ||
|
|
||
| assertThat(response.statusCode()).isEqualTo(HttpStatus.OK.value()); | ||
| assertThat(response.as(Person.class).getName()).isEqualTo("Brown"); |
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(response.as(Person.class).getName()).isEqualTo("Brown"); | |
| assertThat(response.as(Person.class).getName()).isEqualTo("brown"); |
| - 테스트 메서드: `cholog.ResponseStaticTest.responseStaticPage` | ||
| - 수행 방법 | ||
| - `resources/templates/hello.html` 을 이용하여 학습 테스트를 성공시키세요. | ||
| - `resources/templates/static.html` 을 이용하여 학습 테스트를 성공시키세요. |
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.
👍
| - 테스트 메서드: `cholog.ResponseStaticTest.responseStaticPage` | ||
| - 수행 방법 | ||
| - `resources/templates/hello.html` 을 이용하여 학습 테스트를 성공시키세요. | ||
| - `resources/templates/static.html` 을 이용하여 학습 테스트를 성공시키세요. |
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.
👍
boorownie
left a comment
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.
피드백 반영 확인했습니다.
감사함니다!



🚀 작업 내용
LMS의
✅ 학습 테스트 - MVC Response페이지를 기준으로 실패하는 테스트 환경을 구성했습니다.💬 리뷰 중점사항
브랜치 생성 권한이 없어 PR에 의견 남겨봅니다!
target 브랜치를 main이 아닌 mvc-response로 하는건 어떨까요?