use of org.wildfly.swarm.spi.api.StageConfig in project wildfly-swarm by wildfly-swarm.
the class StageConfigTest method testPropertyBasedConfigStagesFile.
@Test
public void testPropertyBasedConfigStagesFile() throws Exception {
try {
URL projectStages = getClass().getClassLoader().getResource("simple-project-stages.yml");
System.setProperty(SwarmProperties.PROJECT_STAGE_FILE, projectStages.toExternalForm());
Swarm swarm = new Swarm(new Properties());
ConfigView view = swarm.configView();
assertThat(view.resolve("foo.bar.baz").getValue()).isEqualTo("cheddar");
StageConfig stageConfig = swarm.stageConfig();
assertThat(stageConfig.resolve("foo.bar.baz").getValue()).isEqualTo("cheddar");
} finally {
System.clearProperty(SwarmProperties.PROJECT_STAGE_FILE);
}
}
Aggregations