Junit5
26. 프로필 수정 테스트
인증된 사용자가 접근할 수 있는 기능 테스트하기 실제 DB에 저장되어 있는 정보에 대응하는 인증된 Authentication이 필요하다. @WithMockUser로는 처리할 수 없다. 인증된 사용자를 제공할 커스텀 애노테이션 만들기 @WithAccount https://docs.spring.io/spring-security/reference/servlet/test/method.html#test-method-setup @BeforeEach void beforeEach() { SignUpForm signUpForm = new SignUpForm(); signUpForm.setNickname("jungi"); signUpForm.setEmail("devjun63@gmail.com"); signUpForm.se..
4주차 과제 : JUnit 5
과제 0. JUnit 5 학습하세요. 인텔리J, 이클립스, VS Code에서 JUnit 5로 테스트 코드 작성하는 방법에 익숙해 질 것. 이미 JUnit 알고 계신분들은 다른 것 아무거나! 더 자바, 테스트 강의도 있으니 참고하세요~ junit.org/junit5/docs/current/user-guide/ JUnit 5 User Guide Although the JUnit Jupiter programming model and extension model will not support JUnit 4 features such as Rules and Runners natively, it is not expected that source code maintainers will need to update all..