From 9af1d80c4f7f2f45cfa6957a4c6569b81b88983e Mon Sep 17 00:00:00 2001 From: junho Date: Wed, 13 Sep 2023 16:07:44 +0900 Subject: [PATCH] test: test --- .../global/config/TokenProviderTest.java | 58 +++++++++---------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/src/test/java/com/ray/pominowner/global/config/TokenProviderTest.java b/src/test/java/com/ray/pominowner/global/config/TokenProviderTest.java index b43b6bd7..79d8dc48 100644 --- a/src/test/java/com/ray/pominowner/global/config/TokenProviderTest.java +++ b/src/test/java/com/ray/pominowner/global/config/TokenProviderTest.java @@ -1,29 +1,29 @@ -//package com.ray.pominowner.global.config; -// -//import lombok.extern.slf4j.Slf4j; -//import org.junit.jupiter.api.DisplayName; -//import org.junit.jupiter.api.Test; -//import org.springframework.beans.factory.annotation.Autowired; -//import org.springframework.boot.test.context.SpringBootTest; -// -//import static org.assertj.core.api.Assertions.assertThat; -// -//@Slf4j -//@SpringBootTest -//class TokenProviderTest { -// -// @Autowired -// private TokenProvider tokenProvider; -// -// @Test -// @DisplayName("yml에 설정된 올바른 토큰을 가져올 수 있다.") -// void successGetCorrectToken() { -// String businessNumberServiceKey = tokenProvider.getBusinessNumberServiceKey(); -// String businessNumberHeaderAuthKey = tokenProvider.getBusinessNumberHeaderAuthKey(); -// log.info("businessNumberServiceKey: {}, businessNumberHeaderAuthKey: {}", businessNumberServiceKey, businessNumberHeaderAuthKey); -// -// assertThat(businessNumberServiceKey).isNotBlank().isNotEqualTo("null"); -// assertThat(businessNumberHeaderAuthKey).isNotBlank().isNotEqualTo("null"); -// } -// -//} +package com.ray.pominowner.global.config; + +import lombok.extern.slf4j.Slf4j; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; + +import static org.assertj.core.api.Assertions.assertThat; + +@Slf4j +@SpringBootTest +class TokenProviderTest { + + @Autowired + private TokenProvider tokenProvider; + + @Test + @DisplayName("yml에 설정된 올바른 토큰을 가져올 수 있다.") + void successGetCorrectToken() { + String businessNumberServiceKey = tokenProvider.getBusinessNumberServiceKey(); + String businessNumberHeaderAuthKey = tokenProvider.getBusinessNumberHeaderAuthKey(); + log.info("businessNumberServiceKey: {}, businessNumberHeaderAuthKey: {}", businessNumberServiceKey, businessNumberHeaderAuthKey); + + assertThat(businessNumberServiceKey).isNotBlank().isNotEqualTo("null"); + assertThat(businessNumberHeaderAuthKey).isNotBlank().isNotEqualTo("null"); + } + +}