diff --git a/simtong-application/src/test/kotlin/team/comit/simtong/domain/user/usecase/AdminSignInUseCaseTests.kt b/simtong-application/src/test/kotlin/team/comit/simtong/domain/user/usecase/AdminSignInUseCaseTests.kt index d48212e3..96afcb20 100644 --- a/simtong-application/src/test/kotlin/team/comit/simtong/domain/user/usecase/AdminSignInUseCaseTests.kt +++ b/simtong-application/src/test/kotlin/team/comit/simtong/domain/user/usecase/AdminSignInUseCaseTests.kt @@ -25,10 +25,10 @@ class AdminSignInUseCaseTests { private lateinit var queryUserPort: QueryUserPort @MockBean - private lateinit var userSecurityPort: UserSecurityPort + private lateinit var securityPort: UserSecurityPort @MockBean - private lateinit var userJwtPort: UserJwtPort + private lateinit var jwtPort: UserJwtPort private lateinit var adminSignInUseCase: AdminSignInUseCase @@ -83,8 +83,8 @@ class AdminSignInUseCaseTests { fun setUp() { adminSignInUseCase = AdminSignInUseCase( queryUserPort, - userJwtPort, - userSecurityPort + jwtPort, + securityPort ) } @@ -94,10 +94,10 @@ class AdminSignInUseCaseTests { given(queryUserPort.queryUserByEmployeeNumber(employeeNumber)) .willReturn(adminStub) - given(userSecurityPort.compare(requestStub.password, adminStub.password.value)) + given(securityPort.compare(requestStub.password, adminStub.password.value)) .willReturn(true) - given(userJwtPort.receiveToken(adminStub.id, adminStub.authority)) + given(jwtPort.receiveToken(adminStub.id, adminStub.authority)) .willReturn(responseStub) // when @@ -113,7 +113,7 @@ class AdminSignInUseCaseTests { given(queryUserPort.queryUserByEmployeeNumber(employeeNumber)) .willReturn(adminStub) - given(userSecurityPort.compare(requestStub.password, adminStub.password.value)) + given(securityPort.compare(requestStub.password, adminStub.password.value)) .willReturn(false) // when & then diff --git a/simtong-application/src/test/kotlin/team/comit/simtong/domain/user/usecase/ChangeEmailUseCaseTests.kt b/simtong-application/src/test/kotlin/team/comit/simtong/domain/user/usecase/ChangeEmailUseCaseTests.kt index 22c78d2b..53df43f3 100644 --- a/simtong-application/src/test/kotlin/team/comit/simtong/domain/user/usecase/ChangeEmailUseCaseTests.kt +++ b/simtong-application/src/test/kotlin/team/comit/simtong/domain/user/usecase/ChangeEmailUseCaseTests.kt @@ -26,7 +26,7 @@ class ChangeEmailUseCaseTests { private lateinit var queryUserPort: QueryUserPort @MockBean - private lateinit var userSecurityPort: UserSecurityPort + private lateinit var securityPort: UserSecurityPort @MockBean private lateinit var queryAuthCodeLimitPort: QueryAuthCodeLimitPort @@ -75,7 +75,7 @@ class ChangeEmailUseCaseTests { fun setUp() { changeEmailUseCase = ChangeEmailUseCase( queryUserPort, - userSecurityPort, + securityPort, queryAuthCodeLimitPort, commandUserPort ) @@ -90,7 +90,7 @@ class ChangeEmailUseCaseTests { given(queryAuthCodeLimitPort.queryAuthCodeLimitByEmail(requestStub.email)) .willReturn(authCodeLimitStub) - given(userSecurityPort.getCurrentUserId()) + given(securityPort.getCurrentUserId()) .willReturn(id) given(queryUserPort.queryUserById(id)) @@ -153,7 +153,7 @@ class ChangeEmailUseCaseTests { given(queryAuthCodeLimitPort.queryAuthCodeLimitByEmail(requestStub.email)) .willReturn(authCodeLimitStub) - given(userSecurityPort.getCurrentUserId()) + given(securityPort.getCurrentUserId()) .willReturn(id) given(queryUserPort.queryUserById(id)) diff --git a/simtong-application/src/test/kotlin/team/comit/simtong/domain/user/usecase/ChangeNicknameUseCaseTests.kt b/simtong-application/src/test/kotlin/team/comit/simtong/domain/user/usecase/ChangeNicknameUseCaseTests.kt index be21b815..ed0e7227 100644 --- a/simtong-application/src/test/kotlin/team/comit/simtong/domain/user/usecase/ChangeNicknameUseCaseTests.kt +++ b/simtong-application/src/test/kotlin/team/comit/simtong/domain/user/usecase/ChangeNicknameUseCaseTests.kt @@ -23,7 +23,7 @@ class ChangeNicknameUseCaseTests { private lateinit var queryUserPort: QueryUserPort @MockBean - private lateinit var userSecurityPort: UserSecurityPort + private lateinit var securityPort: UserSecurityPort @MockBean private lateinit var commandUserPort: CommandUserPort @@ -57,7 +57,7 @@ class ChangeNicknameUseCaseTests { fun setUp() { changeNicknameUseCase = ChangeNicknameUseCase( queryUserPort, - userSecurityPort, + securityPort, commandUserPort ) } @@ -68,7 +68,7 @@ class ChangeNicknameUseCaseTests { given(queryUserPort.existsUserByNickname(requestStub.nickname)) .willReturn(false) - given(userSecurityPort.getCurrentUserId()) + given(securityPort.getCurrentUserId()) .willReturn(id) given(queryUserPort.queryUserById(id)) diff --git a/simtong-application/src/test/kotlin/team/comit/simtong/domain/user/usecase/ChangePasswordUseCaseTests.kt b/simtong-application/src/test/kotlin/team/comit/simtong/domain/user/usecase/ChangePasswordUseCaseTests.kt index 018299fb..47eae481 100644 --- a/simtong-application/src/test/kotlin/team/comit/simtong/domain/user/usecase/ChangePasswordUseCaseTests.kt +++ b/simtong-application/src/test/kotlin/team/comit/simtong/domain/user/usecase/ChangePasswordUseCaseTests.kt @@ -23,7 +23,7 @@ class ChangePasswordUseCaseTests { private lateinit var queryUserPort: QueryUserPort @MockBean - private lateinit var userSecurityPort: UserSecurityPort + private lateinit var securityPort: UserSecurityPort @MockBean private lateinit var commandUserPort: CommandUserPort @@ -58,7 +58,7 @@ class ChangePasswordUseCaseTests { fun setUp() { changePasswordUseCase = ChangePasswordUseCase( queryUserPort, - userSecurityPort, + securityPort, commandUserPort ) } @@ -66,16 +66,16 @@ class ChangePasswordUseCaseTests { @Test fun `비밀번호 변경 성공`() { // given - given(userSecurityPort.getCurrentUserId()) + given(securityPort.getCurrentUserId()) .willReturn(id) given(queryUserPort.queryUserById(id)) .willReturn(userStub) - given(userSecurityPort.compare(requestStub.password, userStub.password.value)) + given(securityPort.compare(requestStub.password, userStub.password.value)) .willReturn(true) - given(userSecurityPort.encode(requestStub.newPassword)) + given(securityPort.encode(requestStub.newPassword)) .willReturn(requestStub.newPassword) // when & then @@ -87,7 +87,7 @@ class ChangePasswordUseCaseTests { @Test fun `유저 찾기 실패`() { // given - given(userSecurityPort.getCurrentUserId()) + given(securityPort.getCurrentUserId()) .willReturn(id) given(queryUserPort.queryUserById(id)) @@ -102,13 +102,13 @@ class ChangePasswordUseCaseTests { @Test fun `비밀번호 불일치`() { // given - given(userSecurityPort.getCurrentUserId()) + given(securityPort.getCurrentUserId()) .willReturn(id) given(queryUserPort.queryUserById(id)) .willReturn(userStub) - given(userSecurityPort.compare(requestStub.password, userStub.password.value)) + given(securityPort.compare(requestStub.password, userStub.password.value)) .willReturn(false) // when & then diff --git a/simtong-application/src/test/kotlin/team/comit/simtong/domain/user/usecase/ChangeProfileImageUseCaseTests.kt b/simtong-application/src/test/kotlin/team/comit/simtong/domain/user/usecase/ChangeProfileImageUseCaseTests.kt index 1b9ba13e..e98c43c4 100644 --- a/simtong-application/src/test/kotlin/team/comit/simtong/domain/user/usecase/ChangeProfileImageUseCaseTests.kt +++ b/simtong-application/src/test/kotlin/team/comit/simtong/domain/user/usecase/ChangeProfileImageUseCaseTests.kt @@ -25,7 +25,7 @@ class ChangeProfileImageUseCaseTests { private lateinit var queryUserPort: QueryUserPort @MockBean - private lateinit var userSecurityPort: UserSecurityPort + private lateinit var securityPort: UserSecurityPort @MockBean private lateinit var commandUserPort: CommandUserPort @@ -62,7 +62,7 @@ class ChangeProfileImageUseCaseTests { fun setUp() { changeProfileImageUseCase = ChangeProfileImageUseCase( queryUserPort, - userSecurityPort, + securityPort, commandUserPort, checkFilePort ) @@ -74,7 +74,7 @@ class ChangeProfileImageUseCaseTests { given(checkFilePort.existsPath(requestStub.profileImagePath)) .willReturn(true) - given(userSecurityPort.getCurrentUserId()) + given(securityPort.getCurrentUserId()) .willReturn(id) given(queryUserPort.queryUserById(id)) @@ -104,7 +104,7 @@ class ChangeProfileImageUseCaseTests { given(checkFilePort.existsPath(requestStub.profileImagePath)) .willReturn(true) - given(userSecurityPort.getCurrentUserId()) + given(securityPort.getCurrentUserId()) .willReturn(id) given(queryUserPort.queryUserById(id)) diff --git a/simtong-application/src/test/kotlin/team/comit/simtong/domain/user/usecase/ChangeSpotUseCaseTests.kt b/simtong-application/src/test/kotlin/team/comit/simtong/domain/user/usecase/ChangeSpotUseCaseTests.kt index a1000996..ddbe0363 100644 --- a/simtong-application/src/test/kotlin/team/comit/simtong/domain/user/usecase/ChangeSpotUseCaseTests.kt +++ b/simtong-application/src/test/kotlin/team/comit/simtong/domain/user/usecase/ChangeSpotUseCaseTests.kt @@ -35,7 +35,7 @@ class ChangeSpotUseCaseTests { private lateinit var querySpotPort: UserQuerySpotPort @MockBean - private lateinit var userSecurityPort: UserSecurityPort + private lateinit var securityPort: UserSecurityPort private lateinit var changeSpotUseCase: ChangeSpotUseCase @@ -63,13 +63,13 @@ class ChangeSpotUseCaseTests { @BeforeEach fun setUp() { - changeSpotUseCase = ChangeSpotUseCase(queryUserPort, commandUserPort, querySpotPort, userSecurityPort) + changeSpotUseCase = ChangeSpotUseCase(queryUserPort, commandUserPort, querySpotPort, securityPort) } @Test fun `지점 변경 성공`() { // given - given(userSecurityPort.getCurrentUserId()) + given(securityPort.getCurrentUserId()) .willReturn(userId) given(queryUserPort.queryUserById(userId)) @@ -87,7 +87,7 @@ class ChangeSpotUseCaseTests { @Test fun `유저를 찾을 수 없음`() { // given - given(userSecurityPort.getCurrentUserId()) + given(securityPort.getCurrentUserId()) .willReturn(userId) given(queryUserPort.queryUserById(userId)) @@ -102,7 +102,7 @@ class ChangeSpotUseCaseTests { @Test fun `지점을 찾을 수 없음`() { // given - given(userSecurityPort.getCurrentUserId()) + given(securityPort.getCurrentUserId()) .willReturn(userId) given(queryUserPort.queryUserById(userId)) diff --git a/simtong-application/src/test/kotlin/team/comit/simtong/domain/user/usecase/ResetPasswordUseCaseTests.kt b/simtong-application/src/test/kotlin/team/comit/simtong/domain/user/usecase/ResetPasswordUseCaseTests.kt index 54fe3f51..943b4213 100644 --- a/simtong-application/src/test/kotlin/team/comit/simtong/domain/user/usecase/ResetPasswordUseCaseTests.kt +++ b/simtong-application/src/test/kotlin/team/comit/simtong/domain/user/usecase/ResetPasswordUseCaseTests.kt @@ -36,7 +36,7 @@ class ResetPasswordUseCaseTests { private lateinit var commandUserPort: CommandUserPort @MockBean - private lateinit var userSecurityPort: UserSecurityPort + private lateinit var securityPort: UserSecurityPort private lateinit var resetPasswordUseCase: ResetPasswordUseCase @@ -84,7 +84,7 @@ class ResetPasswordUseCaseTests { userQueryAuthCodeLimitPort, commandAuthCodeLimitPort, commandUserPort, - userSecurityPort + securityPort ) } @@ -97,7 +97,7 @@ class ResetPasswordUseCaseTests { given(queryUserPort.queryUserByEmailAndEmployeeNumber(requestStub.email, requestStub.employeeNumber)) .willReturn(userStub) - given(userSecurityPort.encode(requestStub.newPassword)) + given(securityPort.encode(requestStub.newPassword)) .willReturn(requestStub.newPassword) // when & then diff --git a/simtong-application/src/test/kotlin/team/comit/simtong/domain/user/usecase/SignUpUseCaseTests.kt b/simtong-application/src/test/kotlin/team/comit/simtong/domain/user/usecase/SignUpUseCaseTests.kt index 9afbd069..852959e6 100644 --- a/simtong-application/src/test/kotlin/team/comit/simtong/domain/user/usecase/SignUpUseCaseTests.kt +++ b/simtong-application/src/test/kotlin/team/comit/simtong/domain/user/usecase/SignUpUseCaseTests.kt @@ -37,7 +37,7 @@ import java.util.UUID class SignUpUseCaseTests { @MockBean - private lateinit var userJwtPort: UserJwtPort + private lateinit var jwtPort: UserJwtPort @MockBean private lateinit var commandUserPort: CommandUserPort @@ -46,7 +46,7 @@ class SignUpUseCaseTests { private lateinit var commandDeviceTokenPort: CommandDeviceTokenPort @MockBean - private lateinit var userSecurityPort: UserSecurityPort + private lateinit var securityPort: UserSecurityPort @MockBean private lateinit var queryUserPort: QueryUserPort @@ -154,7 +154,7 @@ class SignUpUseCaseTests { @BeforeEach fun setUp() { signUpUseCase = SignUpUseCase( - userJwtPort, + jwtPort, commandUserPort, commandDeviceTokenPort, queryUserPort, @@ -162,7 +162,7 @@ class SignUpUseCaseTests { commandAuthCodeLimitPort, userQuerySpotPort, userQueryTeamPort, - userSecurityPort, + securityPort, queryEmployeeCertificatePort ) } @@ -203,13 +203,13 @@ class SignUpUseCaseTests { given(userQueryTeamPort.queryTeamByName(employeeCertificateStub.teamName)) .willReturn(teamStub) - given(userSecurityPort.encode(requestStub.password)) + given(securityPort.encode(requestStub.password)) .willReturn(userStub.password.value) given(commandUserPort.save(userStub)) .willReturn(saveUserStub) - given(userJwtPort.receiveToken(saveUserStub.id, saveUserStub.authority)) + given(jwtPort.receiveToken(saveUserStub.id, saveUserStub.authority)) .willReturn(responseStub) // when @@ -265,13 +265,13 @@ class SignUpUseCaseTests { given(userQueryTeamPort.queryTeamByName(employeeCertificateStub.teamName)) .willReturn(teamStub) - given(userSecurityPort.encode(requestStub.password)) + given(securityPort.encode(requestStub.password)) .willReturn(userStub.password.value) given(commandUserPort.save(userStub)) .willReturn(saveUserStub) - given(userJwtPort.receiveToken(saveUserStub.id, saveUserStub.authority)) + given(jwtPort.receiveToken(saveUserStub.id, saveUserStub.authority)) .willReturn(responseStub) // when