From 65bd663359910a0a8fbb695b07bd726e68c9c1fc Mon Sep 17 00:00:00 2001 From: github-actions <> Date: Thu, 23 Nov 2023 13:15:59 +0000 Subject: [PATCH] Google Java Format --- .../member/repository/MemberRepository.java | 3 +- .../member/service/AuthServiceTest.java | 48 ++++++++----------- .../member/service/MemberServiceTest.java | 2 - 3 files changed, 22 insertions(+), 31 deletions(-) diff --git a/backend/src/main/java/com/twtw/backend/domain/member/repository/MemberRepository.java b/backend/src/main/java/com/twtw/backend/domain/member/repository/MemberRepository.java index a482fbbf..85dc6a10 100644 --- a/backend/src/main/java/com/twtw/backend/domain/member/repository/MemberRepository.java +++ b/backend/src/main/java/com/twtw/backend/domain/member/repository/MemberRepository.java @@ -18,5 +18,6 @@ public interface MemberRepository extends JpaRepository { @Query( "SELECT m FROM Member m WHERE m.oauthInfo.clientId = :oAuthId AND" + " m.oauthInfo.authType = :authType") - Optional findByOAuthIdAndAuthType(@Param("oAuthId") String oAuthId, @Param("authType") AuthType authType); + Optional findByOAuthIdAndAuthType( + @Param("oAuthId") String oAuthId, @Param("authType") AuthType authType); } diff --git a/backend/src/test/java/com/twtw/backend/domain/member/service/AuthServiceTest.java b/backend/src/test/java/com/twtw/backend/domain/member/service/AuthServiceTest.java index c37c3bef..c5ce7d0c 100644 --- a/backend/src/test/java/com/twtw/backend/domain/member/service/AuthServiceTest.java +++ b/backend/src/test/java/com/twtw/backend/domain/member/service/AuthServiceTest.java @@ -1,5 +1,7 @@ package com.twtw.backend.domain.member.service; +import static org.assertj.core.api.Assertions.assertThat; + import com.twtw.backend.domain.member.dto.request.MemberSaveRequest; import com.twtw.backend.domain.member.dto.request.OAuthRequest; import com.twtw.backend.domain.member.dto.response.AfterLoginResponse; @@ -11,13 +13,11 @@ import com.twtw.backend.fixture.member.MemberEntityFixture; import com.twtw.backend.support.database.DatabaseTest; import com.twtw.backend.support.exclude.ExcludeTest; -import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; -import static org.assertj.core.api.Assertions.assertThat; - @DatabaseTest @DisplayName("AuthService의 ") public class AuthServiceTest extends ExcludeTest { @@ -28,19 +28,15 @@ public class AuthServiceTest extends ExcludeTest { @Autowired private RefreshTokenRepository refreshTokenRepository; - @Test @DisplayName("Kakao 회원 가입이 수행되는가") - void saveMemberKakao(){ + void saveMemberKakao() { // given - MemberSaveRequest kakaoRequest = new MemberSaveRequest( - "JinJooWon_Kakao", - "TEST_PROFILE_IMAGE", - new OAuthRequest( - "TEST_KAKAO_TOKEN", - AuthType.KAKAO - ) - ); + MemberSaveRequest kakaoRequest = + new MemberSaveRequest( + "JinJooWon_Kakao", + "TEST_PROFILE_IMAGE", + new OAuthRequest("TEST_KAKAO_TOKEN", AuthType.KAKAO)); // when AfterLoginResponse response = authService.saveMember(kakaoRequest); @@ -51,16 +47,13 @@ void saveMemberKakao(){ @Test @DisplayName("Apple 회원 가입이 수행되는가") - void saveMemberApple(){ - //given - MemberSaveRequest appleRequest = new MemberSaveRequest( - "JinJooWon_Apple", - "TEST_PROFILE_IMAGE", - new OAuthRequest( - "TEST_APPLE_TOKEN", - AuthType.APPLE - ) - ); + void saveMemberApple() { + // given + MemberSaveRequest appleRequest = + new MemberSaveRequest( + "JinJooWon_Apple", + "TEST_PROFILE_IMAGE", + new OAuthRequest("TEST_APPLE_TOKEN", AuthType.APPLE)); // when AfterLoginResponse response = authService.saveMember(appleRequest); @@ -71,14 +64,13 @@ void saveMemberApple(){ @Test @DisplayName("로그인 후 회원에 대해 토큰이 재발급되는가") - void getTokenByOAuthSuccess(){ + void getTokenByOAuthSuccess() { // given final Member member = memberRepository.save(MemberEntityFixture.FIRST_MEMBER.toEntity()); - final OAuthRequest request = new OAuthRequest( - member.getOauthInfo().getClientId(), - member.getOauthInfo().getAuthType() - ); + final OAuthRequest request = + new OAuthRequest( + member.getOauthInfo().getClientId(), member.getOauthInfo().getAuthType()); // when AfterLoginResponse response = authService.getTokenByOAuth(request); diff --git a/backend/src/test/java/com/twtw/backend/domain/member/service/MemberServiceTest.java b/backend/src/test/java/com/twtw/backend/domain/member/service/MemberServiceTest.java index b5728360..c0e68851 100644 --- a/backend/src/test/java/com/twtw/backend/domain/member/service/MemberServiceTest.java +++ b/backend/src/test/java/com/twtw/backend/domain/member/service/MemberServiceTest.java @@ -55,6 +55,4 @@ void getResponseByMember() { // then assertThat(memberResponse.getId()).isEqualTo(member.getId()); } - - }