반응형 2020/02/201 [junit5] 생성자만 열려있는 오브젝트 테스트하기(mockito) 설정을 담당하는 Bean 이 있다면 자동으로 contractor 이 될것이기 때문에 값이 자동으로 주입된다 가령 다음과 같은 것 형태다 application.properties test.string.one = test-one test.string.two = test-two Configuration Bean @Configuration public class TestConfig { @Value("${test.string.one}") private String testOne; @Value("${test.string.two}") private String testTwo; public String getTestOne() { return testOne; } public String getTestTwo() { ret.. 2020. 2. 20. 이전 1 다음 반응형