@Test public void ResourceConstructorTest() throws IOException{ PropertyLoader pl = new PropertyLoader(mockResource, "overrides.properties"); Resource[] resources = pl.constructResourceList(); assertNotNull(resources); assertEquals(1, resources.length); }
public Resource[] constructResourceList() { String configHost = System.getProperties().getProperty(DEFAULT_CONFIG_HOST_PROPERTY); if (configHost == null) { log("No config Host defined - assuming " + DEFAULT_CONFIG_HOST_PROPERTY_VALUE); configHost = DEFAULT_CONFIG_HOST_PROPERTY_VALUE; } DefaultResourceLoader loader = new DefaultResourceLoader(); Resource configOverrideResource = loader.getResource(configHost + configOverride); return handleConfig(defaultConfig, appProperties, configOverrideResource); }
PropertyLoader { public Resource[] constructResourceList() { String configHost = System.getProperties().getProperty(DEFAULT_CONFIG_HOST_PROPERTY); if (configHost == null) { log("No config Host defined - assuming " + DEFAULT_CONFIG_HOST_PROPERTY_VALUE); configHost = DEFAULT_CONFIG_HOST_PROPERTY_VALUE; } DefaultResourceLoader loader = new DefaultResourceLoader(); Resource configOverrideResource = loader.getResource(configHost + configOverride); return handleConfig(defaultConfig, appProperties, configOverrideResource); } }
PropertyLoader { public Resource[] constructResourceList() { String configHost = System.getProperties().getProperty(DEFAULT_CONFIG_HOST_PROPERTY); if (configHost == null) { log("No config Host defined - assuming " + DEFAULT_CONFIG_HOST_PROPERTY_VALUE); configHost = DEFAULT_CONFIG_HOST_PROPERTY_VALUE; } DefaultResourceLoader loader = new DefaultResourceLoader(); Resource configOverrideResource = loader.getResource(configHost + configOverride); return handleConfig(defaultConfig, appProperties, configOverrideResource); } PropertyLoader(Resource defaultConfig, String configOverride);  PropertyLoader(Resource defaultConfig, String configOverride, Logger logger); }
PropertyLoader { public Resource[] constructResourceList() { String configHost = System.getProperties().getProperty(DEFAULT_CONFIG_HOST_PROPERTY); if (configHost == null) { log("No config Host defined - assuming " + DEFAULT_CONFIG_HOST_PROPERTY_VALUE); configHost = DEFAULT_CONFIG_HOST_PROPERTY_VALUE; } DefaultResourceLoader loader = new DefaultResourceLoader(); Resource configOverrideResource = loader.getResource(configHost + configOverride); return handleConfig(defaultConfig, appProperties, configOverrideResource); } PropertyLoader(Resource defaultConfig, String configOverride);  PropertyLoader(Resource defaultConfig, String configOverride, Logger logger); Properties buildConsolidatedProperties(); Resource[] constructResourceList(); }
PropertyLoader { public Resource[] constructResourceList() { String configHost = System.getProperties().getProperty(DEFAULT_CONFIG_HOST_PROPERTY); if (configHost == null) { log("No config Host defined - assuming " + DEFAULT_CONFIG_HOST_PROPERTY_VALUE); configHost = DEFAULT_CONFIG_HOST_PROPERTY_VALUE; } DefaultResourceLoader loader = new DefaultResourceLoader(); Resource configOverrideResource = loader.getResource(configHost + configOverride); return handleConfig(defaultConfig, appProperties, configOverrideResource); } PropertyLoader(Resource defaultConfig, String configOverride);  PropertyLoader(Resource defaultConfig, String configOverride, Logger logger); Properties buildConsolidatedProperties(); Resource[] constructResourceList();  }