public async Task CanReadConfigurationValues() { // Given string[] args = new string[] { }; Environment.SetEnvironmentVariable(nameof(CanReadConfigurationValues), "Foo"); IBootstrapper bootstrapper = App.Bootstrapper.CreateDefault(args); TestLoggerProvider provider = new TestLoggerProvider(); bootstrapper.ConfigureServices(services => services.AddSingleton <ILoggerProvider>(provider)); string variable = null; bootstrapper.ConfigureSettings(x => variable = x[nameof(CanReadConfigurationValues)]); bootstrapper.AddPipeline("Foo"); // When int exitCode = await bootstrapper.RunAsync(); // Then exitCode.ShouldBe((int)ExitCode.Normal); variable.ShouldBe("Foo"); }