diff --git a/src/test/java/com/postgraduate/domain/auth/application/usecase/oauth/SignUpUseTypeTest.java b/src/test/java/com/postgraduate/domain/auth/application/usecase/oauth/SignUpUseTypeTest.java index 53f357b5..d19427cc 100644 --- a/src/test/java/com/postgraduate/domain/auth/application/usecase/oauth/SignUpUseTypeTest.java +++ b/src/test/java/com/postgraduate/domain/auth/application/usecase/oauth/SignUpUseTypeTest.java @@ -86,7 +86,7 @@ void setting() { 1, USER, TRUE, LocalDateTime.now(), LocalDateTime.now(), FALSE); wish = new Wish(1L, "major", "field", TRUE, user, Status.WAITING); senior = new Senior(1L, user, "a", - APPROVE, 1, info, profile, + APPROVE,1, 1, info, profile, LocalDateTime.now(), LocalDateTime.now()); } diff --git a/src/test/java/com/postgraduate/domain/mentoring/application/usecase/MentoringApplyingUseTypeTest.java b/src/test/java/com/postgraduate/domain/mentoring/application/usecase/MentoringApplyingUseTypeTest.java index 624ceca0..8d14d5ca 100644 --- a/src/test/java/com/postgraduate/domain/mentoring/application/usecase/MentoringApplyingUseTypeTest.java +++ b/src/test/java/com/postgraduate/domain/mentoring/application/usecase/MentoringApplyingUseTypeTest.java @@ -16,6 +16,7 @@ import com.postgraduate.domain.senior.domain.entity.Info; import com.postgraduate.domain.senior.domain.entity.Profile; import com.postgraduate.domain.senior.domain.entity.Senior; +import com.postgraduate.domain.senior.domain.service.SeniorUpdateService; import com.postgraduate.domain.user.domain.entity.User; import com.postgraduate.global.bizppurio.application.usecase.BizppurioJuniorMessage; import com.postgraduate.global.bizppurio.application.usecase.BizppurioSeniorMessage; @@ -54,6 +55,8 @@ class MentoringApplyingUseTypeTest { @Mock private AccountGetService accountGetService; @Mock + private SeniorUpdateService seniorUpdateService; + @Mock private BizppurioSeniorMessage bizppurioSeniorMessage; @Mock private BizppurioJuniorMessage bizppurioJuniorMessage; @@ -80,7 +83,7 @@ void setting() { "a", "123", "a", 0, USER, TRUE, LocalDateTime.now(), LocalDateTime.now(), TRUE); senior = new Senior(-1L, user, "a", - APPROVE, 1, info, profile, + APPROVE,1, 1, info, profile, LocalDateTime.now(), LocalDateTime.now()); salary = new Salary(-1L, FALSE, senior, 10000, LocalDate.now(), LocalDateTime.now(), null); account = new Account(-1L, "1", "은행", "유저", senior); diff --git a/src/test/java/com/postgraduate/domain/mentoring/application/usecase/MentoringManageUseTypeTest.java b/src/test/java/com/postgraduate/domain/mentoring/application/usecase/MentoringManageUseTypeTest.java index d5770e87..0176f725 100644 --- a/src/test/java/com/postgraduate/domain/mentoring/application/usecase/MentoringManageUseTypeTest.java +++ b/src/test/java/com/postgraduate/domain/mentoring/application/usecase/MentoringManageUseTypeTest.java @@ -24,6 +24,7 @@ import com.postgraduate.domain.senior.domain.entity.Profile; import com.postgraduate.domain.senior.domain.entity.Senior; import com.postgraduate.domain.senior.domain.service.SeniorGetService; +import com.postgraduate.domain.senior.domain.service.SeniorUpdateService; import com.postgraduate.domain.user.domain.entity.User; import com.postgraduate.global.bizppurio.application.usecase.BizppurioJuniorMessage; import com.postgraduate.global.bizppurio.application.usecase.BizppurioSeniorMessage; @@ -65,6 +66,8 @@ class MentoringManageUseTypeTest { @Mock private SeniorGetService seniorGetService; @Mock + private SeniorUpdateService seniorUpdateService; + @Mock private SalaryGetService salaryGetService; @Mock private SalaryUpdateService salaryUpdateService; @@ -103,7 +106,7 @@ void setting() { "a", "123", "a", 0, USER, TRUE, LocalDateTime.now(), LocalDateTime.now(), TRUE); senior = new Senior(-1L, user, "a", - APPROVE, 1, info, profile, + APPROVE, 1, 1, info, profile, LocalDateTime.now(), LocalDateTime.now()); salary = new Salary(-1L, FALSE, senior, 10000, LocalDate.now(), LocalDateTime.now(), null); account = new Account(-1L, "1", "은행", "유저", senior); diff --git a/src/test/java/com/postgraduate/domain/mentoring/application/usecase/MentoringSeniorInfoUseTypeTest.java b/src/test/java/com/postgraduate/domain/mentoring/application/usecase/MentoringSeniorInfoUseTypeTest.java index 2b6ff171..5162ffb6 100644 --- a/src/test/java/com/postgraduate/domain/mentoring/application/usecase/MentoringSeniorInfoUseTypeTest.java +++ b/src/test/java/com/postgraduate/domain/mentoring/application/usecase/MentoringSeniorInfoUseTypeTest.java @@ -68,7 +68,7 @@ void setting() { "a", "123", "a", 0, USER, TRUE, LocalDateTime.now(), LocalDateTime.now(), TRUE); senior = new Senior(-1L, user, "a", - APPROVE, 1, info, profile, + APPROVE, 1, 1, info, profile, LocalDateTime.now(), LocalDateTime.now()); salary = new Salary(-1L, FALSE, senior, 10000, LocalDate.now(), LocalDateTime.now(), null); payment = new Payment(-1L, mentoringUser, senior, 20000, "a", "a", "a", LocalDateTime.now(), null, Status.DONE); diff --git a/src/test/java/com/postgraduate/domain/mentoring/application/usecase/MentoringUserInfoUseTypeTest.java b/src/test/java/com/postgraduate/domain/mentoring/application/usecase/MentoringUserInfoUseTypeTest.java index d4b98e8c..f05fafea 100644 --- a/src/test/java/com/postgraduate/domain/mentoring/application/usecase/MentoringUserInfoUseTypeTest.java +++ b/src/test/java/com/postgraduate/domain/mentoring/application/usecase/MentoringUserInfoUseTypeTest.java @@ -64,7 +64,7 @@ void setting() { "a", "123", "a", 0, USER, TRUE, LocalDateTime.now(), LocalDateTime.now(), TRUE); senior = new Senior(-1L, user, "a", - APPROVE, 1, info, profile, + APPROVE, 1,1, info, profile, LocalDateTime.now(), LocalDateTime.now()); salary = new Salary(-1L, FALSE, senior, 10000, LocalDate.now(), LocalDateTime.now(), null); payment = new Payment(-1L, mentoringUser, senior, 20000, "a", "a", "a", LocalDateTime.now(), null, Status.DONE); diff --git a/src/test/java/com/postgraduate/domain/payment/usecase/PaymentManageUseTypeTest.java b/src/test/java/com/postgraduate/domain/payment/usecase/PaymentManageUseTypeTest.java index 8b093cbe..c5310fd1 100644 --- a/src/test/java/com/postgraduate/domain/payment/usecase/PaymentManageUseTypeTest.java +++ b/src/test/java/com/postgraduate/domain/payment/usecase/PaymentManageUseTypeTest.java @@ -68,7 +68,7 @@ void setting() { "a", "123", "a", 0, USER, TRUE, LocalDateTime.now(), LocalDateTime.now(), TRUE); senior = new Senior(-1L, user, "a", - APPROVE, 1, info, profile, + APPROVE, 1,1, info, profile, LocalDateTime.now(), LocalDateTime.now()); } diff --git a/src/test/java/com/postgraduate/domain/senior/application/usecase/SeniorInfoUseTypeTest.java b/src/test/java/com/postgraduate/domain/senior/application/usecase/SeniorInfoUseTypeTest.java index b310378b..7782af95 100644 --- a/src/test/java/com/postgraduate/domain/senior/application/usecase/SeniorInfoUseTypeTest.java +++ b/src/test/java/com/postgraduate/domain/senior/application/usecase/SeniorInfoUseTypeTest.java @@ -62,7 +62,7 @@ void setting() { "a", "12345", "a", 1, USER, TRUE, LocalDateTime.now(), LocalDateTime.now(), TRUE); senior = new Senior(1L, user, "a", - APPROVE, 1, info, profile, + APPROVE, 1, 1, info, profile, LocalDateTime.now(), LocalDateTime.now()); } @@ -92,7 +92,7 @@ void getSeniorDetail() { @DisplayName("검색어 기본 페이지 조회") void getSearchSeniorWithNull() { Senior otherSenior = new Senior(-2L, user, "a", - APPROVE, 1, info, profile, + APPROVE, 1, 1, info, profile, LocalDateTime.now(), LocalDateTime.now()); List seniors = List.of(senior, otherSenior); Page seniorPage = new PageImpl<>(seniors); @@ -110,7 +110,7 @@ void getSearchSeniorWithNull() { @DisplayName("검색어 페이지 조회") void getSearchSeniorWithPage() { Senior senior1 = new Senior(1L, user, "a", - APPROVE, 1, info, profile, + APPROVE, 1, 1, info, profile, LocalDateTime.now(), LocalDateTime.now()); List seniors = List.of(senior, senior1); Page seniorPage = new PageImpl<>(seniors); @@ -128,7 +128,7 @@ void getSearchSeniorWithPage() { @DisplayName("필터 기본 페이지 조회") void getFieldSeniorWithNull() { Senior senior1 = new Senior(1L, user, "a", - APPROVE, 1, info, profile, + APPROVE, 1, 1,info, profile, LocalDateTime.now(), LocalDateTime.now()); List seniors = List.of(senior, senior1); Page seniorPage = new PageImpl<>(seniors); @@ -146,7 +146,7 @@ void getFieldSeniorWithNull() { @DisplayName("필터 페이지 조회") void getFieldSeniorWithPage() { Senior senior1 = new Senior(1L, user, "a", - APPROVE, 1, info, profile, + APPROVE, 1, 1, info, profile, LocalDateTime.now(), LocalDateTime.now()); List seniors = List.of(senior, senior1); Page seniorPage = new PageImpl<>(seniors); diff --git a/src/test/java/com/postgraduate/domain/senior/application/usecase/SeniorManageUseTypeTest.java b/src/test/java/com/postgraduate/domain/senior/application/usecase/SeniorManageUseTypeTest.java index 8eb12465..58cdc9f6 100644 --- a/src/test/java/com/postgraduate/domain/senior/application/usecase/SeniorManageUseTypeTest.java +++ b/src/test/java/com/postgraduate/domain/senior/application/usecase/SeniorManageUseTypeTest.java @@ -91,7 +91,7 @@ void setting() { "a", "123", "a", 1, SENIOR, TRUE, LocalDateTime.now(), LocalDateTime.now(), TRUE); senior = new Senior(1L, user, "a", - APPROVE, 1, info, profile, + APPROVE, 1, 1, info, profile, LocalDateTime.now(), LocalDateTime.now()); } diff --git a/src/test/java/com/postgraduate/domain/senior/application/usecase/SeniorMyPageUseTypeTest.java b/src/test/java/com/postgraduate/domain/senior/application/usecase/SeniorMyPageUseTypeTest.java index 5ad9afa4..048d3aeb 100644 --- a/src/test/java/com/postgraduate/domain/senior/application/usecase/SeniorMyPageUseTypeTest.java +++ b/src/test/java/com/postgraduate/domain/senior/application/usecase/SeniorMyPageUseTypeTest.java @@ -69,14 +69,14 @@ void setting() { "a", "123", "a", 1, USER, TRUE, LocalDateTime.now(), LocalDateTime.now(), TRUE); senior = new Senior(1L, user, "a", - APPROVE, 1, info, profile, + APPROVE, 1, 1, info, profile, LocalDateTime.now(), LocalDateTime.now()); } @Test @DisplayName("Profile Null 선배 자신의 정보 조회") void getSeniorInfoWithNullProfile() { - senior = new Senior(1L, user, "a", WAITING, 1, info, null, LocalDateTime.now(), LocalDateTime.now()); + senior = new Senior(1L, user, "a", WAITING, 1, 1, info, null, LocalDateTime.now(), LocalDateTime.now()); given(seniorGetService.byUser(user)) .willReturn(senior); @@ -121,7 +121,7 @@ void getSeniorMyPageProfile() { @Test @DisplayName("선배 자신의 마이페이지 프로필 작성 이전 Info조회 테스트") void getSeniorMyPageProfileWithNull() { - Senior nullSenior = new Senior(-2L, user, "asd", APPROVE, 1, info, null, LocalDateTime.now(), null); + Senior nullSenior = new Senior(-2L, user, "asd", APPROVE, 1, 1, info, null, LocalDateTime.now(), null); given(seniorGetService.byUser(user)) .willReturn(nullSenior); diff --git a/src/test/java/com/postgraduate/domain/senior/domain/service/SeniorUpdateServiceTest.java b/src/test/java/com/postgraduate/domain/senior/domain/service/SeniorUpdateServiceTest.java index 45eda6d6..f282c1a2 100644 --- a/src/test/java/com/postgraduate/domain/senior/domain/service/SeniorUpdateServiceTest.java +++ b/src/test/java/com/postgraduate/domain/senior/domain/service/SeniorUpdateServiceTest.java @@ -33,7 +33,7 @@ class SeniorUpdateServiceTest { private Senior senior; @BeforeEach void setting() { - senior = new Senior(1L, user, "a", Status.WAITING, 100, new Info(), new Profile(), now(), now()); + senior = new Senior(1L, user, "a", Status.WAITING, 1, 100, new Info(), new Profile(), now(), now()); } @Test diff --git a/src/test/java/com/postgraduate/support/Resource.java b/src/test/java/com/postgraduate/support/Resource.java index 049d88c8..614456af 100644 --- a/src/test/java/com/postgraduate/support/Resource.java +++ b/src/test/java/com/postgraduate/support/Resource.java @@ -32,8 +32,8 @@ public class Resource { private User userOfSenior = new User(-2L, -2L, "mail", "선배", "012", "profile", 0, SENIOR, true, now(), now(), false); private Info info = new Info("major", "서울대학교", "교수님", "키워드1,키워드2", "랩실", "인공지능", false, false, "인공지능,키워드1,키워드2", "chatLink", 30); private Profile profile = new Profile("저는요", "한줄소개", "대상"); - private Senior senior = new Senior(-1L, userOfSenior, "certification", com.postgraduate.domain.senior.domain.entity.constant.Status.WAITING, 0, info, profile, now(), now()); - private Senior otherSenior = new Senior(-3L, otherUser, "certification", com.postgraduate.domain.senior.domain.entity.constant.Status.WAITING, 0, info, null, now(), now()); + private Senior senior = new Senior(-1L, userOfSenior, "certification", com.postgraduate.domain.senior.domain.entity.constant.Status.WAITING, 0, 0, info, profile, now(), now()); + private Senior otherSenior = new Senior(-3L, otherUser, "certification", com.postgraduate.domain.senior.domain.entity.constant.Status.WAITING, 0, 0, info, null, now(), now()); private SalaryAccount salaryAccount = new SalaryAccount("bank", "1234", "holder"); private Salary salary = new Salary(-1L, false, senior, 20000, getSalaryDate(), LocalDateTime.now(), salaryAccount); private Payment payment = new Payment(-1L, user, senior, 20000, "1", "123", "123", LocalDateTime.now(), LocalDateTime.now(), DONE);