test: EgovDateUtil.getFullAge 분기 커버리지 보강#251
Open
z3rotig4r wants to merge 1 commit into
Open
Conversation
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.
변경 이유
EgovDateUtil.getFullAge(socialNo, keyDate)는 만 나이를 계산하는 메서드로, 주민등록번호 7번째 자리로 출생 세기를 판별하는 다분기 로직을 가집니다. 그러나 기존 테스트는 1900년대 1개 케이스만 검증하여 세기 판별 분기와 생일 경과 분기에 대한 회귀 안전망이 없었습니다.변경 내용
소스는 변경하지 않고 현재 동작을 고정하는 characterization 테스트만 추가했습니다.
getCurrentFullAge위임 스모크: 현재일자 의존을 배제한 결정적 단정만 유지테스트 방법
mvn -pl Foundation/org.egovframe.rte.fdl.string testEgovDateUtilTest 12건, 모듈 50건 모두 통과합니다. 모든 기대값은 메서드 동작을 산술로 검산하여 명시했습니다.
영향 범위
소스 변경 없이 테스트만 추가하므로 런타임 동작에 영향이 없으며 회귀 위험이 없습니다.