Skip to content

Instantly share code, notes, and snippets.

@edwin
Created April 6, 2020 07:29
Show Gist options
  • Save edwin/792262700e320f966198df1723d7d5d2 to your computer and use it in GitHub Desktop.
Save edwin/792262700e320f966198df1723d7d5d2 to your computer and use it in GitHub Desktop.
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit.jupiter.SpringExtension;
/**
*
* @author Muhammad Edwin < edwin at redhat dot com >
* 06 Apr 2020 14:17
*/
@ExtendWith(SpringExtension.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@Slf4j
public class EncryptionTest {
@Value("${spring.datasource.password}")
private String databasePassword;
@Test
@DisplayName("Testing succesfully decrypt database password")
public void testDecrypt() {
Assertions.assertEquals("password", databasePassword);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment