BAEL-3756-Spring-YAML-vs-Properties (#9482)
* Remove Dockerfile because it is not longer needed in the article * Add different YAML configurations and process into POJO * Remove .dockerignore file because it is not longer needed in the article * Add default Spring profile to test and force also in the Unit tests
This commit is contained in:
+2
@@ -11,6 +11,7 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = MyApplication.class)
|
||||
@TestPropertySource(properties = {"spring.profiles.active = test"})
|
||||
class YAMLIntegrationTest {
|
||||
|
||||
@Autowired
|
||||
@@ -20,5 +21,6 @@ class YAMLIntegrationTest {
|
||||
void whenProfileTest_thenNameTesting() {
|
||||
assertTrue("testing".equalsIgnoreCase(config.getEnvironment()));
|
||||
assertTrue("test-YAML".equalsIgnoreCase(config.getName()));
|
||||
assertTrue("myurl".equalsIgnoreCase(config.getComponent().getIdm().getUrl()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user