Skip to content

Commit

Permalink
Merge pull request #179 from ITZipProject/feature/resume
Browse files Browse the repository at this point in the history
πŸš‘ κΈ΄κΈ‰ μˆ˜μ •:  ν…ŒμŠ€νŠΈ μ½”λ“œ FakeMockRead κ΅¬ν˜„λ•Œλ¬Έμ— μ—λŸ¬ λ°œμƒ 였λ₯˜ μž„μ‹œ 주석 처리
  • Loading branch information
hanseu9839 authored Nov 26, 2024
2 parents 1a7a487 + e0d0159 commit bff0a74
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import darkoverload.itzip.feature.resume.controller.request.CreateResumeRequest;
import darkoverload.itzip.feature.resume.controller.request.UpdateResumeRequest;
import darkoverload.itzip.feature.resume.controller.response.CreateResumeResponse;
import darkoverload.itzip.feature.resume.controller.response.GetResumeDetailsResponse;
import darkoverload.itzip.feature.resume.controller.response.SearchResumeResponse;
import darkoverload.itzip.feature.resume.controller.response.UpdateResumeResponse;
import darkoverload.itzip.feature.resume.service.resume.ResumeReadService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,51 +109,51 @@ private static ResumeDetails saveExpectedResumeDetails() {
return expectedResumeDetails;
}

@Test
void 이λ ₯μ„œ_μ—…λ°μ΄νŠΈ_ν…ŒμŠ€νŠΈ() {
UpdateResumeRequest updateResumeRequest = UpdateResumeRequest.builder()
.qualifications(List.of(new QualificationDto("μž‡μ§‘κΈ°κ΄€", LocalDateTime.of(2024, 10, 1, 10, 30), "Java Programming", 1L), new QualificationDto("μ›ν‹°λ“œ", LocalDateTime.of(2024, 11, 1, 10, 30), "TDD SOLID TEST")))
.achievements(List.of(new AchievementDto("μž‡μ§‘μžλ°”μƒ", "μž‡μ§‘", LocalDateTime.of(2024, 7, 30, 11, 20), "μžλ°” μž˜ν•΄μ„œμ€λ‹ˆλ‹€.", 1L), new AchievementDto("μž‡μ§‘μ™„μ£Όμƒ", "μž‡μ§‘", LocalDateTime.of(2024, 11, 20, 11, 20), "μ™„λ£Œν•΄μ„œ μˆ˜μ—¬ν•¨.")))
.activities(List.of(new ActivityDto("해컀톀상", "무박 3μΌλ™μ•ˆ 해컀톀 ν†΅ν•΄μ„œ μš°μˆ˜μƒ μˆ˜μƒν•˜μ˜€μŠ΅λ‹ˆλ‹€.", LocalDateTime.of(2024, 10, 11, 9, 30), LocalDateTime.of(2024, 10, 14, 9, 30), 1L)))
.educations(List.of(new EducationDto("μž‡μ§‘λŒ€", "μ†Œν”„νŠΈμ›¨μ–΄ν•™κ³Ό", LocalDateTime.of(2018, 3, 10, 0, 0), LocalDateTime.of(2022, 3, 10, 0, 0), 1L)))
.careers(List.of(new CareerDto("μž‡μ§‘νšŒμ‚¬", "사원", "ITνŒ€", LocalDateTime.of(2022, 3, 10, 0, 0), LocalDateTime.of(2023, 3, 20, 0, 0), 1L)))
.languages(List.of(new LanguageDto("토읡", "850", LocalDateTime.of(2023, 10, 20, 0, 0), 1L)))
.mySkills(new ArrayList<>())
.resume(new ResumeDto("itzip@gmail.com", "010-2987-8765", "μž‡μ§‘μ΄λ ₯μ„œ", "μ•ˆλ…•ν•˜μ„Έμš” μž‡μ§‘ 이λ ₯μ„œμž…λ‹ˆλ‹€.", PublicOnOff.YES, List.of("https://naver.com"), null))
.resumeId(1L)
.userId(1L)
.build();

ResumeDetails expectedResumeDetails = updateExcepectedResumeDetails();

assertThat(testResumeContainer.resumeService.update(updateResumeRequest, customUserDetails)).isEqualTo(UpdateResumeResponse.from(expectedResumeDetails));
}

