public void TestPowerPlanShouldNotChange()
        {
            var userPlan = PowerManagementHelper.CurrentPlan;
            var logger   = new OutputLogger(Output);
            var powerManagementApplier = new PowerManagementApplier(logger);
            var config = DefaultConfig.Instance.With(logger);

            powerManagementApplier.ApplyPerformancePlan(PowerPlan.UserPowerPlan);
            Assert.Equal(userPlan.ToString(), PowerManagementHelper.CurrentPlan.ToString());
            powerManagementApplier.ApplyUserPowerPlan();
            Assert.Equal(userPlan, PowerManagementHelper.CurrentPlan);
        }
        public void TestPowerPlanShouldNotChange()
        {
            var userPlan = PowerManagementHelper.CurrentPlan;
            var logger   = new OutputLogger(Output);
            var powerManagementApplier = new PowerManagementApplier(logger);

            powerManagementApplier.ApplyPerformancePlan(PowerManagementApplier.Map(PowerPlan.UserPowerPlan));

            Assert.Equal(userPlan.ToString(), PowerManagementHelper.CurrentPlan.ToString());
            powerManagementApplier.Dispose();

            Assert.Equal(userPlan, PowerManagementHelper.CurrentPlan);
        }
        public void TestSettingAndRevertingBackGuid()
        {
            var userPlan = PowerManagementHelper.CurrentPlan;
            var logger   = new OutputLogger(Output);
            var powerManagementApplier = new PowerManagementApplier(logger);
            var config = DefaultConfig.Instance.With(logger);

            powerManagementApplier.ApplyPerformancePlan(PowerPlan.HighPerformance);
            Assert.Equal(HighPerformancePlanGuid, PowerManagementHelper.CurrentPlan.ToString());
            Assert.Equal("High performance", PowerManagementHelper.CurrentPlanFriendlyName);
            powerManagementApplier.ApplyUserPowerPlan();
            Assert.Equal(userPlan, PowerManagementHelper.CurrentPlan);
        }