Search in sources :

Example 1 with MergeConfigOrigin

use of com.thoughtworks.go.config.merge.MergeConfigOrigin in project gocd by gocd.

the class MagicalGoConfigXmlLoaderTest method shouldSetConfigOriginInCruiseConfig_AfterLoadingConfigFile.

@Test
public void shouldSetConfigOriginInCruiseConfig_AfterLoadingConfigFile() throws Exception {
    GoConfigHolder goConfigHolder = xmlLoader.loadConfigHolder(CONFIG, new MagicalGoConfigXmlLoader.Callback() {

        @Override
        public void call(CruiseConfig cruiseConfig) {
            cruiseConfig.setPartials(asList(new PartialConfig()));
        }
    });
    assertThat(goConfigHolder.config.getOrigin(), Is.<ConfigOrigin>is(new MergeConfigOrigin()));
    assertThat(goConfigHolder.configForEdit.getOrigin(), Is.<ConfigOrigin>is(new FileConfigOrigin()));
}
Also used : MergeConfigOrigin(com.thoughtworks.go.config.merge.MergeConfigOrigin) FileConfigOrigin(com.thoughtworks.go.config.remote.FileConfigOrigin) PartialConfig(com.thoughtworks.go.config.remote.PartialConfig) Test(org.junit.Test)

Aggregations

MergeConfigOrigin (com.thoughtworks.go.config.merge.MergeConfigOrigin)1 FileConfigOrigin (com.thoughtworks.go.config.remote.FileConfigOrigin)1 PartialConfig (com.thoughtworks.go.config.remote.PartialConfig)1 Test (org.junit.Test)1