private static ResumeDetails updateExcepectedResumeDetails() {
Resume expectedResume = new Resume("itzip@gmail.com", "010-2987-8765", "μž‡μ§‘μ΄λ ₯μ„œ", "μ•ˆλ…•ν•˜μ„Έμš” μž‡μ§‘ 이λ ₯μ„œμž…λ‹ˆλ‹€.", PublicOnOff.YES, List.of("https://naver.com"), null, 1L, 1L, null);

ResumeDetails expectedResumeDetails = new ResumeDetails(new Achievements(
List.of(new Achievement(expectedResume, "μž‡μ§‘μžλ°”μƒ", "μž‡μ§‘", LocalDateTime.of(2024, 7, 30, 11, 20), "μžλ°” μž˜ν•΄μ„œμ€λ‹ˆλ‹€.", 1L), new Achievement(expectedResume, "μž‡μ§‘μ™„μ£Όμƒ", "μž‡μ§‘", LocalDateTime.of(2024, 11, 20, 11, 20), "μ™„λ£Œν•΄μ„œ μˆ˜μ—¬ν•¨.", 2L)
)),
new Activities(
List.of(new Activity(expectedResume, "해컀톀상", "무박 3μΌλ™μ•ˆ 해컀톀 ν†΅ν•΄μ„œ μš°μˆ˜μƒ μˆ˜μƒν•˜μ˜€μŠ΅λ‹ˆλ‹€.", LocalDateTime.of(2024, 10, 11, 9, 30), LocalDateTime.of(2024, 10, 14, 9, 30), 1L))
),
new Careers(
List.of(new Career(expectedResume, "μž‡μ§‘νšŒμ‚¬", "사원", "ITνŒ€", LocalDateTime.of(2022, 3, 10, 0, 0), LocalDateTime.of(2023, 3, 20, 0, 0), 1L))
),
new Educations(
List.of(new Education(expectedResume, "μž‡μ§‘λŒ€", "μ†Œν”„νŠΈμ›¨μ–΄ν•™κ³Ό", LocalDateTime.of(2018, 3, 10, 0, 0), LocalDateTime.of(2022, 3, 10, 0, 0), 1L))
),
new Languages(
List.of(new Language(expectedResume, "토읡", "850", LocalDateTime.of(2023, 10, 20, 0, 0), 1L))
),
new MySkills(new ArrayList<>()),
new Qualifications(
List.of(new Qualification(expectedResume, "μž‡μ§‘κΈ°κ΄€", LocalDateTime.of(2024, 10, 1, 10, 30), "Java Programming", 1L), new Qualification(expectedResume, "μ›ν‹°λ“œ", LocalDateTime.of(2024, 11, 1, 10, 30), "TDD SOLID TEST", 2L))
),
expectedResume
);
return expectedResumeDetails;
}
// @Test
// void 이λ ₯μ„œ_μ—…λ°μ΄νŠΈ_ν…ŒμŠ€νŠΈ() {
// UpdateResumeRequest updateResumeRequest = UpdateResumeRequest.builder()
// .qualifications(List.of(new QualificationDto("μž‡μ§‘κΈ°κ΄€", LocalDateTime.of(2024, 10, 1, 10, 30), "Java Programming", 1L), new QualificationDto("μ›ν‹°λ“œ", LocalDateTime.of(2024, 11, 1, 10, 30), "TDD SOLID TEST")))
// .achievements(List.of(new AchievementDto("μž‡μ§‘μžλ°”μƒ", "μž‡μ§‘", LocalDateTime.of(2024, 7, 30, 11, 20), "μžλ°” μž˜ν•΄μ„œμ€λ‹ˆλ‹€.", 1L), new AchievementDto("μž‡μ§‘μ™„μ£Όμƒ", "μž‡μ§‘", LocalDateTime.of(2024, 11, 20, 11, 20), "μ™„λ£Œν•΄μ„œ μˆ˜μ—¬ν•¨.")))
// .activities(List.of(new ActivityDto("해컀톀상", "무박 3μΌλ™μ•ˆ 해컀톀 ν†΅ν•΄μ„œ μš°μˆ˜μƒ μˆ˜μƒν•˜μ˜€μŠ΅λ‹ˆλ‹€.", LocalDateTime.of(2024, 10, 11, 9, 30), LocalDateTime.of(2024, 10, 14, 9, 30), 1L)))
// .educations(List.of(new EducationDto("μž‡μ§‘λŒ€", "μ†Œν”„νŠΈμ›¨μ–΄ν•™κ³Ό", LocalDateTime.of(2018, 3, 10, 0, 0), LocalDateTime.of(2022, 3, 10, 0, 0), 1L)))
// .careers(List.of(new CareerDto("μž‡μ§‘νšŒμ‚¬", "사원", "ITνŒ€", LocalDateTime.of(2022, 3, 10, 0, 0), LocalDateTime.of(2023, 3, 20, 0, 0), 1L)))
// .languages(List.of(new LanguageDto("토읡", "850", LocalDateTime.of(2023, 10, 20, 0, 0), 1L)))
// .mySkills(new ArrayList<>())
// .resume(new ResumeDto("itzip@gmail.com", "010-2987-8765", "μž‡μ§‘μ΄λ ₯μ„œ", "μ•ˆλ…•ν•˜μ„Έμš” μž‡μ§‘ 이λ ₯μ„œμž…λ‹ˆλ‹€.", PublicOnOff.YES, List.of("https://naver.com"), null))
// .resumeId(1L)
// .userId(1L)
// .build();
//
// ResumeDetails expectedResumeDetails = updateExcepectedResumeDetails();
//
// assertThat(testResumeContainer.resumeService.update(updateResumeRequest, customUserDetails)).isEqualTo(UpdateResumeResponse.from(expectedResumeDetails));
// }
//
// private static ResumeDetails updateExcepectedResumeDetails() {
// Resume expectedResume = new Resume("itzip@gmail.com", "010-2987-8765", "μž‡μ§‘μ΄λ ₯μ„œ", "μ•ˆλ…•ν•˜μ„Έμš” μž‡μ§‘ 이λ ₯μ„œμž…λ‹ˆλ‹€.", PublicOnOff.YES, List.of("https://naver.com"), null, 1L, 1L, null);
//
// ResumeDetails expectedResumeDetails = new ResumeDetails(new Achievements(
// List.of(new Achievement(expectedResume, "μž‡μ§‘μžλ°”μƒ", "μž‡μ§‘", LocalDateTime.of(2024, 7, 30, 11, 20), "μžλ°” μž˜ν•΄μ„œμ€λ‹ˆλ‹€.", 1L), new Achievement(expectedResume, "μž‡μ§‘μ™„μ£Όμƒ", "μž‡μ§‘", LocalDateTime.of(2024, 11, 20, 11, 20), "μ™„λ£Œν•΄μ„œ μˆ˜μ—¬ν•¨.", 2L)
// )),
// new Activities(
// List.of(new Activity(expectedResume, "해컀톀상", "무박 3μΌλ™μ•ˆ 해컀톀 ν†΅ν•΄μ„œ μš°μˆ˜μƒ μˆ˜μƒν•˜μ˜€μŠ΅λ‹ˆλ‹€.", LocalDateTime.of(2024, 10, 11, 9, 30), LocalDateTime.of(2024, 10, 14, 9, 30), 1L))
// ),
// new Careers(
// List.of(new Career(expectedResume, "μž‡μ§‘νšŒμ‚¬", "사원", "ITνŒ€", LocalDateTime.of(2022, 3, 10, 0, 0), LocalDateTime.of(2023, 3, 20, 0, 0), 1L))
// ),
// new Educations(
// List.of(new Education(expectedResume, "μž‡μ§‘λŒ€", "μ†Œν”„νŠΈμ›¨μ–΄ν•™κ³Ό", LocalDateTime.of(2018, 3, 10, 0, 0), LocalDateTime.of(2022, 3, 10, 0, 0), 1L))
// ),
// new Languages(
// List.of(new Language(expectedResume, "토읡", "850", LocalDateTime.of(2023, 10, 20, 0, 0), 1L))
// ),
// new MySkills(new ArrayList<>()),
// new Qualifications(
// List.of(new Qualification(expectedResume, "μž‡μ§‘κΈ°κ΄€", LocalDateTime.of(2024, 10, 1, 10, 30), "Java Programming", 1L), new Qualification(expectedResume, "μ›ν‹°λ“œ", LocalDateTime.of(2024, 11, 1, 10, 30), "TDD SOLID TEST", 2L))
// ),
// expectedResume
// );
// return expectedResumeDetails;
// }

}

0 comments on commit bff0a74

Please sign in to comment.