Register 테스트 작성 #7
                
     Open
            
            
          
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
📌Linked Issues
✏Change Details
테스트용 gradle 의존성 수정
spring-boot-starter-test의존성 추가adapter)에h2관련 테스트 의존성 추가adapter모듈에서data의 클래스를 주입받을 때 정상 실행은 되지만 인텔리제이에서 밑줄이 표시되는 이슈가 있었습니다.adapter모듈에서data에 대한 의존을implementation에서api로 수정하니 해결됐습니다!Register 테스트 작성
Adapter의 경우 내부에 여러 메서드를 포함하고 있으므로@Nested클래스를 활용하였습니다.(이전 프로젝트의 컨벤션과 같음)@Nested는 사용하지 않았습니다.@Sql을 활용하였습니다.@BeforeEach와 같은 메서드를 활용할 수도 있으나 코드가 길어지며 중복 코드가 너무 많아진다고 판단하였습니다.Member생성과 같은 작업을 의미합니다. 대부분의 로직이 유저 간의 상호작용을 가지므로, 매 테스트 시 마다Member를 생성하여야 하고 이는 중복코드가 너무 많아진다고 생각했습니다.adapter,api,application모듈만 테스트를 작성하였습니다.domain모듈의 경우 현재 테스트할만한 로직이 없어서, 추후에 복잡한 로직이 추가될 경우 테스트를 작성하겠습니다.data모듈도 현재 단순한JpaRepository만을 가지므로 작성하지 않았습니다. 추후에 querydsl, JPQL 사용 시에 테스트를 작성할 것 같습니다.💬Comment
📑References
✅Check List