public EnvironmentTestsFixture SetCurrent(DasEnv environment)
        {
#if NET462
            ConfigurationManager.AppSettings["EnvironmentName"] = environment.ToString();
#else
            Environment.SetEnvironmentVariable(ExpectedPrefix + "EnvironmentName", environment.ToString());
#endif

            return(this);
        }
 public void WhenSuppliedEnvironmentsAreCheckedIfAnyIsTheCurrentEnvironment_TheShouldReturnCorrectIfCurrentStatus(bool expected, DasEnv current, DasEnv[] toCheck)
 {
     Run(f => f.SetCurrent(current), f => f.IsCurrent(toCheck), (f, r) => r.Should().Be(expected));
 }
        public LocalAuthorizationHandlerTestsFixture SetEnvironment(DasEnv environment)
        {
            EnvironmentService.Setup(e => e.IsCurrent(environment)).Returns(true);

            return(this);
        }
 public void WhenGettingCurrent_ThenShouldReturnCurrentEnvironment(DasEnv env)
 {
     Run(f => f.SetCurrent(env), f => f.Current(), (f, r) => r.Should().Be(env));
 }
        public GoogleAnalyticsConfigurationFactoryTestsFixture SetEnvironment(DasEnv env)
        {
            EnvironmentService.Setup(e => e.IsCurrent(env)).Returns(true);

            return(this);
        }