public void ConfigFileReaderTestFromEnvVar() { Environment.SetEnvironmentVariable("CONFIGLITE_" + ConfigFileReader.CONFIG_FILE_ENV_VAR, "config.ini"); ConfigFileReader reader = ConfigFileReader.CreateFromFile("CONFIGLITE", "config.error.ini"); Assert.Equal(13, reader.Configurations.Count); reader = ConfigFileReader.CreateFromEnvVar("CONFIGLITE"); Assert.Equal(13, reader.Configurations.Count); Environment.SetEnvironmentVariable("CONFIGLITE_" + ConfigFileReader.CONFIG_FILE_ENV_VAR, null); }
private ConfigStore(string envVarPrefix) { Item.EnvVarEnvVarPrefix = envVarPrefix; Item.ConfigFileReader = ConfigFileReader.CreateFromEnvVar(envVarPrefix); }