From d70aafbe0f70cc849f0a1592d4da09a474a69d21 Mon Sep 17 00:00:00 2001 From: "chosw1002@naver.com" Date: Wed, 11 Sep 2024 15:28:12 +0900 Subject: [PATCH] =?UTF-8?q?test:=20=ED=95=99=EB=85=84=EB=8F=84=EC=99=80=20?= =?UTF-8?q?=ED=95=99=EA=B8=B0=20=EC=83=81=EC=88=98=20=EB=B6=84=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../member/domain/MemberValidatorTest.java | 1 + .../application/MembershipServiceTest.java | 1 + .../domain/membership/domain/MembershipTest.java | 2 +- .../domain/MembershipValidatorTest.java | 2 +- .../order/application/OrderServiceTest.java | 1 + .../application/AdminRecruitmentServiceTest.java | 2 +- .../domain/RecruitmentRoundValidatorTest.java | 1 + .../recruitment/domain/RecruitmentTest.java | 2 +- .../study/application/AdminStudyServiceTest.java | 2 +- .../gdsc/domain/study/domain/StudyTest.java | 1 + .../common/constant/RecruitmentConstant.java | 4 +--- .../global/common/constant/SemesterConstant.java | 10 ---------- .../global/common/constant/TemporalConstant.java | 16 ++++++++++++++++ .../gdschongik/gdsc/helper/FixtureHelper.java | 2 +- .../gdschongik/gdsc/helper/IntegrationTest.java | 2 +- 15 files changed, 29 insertions(+), 20 deletions(-) delete mode 100644 src/test/java/com/gdschongik/gdsc/global/common/constant/SemesterConstant.java create mode 100644 src/test/java/com/gdschongik/gdsc/global/common/constant/TemporalConstant.java diff --git a/src/test/java/com/gdschongik/gdsc/domain/member/domain/MemberValidatorTest.java b/src/test/java/com/gdschongik/gdsc/domain/member/domain/MemberValidatorTest.java index b05efbfc3..7861dff96 100644 --- a/src/test/java/com/gdschongik/gdsc/domain/member/domain/MemberValidatorTest.java +++ b/src/test/java/com/gdschongik/gdsc/domain/member/domain/MemberValidatorTest.java @@ -1,6 +1,7 @@ package com.gdschongik.gdsc.domain.member.domain; import static com.gdschongik.gdsc.global.common.constant.RecruitmentConstant.*; +import static com.gdschongik.gdsc.global.common.constant.TemporalConstant.*; import static com.gdschongik.gdsc.global.exception.ErrorCode.*; import static org.assertj.core.api.Assertions.*; diff --git a/src/test/java/com/gdschongik/gdsc/domain/membership/application/MembershipServiceTest.java b/src/test/java/com/gdschongik/gdsc/domain/membership/application/MembershipServiceTest.java index 1d940b2c9..1da73114c 100644 --- a/src/test/java/com/gdschongik/gdsc/domain/membership/application/MembershipServiceTest.java +++ b/src/test/java/com/gdschongik/gdsc/domain/membership/application/MembershipServiceTest.java @@ -3,6 +3,7 @@ import static com.gdschongik.gdsc.domain.common.model.RequirementStatus.SATISFIED; import static com.gdschongik.gdsc.domain.member.domain.MemberRole.ASSOCIATE; import static com.gdschongik.gdsc.global.common.constant.RecruitmentConstant.*; +import static com.gdschongik.gdsc.global.common.constant.TemporalConstant.*; import static com.gdschongik.gdsc.global.exception.ErrorCode.*; import static org.assertj.core.api.Assertions.*; diff --git a/src/test/java/com/gdschongik/gdsc/domain/membership/domain/MembershipTest.java b/src/test/java/com/gdschongik/gdsc/domain/membership/domain/MembershipTest.java index a9765b309..d92981419 100644 --- a/src/test/java/com/gdschongik/gdsc/domain/membership/domain/MembershipTest.java +++ b/src/test/java/com/gdschongik/gdsc/domain/membership/domain/MembershipTest.java @@ -4,7 +4,7 @@ import static com.gdschongik.gdsc.domain.member.domain.Member.*; import static com.gdschongik.gdsc.global.common.constant.MemberConstant.*; import static com.gdschongik.gdsc.global.common.constant.RecruitmentConstant.*; -import static com.gdschongik.gdsc.global.common.constant.SemesterConstant.*; +import static com.gdschongik.gdsc.global.common.constant.TemporalConstant.*; import static org.assertj.core.api.Assertions.*; import com.gdschongik.gdsc.domain.member.domain.Member; diff --git a/src/test/java/com/gdschongik/gdsc/domain/membership/domain/MembershipValidatorTest.java b/src/test/java/com/gdschongik/gdsc/domain/membership/domain/MembershipValidatorTest.java index 311d0d651..11181fa80 100644 --- a/src/test/java/com/gdschongik/gdsc/domain/membership/domain/MembershipValidatorTest.java +++ b/src/test/java/com/gdschongik/gdsc/domain/membership/domain/MembershipValidatorTest.java @@ -4,7 +4,7 @@ import static com.gdschongik.gdsc.domain.member.domain.Member.*; import static com.gdschongik.gdsc.global.common.constant.MemberConstant.*; import static com.gdschongik.gdsc.global.common.constant.RecruitmentConstant.*; -import static com.gdschongik.gdsc.global.common.constant.SemesterConstant.*; +import static com.gdschongik.gdsc.global.common.constant.TemporalConstant.*; import static com.gdschongik.gdsc.global.exception.ErrorCode.*; import static org.assertj.core.api.Assertions.*; diff --git a/src/test/java/com/gdschongik/gdsc/domain/order/application/OrderServiceTest.java b/src/test/java/com/gdschongik/gdsc/domain/order/application/OrderServiceTest.java index 1da174baf..ede1d1e61 100644 --- a/src/test/java/com/gdschongik/gdsc/domain/order/application/OrderServiceTest.java +++ b/src/test/java/com/gdschongik/gdsc/domain/order/application/OrderServiceTest.java @@ -2,6 +2,7 @@ import static com.gdschongik.gdsc.global.common.constant.OrderConstant.*; import static com.gdschongik.gdsc.global.common.constant.RecruitmentConstant.*; +import static com.gdschongik.gdsc.global.common.constant.TemporalConstant.*; import static com.gdschongik.gdsc.global.exception.ErrorCode.*; import static org.assertj.core.api.Assertions.*; import static org.mockito.Mockito.*; diff --git a/src/test/java/com/gdschongik/gdsc/domain/recruitment/application/AdminRecruitmentServiceTest.java b/src/test/java/com/gdschongik/gdsc/domain/recruitment/application/AdminRecruitmentServiceTest.java index ca1ee1fbc..f70ac4b68 100644 --- a/src/test/java/com/gdschongik/gdsc/domain/recruitment/application/AdminRecruitmentServiceTest.java +++ b/src/test/java/com/gdschongik/gdsc/domain/recruitment/application/AdminRecruitmentServiceTest.java @@ -1,7 +1,7 @@ package com.gdschongik.gdsc.domain.recruitment.application; import static com.gdschongik.gdsc.global.common.constant.RecruitmentConstant.*; -import static com.gdschongik.gdsc.global.common.constant.SemesterConstant.*; +import static com.gdschongik.gdsc.global.common.constant.TemporalConstant.*; import static com.gdschongik.gdsc.global.exception.ErrorCode.*; import static org.assertj.core.api.Assertions.*; diff --git a/src/test/java/com/gdschongik/gdsc/domain/recruitment/domain/RecruitmentRoundValidatorTest.java b/src/test/java/com/gdschongik/gdsc/domain/recruitment/domain/RecruitmentRoundValidatorTest.java index 919593027..0f9c27cd0 100644 --- a/src/test/java/com/gdschongik/gdsc/domain/recruitment/domain/RecruitmentRoundValidatorTest.java +++ b/src/test/java/com/gdschongik/gdsc/domain/recruitment/domain/RecruitmentRoundValidatorTest.java @@ -1,6 +1,7 @@ package com.gdschongik.gdsc.domain.recruitment.domain; import static com.gdschongik.gdsc.global.common.constant.RecruitmentConstant.*; +import static com.gdschongik.gdsc.global.common.constant.TemporalConstant.*; import static com.gdschongik.gdsc.global.exception.ErrorCode.*; import static org.assertj.core.api.Assertions.*; diff --git a/src/test/java/com/gdschongik/gdsc/domain/recruitment/domain/RecruitmentTest.java b/src/test/java/com/gdschongik/gdsc/domain/recruitment/domain/RecruitmentTest.java index 1b276f00e..b8f28b26e 100644 --- a/src/test/java/com/gdschongik/gdsc/domain/recruitment/domain/RecruitmentTest.java +++ b/src/test/java/com/gdschongik/gdsc/domain/recruitment/domain/RecruitmentTest.java @@ -1,7 +1,7 @@ package com.gdschongik.gdsc.domain.recruitment.domain; import static com.gdschongik.gdsc.global.common.constant.RecruitmentConstant.*; -import static com.gdschongik.gdsc.global.common.constant.SemesterConstant.*; +import static com.gdschongik.gdsc.global.common.constant.TemporalConstant.*; import static org.assertj.core.api.Assertions.*; import com.gdschongik.gdsc.domain.recruitment.domain.vo.Period; diff --git a/src/test/java/com/gdschongik/gdsc/domain/study/application/AdminStudyServiceTest.java b/src/test/java/com/gdschongik/gdsc/domain/study/application/AdminStudyServiceTest.java index c70a6b6ee..9cdd8dc1b 100644 --- a/src/test/java/com/gdschongik/gdsc/domain/study/application/AdminStudyServiceTest.java +++ b/src/test/java/com/gdschongik/gdsc/domain/study/application/AdminStudyServiceTest.java @@ -1,7 +1,7 @@ package com.gdschongik.gdsc.domain.study.application; -import static com.gdschongik.gdsc.global.common.constant.RecruitmentConstant.*; import static com.gdschongik.gdsc.global.common.constant.StudyConstant.*; +import static com.gdschongik.gdsc.global.common.constant.TemporalConstant.*; import static org.assertj.core.api.Assertions.*; import com.gdschongik.gdsc.domain.member.domain.Member; diff --git a/src/test/java/com/gdschongik/gdsc/domain/study/domain/StudyTest.java b/src/test/java/com/gdschongik/gdsc/domain/study/domain/StudyTest.java index bd254bbaa..d98bccf2d 100644 --- a/src/test/java/com/gdschongik/gdsc/domain/study/domain/StudyTest.java +++ b/src/test/java/com/gdschongik/gdsc/domain/study/domain/StudyTest.java @@ -5,6 +5,7 @@ import static com.gdschongik.gdsc.global.common.constant.MemberConstant.*; import static com.gdschongik.gdsc.global.common.constant.RecruitmentConstant.*; import static com.gdschongik.gdsc.global.common.constant.StudyConstant.*; +import static com.gdschongik.gdsc.global.common.constant.TemporalConstant.*; import static com.gdschongik.gdsc.global.exception.ErrorCode.*; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/src/test/java/com/gdschongik/gdsc/global/common/constant/RecruitmentConstant.java b/src/test/java/com/gdschongik/gdsc/global/common/constant/RecruitmentConstant.java index ac8f06584..beae5f5cb 100644 --- a/src/test/java/com/gdschongik/gdsc/global/common/constant/RecruitmentConstant.java +++ b/src/test/java/com/gdschongik/gdsc/global/common/constant/RecruitmentConstant.java @@ -1,6 +1,5 @@ package com.gdschongik.gdsc.global.common.constant; -import com.gdschongik.gdsc.domain.common.model.SemesterType; import com.gdschongik.gdsc.domain.common.vo.Money; import com.gdschongik.gdsc.domain.recruitment.domain.RoundType; import java.math.BigDecimal; @@ -13,8 +12,7 @@ public class RecruitmentConstant { public static final LocalDateTime BETWEEN_START_AND_END_DATE = LocalDateTime.of(2024, 3, 3, 0, 0); public static final LocalDateTime WRONG_END_DATE = LocalDateTime.of(2024, 3, 2, 0, 0); public static final LocalDateTime END_DATE = LocalDateTime.of(2024, 3, 5, 0, 0); - public static final Integer ACADEMIC_YEAR = 2024; - public static final SemesterType SEMESTER_TYPE = SemesterType.FIRST; + public static final Money FEE = Money.from(20000L); public static final BigDecimal FEE_AMOUNT = BigDecimal.valueOf(20000); public static final String FEE_NAME = "2024학년도 1학기 정회원 회비"; diff --git a/src/test/java/com/gdschongik/gdsc/global/common/constant/SemesterConstant.java b/src/test/java/com/gdschongik/gdsc/global/common/constant/SemesterConstant.java deleted file mode 100644 index a95bfd179..000000000 --- a/src/test/java/com/gdschongik/gdsc/global/common/constant/SemesterConstant.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.gdschongik.gdsc.global.common.constant; - -import java.time.LocalDateTime; - -public class SemesterConstant { - public static final LocalDateTime SEMESTER_START_DATE = LocalDateTime.of(2024, 3, 2, 0, 0); - public static final LocalDateTime SEMESTER_END_DATE = LocalDateTime.of(2024, 8, 31, 0, 0); - - private SemesterConstant() {} -} diff --git a/src/test/java/com/gdschongik/gdsc/global/common/constant/TemporalConstant.java b/src/test/java/com/gdschongik/gdsc/global/common/constant/TemporalConstant.java new file mode 100644 index 000000000..c15d6f76d --- /dev/null +++ b/src/test/java/com/gdschongik/gdsc/global/common/constant/TemporalConstant.java @@ -0,0 +1,16 @@ +package com.gdschongik.gdsc.global.common.constant; + +import com.gdschongik.gdsc.domain.common.model.SemesterType; +import java.time.LocalDateTime; + +public class TemporalConstant { + // academic year + public static final Integer ACADEMIC_YEAR = 2024; + + // semester + public static final SemesterType SEMESTER_TYPE = SemesterType.FIRST; + public static final LocalDateTime SEMESTER_START_DATE = LocalDateTime.of(2024, 3, 2, 0, 0); + public static final LocalDateTime SEMESTER_END_DATE = LocalDateTime.of(2024, 8, 31, 0, 0); + + private TemporalConstant() {} +} diff --git a/src/test/java/com/gdschongik/gdsc/helper/FixtureHelper.java b/src/test/java/com/gdschongik/gdsc/helper/FixtureHelper.java index 184dec360..ea1343667 100644 --- a/src/test/java/com/gdschongik/gdsc/helper/FixtureHelper.java +++ b/src/test/java/com/gdschongik/gdsc/helper/FixtureHelper.java @@ -5,8 +5,8 @@ import static com.gdschongik.gdsc.domain.member.domain.MemberStudyRole.MENTOR; import static com.gdschongik.gdsc.global.common.constant.MemberConstant.*; import static com.gdschongik.gdsc.global.common.constant.RecruitmentConstant.*; -import static com.gdschongik.gdsc.global.common.constant.SemesterConstant.*; import static com.gdschongik.gdsc.global.common.constant.StudyConstant.*; +import static com.gdschongik.gdsc.global.common.constant.TemporalConstant.*; import com.gdschongik.gdsc.domain.common.model.SemesterType; import com.gdschongik.gdsc.domain.common.vo.Money; diff --git a/src/test/java/com/gdschongik/gdsc/helper/IntegrationTest.java b/src/test/java/com/gdschongik/gdsc/helper/IntegrationTest.java index 1bfbac94d..dbd8c601b 100644 --- a/src/test/java/com/gdschongik/gdsc/helper/IntegrationTest.java +++ b/src/test/java/com/gdschongik/gdsc/helper/IntegrationTest.java @@ -3,8 +3,8 @@ import static com.gdschongik.gdsc.domain.member.domain.Department.*; import static com.gdschongik.gdsc.global.common.constant.MemberConstant.*; import static com.gdschongik.gdsc.global.common.constant.RecruitmentConstant.*; -import static com.gdschongik.gdsc.global.common.constant.SemesterConstant.*; import static com.gdschongik.gdsc.global.common.constant.StudyConstant.*; +import static com.gdschongik.gdsc.global.common.constant.TemporalConstant.*; import static org.mockito.Mockito.*; import com.gdschongik.gdsc.domain.common.model.SemesterType;