Skip to content

Commit

Permalink
test: test
Browse files Browse the repository at this point in the history
  • Loading branch information
juno-junho committed Sep 13, 2023
1 parent 9aef433 commit 9af1d80
Showing 1 changed file with 29 additions and 29 deletions.
Original file line number Diff line number Diff line change
@@ -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");
}

}

0 comments on commit 9af1d80

Please sign in to comment.