@Test public void should_load_configuration_file() { final InputStream inputStream = FileUtils.loadConfiguration("chameleon/default/containers.yaml", true); Assertions.assertThat(inputStream).isNotNull(); }
public static InputStream loadConfiguration(String resourceName, boolean isDefault) { InputStream stream = loadResource(resourceName); if (stream == null) { if (isDefault) { throw new IllegalStateException( "Could not find built-in configuration as file nor classloader resource: " + resourceName + ". " + "Make sure that this file exists in classpath resource or in the project folder."); } else { throw new ConfigurationException( "Could not locate configured containerConfigurationFile as file" + " nor classloader resource: " + resourceName); } } return stream; }
FileUtils { public static InputStream loadConfiguration(String resourceName, boolean isDefault) { InputStream stream = loadResource(resourceName); if (stream == null) { if (isDefault) { throw new IllegalStateException( "Could not find built-in configuration as file nor classloader resource: " + resourceName + ". " + "Make sure that this file exists in classpath resource or in the project folder."); } else { throw new ConfigurationException( "Could not locate configured containerConfigurationFile as file" + " nor classloader resource: " + resourceName); } } return stream; } }
FileUtils { public static InputStream loadConfiguration(String resourceName, boolean isDefault) { InputStream stream = loadResource(resourceName); if (stream == null) { if (isDefault) { throw new IllegalStateException( "Could not find built-in configuration as file nor classloader resource: " + resourceName + ". " + "Make sure that this file exists in classpath resource or in the project folder."); } else { throw new ConfigurationException( "Could not locate configured containerConfigurationFile as file" + " nor classloader resource: " + resourceName); } } return stream; }  }
FileUtils { public static InputStream loadConfiguration(String resourceName, boolean isDefault) { InputStream stream = loadResource(resourceName); if (stream == null) { if (isDefault) { throw new IllegalStateException( "Could not find built-in configuration as file nor classloader resource: " + resourceName + ". " + "Make sure that this file exists in classpath resource or in the project folder."); } else { throw new ConfigurationException( "Could not locate configured containerConfigurationFile as file" + " nor classloader resource: " + resourceName); } } return stream; }  static InputStream loadConfiguration(String resourceName, boolean isDefault); }
FileUtils { public static InputStream loadConfiguration(String resourceName, boolean isDefault) { InputStream stream = loadResource(resourceName); if (stream == null) { if (isDefault) { throw new IllegalStateException( "Could not find built-in configuration as file nor classloader resource: " + resourceName + ". " + "Make sure that this file exists in classpath resource or in the project folder."); } else { throw new ConfigurationException( "Could not locate configured containerConfigurationFile as file" + " nor classloader resource: " + resourceName); } } return stream; }  static InputStream loadConfiguration(String resourceName, boolean isDefault);  }