[test][boot-sample] EgovKrdsPaginationRenderer 단위 테스트 추가#50
Merged
eGovFrameSupport merged 1 commit intoMay 28, 2026
Conversation
MessageSource를 Mockito로 mock하여 Spring 컨텍스트 없이 EgovKrdsPaginationRenderer의 레이블 초기화 및 페이지 렌더링 동작을 검증하는 JUnit5 단위 테스트 10개 추가. - initVariables() 후 각 레이블(prev/next/current/dot) 검증 - initMessageLabels() 후 메시지소스 반영 및 disabled 레이블 검증 - renderPagination() HTML 출력 및 jsFunction 포함 여부 검증
eGovFrameSupport
approved these changes
May 28, 2026
Contributor
|
표준프레임워크에 대한 지속적인 참여에 |
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.
변경 사유
EgovKrdsPaginationRenderer는 페이지 네비게이션 HTML을 생성하는 핵심 컴포넌트이나 기존에 단위 테스트가 없었습니다.MessageSource의존성을 Mockito로 mock하여 Spring 컨텍스트 없이 동작을 검증합니다.변경 내용
src/test/java/egovframework/example/pagination/EgovKrdsPaginationRendererTest.java신규 추가테스트 항목 (10개)
initVariables()후 previousPageLabel / nextPageLabel / currentPageLabel / dotPageLabel 검증initMessageLabels()후 메시지소스 반영(prev/next 레이블) 및 disabled 레이블 검증renderPagination()HTML 출력 null 여부 및 jsFunction 문자열 포함 여부 검증영향 범위
테스트 코드만 추가. 운영 코드 변경 없음.
체크리스트
mvn test -Dtest=EgovKrdsPaginationRendererTest→ 10/10 passed)