들어가기에 앞서
실제 프로젝트 진행했던 코드 내용은 업로드하지 않았습니다
@SpringBootTest@Bootstrapwith + @ExtendWith를 포함JUnit5 쓸 때 @ExtendWith(SpringExtension.class) 쓰지 않기!! (많이 하는 실수)@TestJUnit5 애노테이션@WebMvcTest 등...MockMvc 빈을 자동 설정하고 테스트에 사용ctrl + shift + t 로 테스트 클래스 제작@SpringBootTest로 테스트해보기@DisplayName 으로 테스트 시 콘솔에서 표시되는 테스트명 표시 가능import static 기능 으로 status(), content(), containsString() 등 호출ctrl + enter 로 import 클래스/메소드 부른 뒤 다시 한 번 alt+enter@WebMvcTest로 테스트해보기에러 해결
caused by: org.gradle.internal.uncheckedexception: java.lang.classnotfoundexception: com.example.inline.controller.basecontrollertest at org.gradle.internal.uncheckedexception.throwasuncheckedexception(uncheckedexception.java:68) at org.gradle.internal.uncheckedexception.throwasuncheckedexception(uncheckedexception.java:41)
https://giters.com/jojoldu/freelec-springboot2-webservice/issues/577
GET 기능 정상적으로 작동 되는지json 이므로 jsonPath 문법 숙지 필요record 타입 PlaceDTO 생성record 타입 레퍼런스 조사 필요List <String> 이 아닌 APIDataResponse 리턴)GET 관련 추가 테스트