Skip to content

Commit

Permalink
test(#73): qualification examination score
Browse files Browse the repository at this point in the history
  • Loading branch information
gimhanul committed Sep 6, 2023
1 parent 74dea60 commit 890984c
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,4 @@ class SubmitFormUseCaseTest {
verify(assignExaminationNumberService, never()).execute(any(Form.class));
verify(formRepository, never()).save(any(Form.class));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,13 @@ class FormControllerTest extends RestDocsTestSupport {
.description("졸업 연도"),
fieldWithPath("education.schoolName")
.type(JsonFieldType.STRING)
.description("출신 학교 이름 (출신 학교가 없는 경우 null)"),
.description("출신 학교 이름"),
fieldWithPath("education.schoolLocation")
.type(JsonFieldType.STRING)
.description("출신 학교 지역 (출신 학교가 없는 경우 null)"),
.description("출신 학교 지역"),
fieldWithPath("education.schoolCode")
.type(JsonFieldType.STRING)
.description("출신 학교 코드 (출신 학교가 없는 경우 null)"),
.description("출신 학교 코드"),
fieldWithPath("education.teacherName")
.type(JsonFieldType.STRING)
.description("작성 교사 (없는 경우 null)"),
Expand All @@ -165,6 +165,10 @@ class FormControllerTest extends RestDocsTestSupport {
.type(JsonFieldType.STRING)
.description("<<achievement-level,3학년 1학기 성취도 (성적이 없는 경우 null)>>")
.optional(),
fieldWithPath("grade.subjectList[].score")
.type(JsonFieldType.NUMBER)
.description("검정고시인 경우 점수 (검정고시가 아닐시 무조건 null)")
.optional(),
fieldWithPath("grade.certificateList[]")
.type(JsonFieldType.ARRAY)
.description("<<certificate,자격증 리스트>>"),
Expand Down Expand Up @@ -742,13 +746,13 @@ class FormControllerTest extends RestDocsTestSupport {
.description("졸업 연도"),
fieldWithPath("education.schoolName")
.type(JsonFieldType.STRING)
.description("출신 학교 이름 (출신 학교가 없는 경우 null)"),
.description("출신 학교 이름"),
fieldWithPath("education.schoolLocation")
.type(JsonFieldType.STRING)
.description("출신 학교 지역 (출신 학교가 없는 경우 null)"),
.description("출신 학교 지역"),
fieldWithPath("education.schoolCode")
.type(JsonFieldType.STRING)
.description("출신 학교 코드 (출신 학교가 없는 경우 null)"),
.description("출신 학교 코드"),
fieldWithPath("education.teacherName")
.type(JsonFieldType.STRING)
.description("작성 교사 (없는 경우 null)"),
Expand All @@ -773,6 +777,10 @@ class FormControllerTest extends RestDocsTestSupport {
.type(JsonFieldType.STRING)
.description("<<achievement-level,3학년 1학기 성취도 (성적이 없는 경우 null)>>")
.optional(),
fieldWithPath("grade.subjectList[].score")
.type(JsonFieldType.NUMBER)
.description("검정고시인 경우 점수 (검정고시가 아닐시 무조건 null)")
.optional(),
fieldWithPath("grade.certificateList[]")
.type(JsonFieldType.ARRAY)
.description("<<certificate,자격증 리스트>>"),
Expand Down
46 changes: 23 additions & 23 deletions src/test/java/com/bamdoliro/maru/shared/fixture/FormFixture.java
Original file line number Diff line number Diff line change
Expand Up @@ -261,13 +261,13 @@ public static SubmitFormRequest createFormRequest(FormType type) {
"01012344321"
),
new GradeRequest(
List.of(new SubjectRequest("국어", randomAchievementLevel(), randomAchievementLevel(), randomAchievementLevel()),
new SubjectRequest("수학", randomAchievementLevel(), randomAchievementLevel(), randomAchievementLevel()),
new SubjectRequest("사회", randomAchievementLevel(), randomAchievementLevel(), randomAchievementLevel()),
new SubjectRequest("과학", randomAchievementLevel(), randomAchievementLevel(), randomAchievementLevel()),
new SubjectRequest("영어", randomAchievementLevel(), randomAchievementLevel(), randomAchievementLevel()),
new SubjectRequest("체육", randomAchievementLevel(), randomAchievementLevel(), randomAchievementLevel()),
new SubjectRequest("한문", null, randomAchievementLevel(), null)
List.of(new SubjectRequest("국어", randomAchievementLevel(), randomAchievementLevel(), randomAchievementLevel(), null),
new SubjectRequest("수학", randomAchievementLevel(), randomAchievementLevel(), randomAchievementLevel(), null),
new SubjectRequest("사회", randomAchievementLevel(), randomAchievementLevel(), randomAchievementLevel(), null),
new SubjectRequest("과학", randomAchievementLevel(), randomAchievementLevel(), randomAchievementLevel(), null),
new SubjectRequest("영어", randomAchievementLevel(), randomAchievementLevel(), randomAchievementLevel(), null),
new SubjectRequest("체육", randomAchievementLevel(), randomAchievementLevel(), randomAchievementLevel(), null),
new SubjectRequest("한문", null, randomAchievementLevel(), null, null)
),
new AttendanceRequest(0, 0, 0, 2),
new AttendanceRequest(2, 1, 0, 0),
Expand All @@ -289,20 +289,20 @@ public static SubmitFormRequest createQualificationExaminationFormRequest(FormTy
new EducationRequest(
GraduationType.QUALIFICATION_EXAMINATION,
"2021",
null,
null,
null,
"비전중학교",
"경기도",
"7631003",
null,
null,
null
),
new GradeRequest(
List.of(new SubjectRequest("국어", randomAchievementLevel(), null, null),
new SubjectRequest("수학", randomAchievementLevel(), null, null),
new SubjectRequest("사회", randomAchievementLevel(), null, null),
new SubjectRequest("과학", randomAchievementLevel(), null, null),
new SubjectRequest("영어", randomAchievementLevel(), null, null),
new SubjectRequest("도덕", randomAchievementLevel(), null, null)
List.of(new SubjectRequest("국어", null, null, null, randomNumber(50, 100)),
new SubjectRequest("수학", null, null, null, randomNumber(50, 100)),
new SubjectRequest("사회", null, null, null, randomNumber(50, 100)),
new SubjectRequest("과학", null, null, null, randomNumber(50, 100)),
new SubjectRequest("영어", null, null, null, randomNumber(50, 100)),
new SubjectRequest("도덕", null, null, null, randomNumber(50, 100))
),
null,
null,
Expand Down Expand Up @@ -332,13 +332,13 @@ public static UpdateFormRequest createUpdateFormRequest(FormType type) {
"01012344321"
),
new GradeRequest(
List.of(new SubjectRequest("국어", randomAchievementLevel(), randomAchievementLevel(), randomAchievementLevel()),
new SubjectRequest("수학", randomAchievementLevel(), randomAchievementLevel(), randomAchievementLevel()),
new SubjectRequest("사회", randomAchievementLevel(), randomAchievementLevel(), randomAchievementLevel()),
new SubjectRequest("과학", randomAchievementLevel(), randomAchievementLevel(), randomAchievementLevel()),
new SubjectRequest("영어", randomAchievementLevel(), randomAchievementLevel(), randomAchievementLevel()),
new SubjectRequest("체육", randomAchievementLevel(), randomAchievementLevel(), randomAchievementLevel()),
new SubjectRequest("한문", null, randomAchievementLevel(), null)
List.of(new SubjectRequest("국어", randomAchievementLevel(), randomAchievementLevel(), randomAchievementLevel(), null),
new SubjectRequest("수학", randomAchievementLevel(), randomAchievementLevel(), randomAchievementLevel(), null),
new SubjectRequest("사회", randomAchievementLevel(), randomAchievementLevel(), randomAchievementLevel(), null),
new SubjectRequest("과학", randomAchievementLevel(), randomAchievementLevel(), randomAchievementLevel(), null),
new SubjectRequest("영어", randomAchievementLevel(), randomAchievementLevel(), randomAchievementLevel(), null),
new SubjectRequest("체육", randomAchievementLevel(), randomAchievementLevel(), randomAchievementLevel(), null),
new SubjectRequest("한문", null, randomAchievementLevel(), null, null)
),
new AttendanceRequest(0, 0, 0, 2),
new AttendanceRequest(2, 1, 0, 0),
Expand Down

0 comments on commit 890984c

Please sign in to comment.