Skip to content

Commit

Permalink
refactor: 글로벌객체들 인스턴스화
Browse files Browse the repository at this point in the history
  • Loading branch information
younghoonkwon committed Oct 27, 2021
1 parent bbd0a8a commit 051e635
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,11 @@ class AuthorizationManagerTest {
private final ObjectMapper objectMapper = new ObjectMapper();
private final RestTemplate restTemplate = new RestTemplate();

private final NaverAuthorization naverAuthorization = spy(new NaverAuthorization(restTemplate, objectMapper));
private final KakaoAuthorization kakaoAuthorization = spy(new KakaoAuthorization(restTemplate, objectMapper));
private final Authorization naverAuthorization = spy(new NaverAuthorization(restTemplate, objectMapper));
private final Authorization kakaoAuthorization = spy(new KakaoAuthorization(restTemplate, objectMapper));


private UserInformation naverUserInfo;
private UserInformation kakaoUserInfo;

@BeforeEach
void setUp() throws JsonProcessingException {
Expand All @@ -48,9 +47,6 @@ void setUp() throws JsonProcessingException {

NaverProfile naverProfile = objectMapper.readValue(NAVER_PROFILE_RESPONSE, NaverProfile.class);
naverUserInfo = UserInformation.of(naverProfile);

KakaoProfile kakaoProfile = objectMapper.readValue(KAKAO_PROFILE_RESPONSE, KakaoProfile.class);
kakaoUserInfo = UserInformation.of(kakaoProfile);
}

@DisplayName("Naver Authorization 매니저 유저 정보 요청 - 성공")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class KakaoAuthorizationTest {

private final RestTemplate restTemplate = spy(RestTemplate.class);
private final ObjectMapper objectMapper = new ObjectMapper();
private final KakaoAuthorization kakaoAuthorization = new KakaoAuthorization(restTemplate, objectMapper);
private final Authorization kakaoAuthorization = new KakaoAuthorization(restTemplate, objectMapper);
private HttpEntity<MultiValueMap<String, String>> kakaoTokenRequest;
private ResponseEntity<String> tokenResponse;
private ResponseEntity<String> profileResponse;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class NaverAuthorizationTest {

private final RestTemplate restTemplate = spy(RestTemplate.class);
private final ObjectMapper objectMapper = new ObjectMapper();
private final NaverAuthorization naverAuthorization = new NaverAuthorization(restTemplate, objectMapper);
private final Authorization naverAuthorization = new NaverAuthorization(restTemplate, objectMapper);
private HttpEntity<MultiValueMap<String, String>> naverTokenRequest;
private ResponseEntity<String> tokenResponse;
private ResponseEntity<String> profileResponse;
Expand Down

0 comments on commit 051e635

Please sign in to comment.