[test][main] SampleMapper 단건조회 및 EgovSampleServiceImpl insertSample Mock 단위 테스트 추가#53
Open
dasomel wants to merge 1 commit into
Open
Conversation
- SampleMapperTestSelectSampleTest: SampleMapper.selectSample() 통합 테스트 추가 insert 후 단건 조회 결과의 id/name/description/useYn/regUser 일치 여부 검증 - EgovSampleServiceImplTestInsertSampleMockTest: EgovSampleServiceImpl.insertSample() Mock 단위 테스트 추가 EgovIdGnrService에서 생성된 ID가 VO에 설정되고 SampleMapper.insertSample()이 호출됨을 검증 스프링 컨텍스트 없이 MockitoExtension으로 서비스 레이어 로직만 검증
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
기존 SampleMapper 테스트(insert/update/delete/selectList/selectListTotCnt)에서 누락된 selectSample 단건조회 통합 테스트와, EgovSampleServiceImpl에서 누락된 insertSample Mock 단위 테스트를 추가한다.
변경 내용:
SampleMapperTestSelectSampleTest: insert 후 selectSample 호출하여 id/name/description/useYn/regUser 값 검증
EgovSampleServiceImplTestInsertSampleMockTest: MockitoExtension 기반, EgovIdGnrService에서 발급된 ID가 VO에 설정되고 SampleMapper.insertSample()이 호출되는 흐름 검증 (Spring 컨텍스트 불필요)
단일 주제만 다룸 (테스트 추가 외 변경 없음)
pom.xml 등 빌드 설정 변경 없음
기존 동작에 영향 없음
테스트 3건 BUILD SUCCESS 확인