public void DebugConsoleController_Disabled_Test()
        {

            // Disabled by default
            DebugConsoleController controller = new DebugConsoleController();
            SetContext(controller);
            var states = controller.GetStates() as JsonResult;

            Assert.False((states.Data as GetStateResult).Enabled);
            Assert.Null((states.Data as GetStateResult).States);
        }
        public void DebugConsoleController_Enabled_Test()
        {

            Configuration.Features.Are.ConfiguredBy.Custom(
                Configuration.Features.OfType<TestFeature2>.Enabled);

            DebugConsoleController controller = new DebugConsoleController();
            SetContext(controller);
            controller.SetForced();

            var result = (controller.GetStates() as JsonResult).Data as GetStateResult;

            Assert.True(result.Enabled);
            Assert.NotNull(result.States);
            Assert.Equal(3, result.States.Length);
            Assert.Equal(false, result.States.First(state => state.FeatureName == typeof(TestFeature1).FullName).Enabled);
            Assert.Equal(true, result.States.First(state => state.FeatureName == typeof(TestFeature2).FullName).Enabled);
            Assert.Equal(false, result.States.First(state => state.FeatureName == typeof(TestFeature3).FullName).Enabled);
            Assert.Equal("TestFeature1", result.States.First(state => state.FeatureName == typeof(TestFeature1).FullName).ShortFeatureName);
            Assert.Equal("TestFeature2", result.States.First(state => state.FeatureName == typeof(TestFeature2).FullName).ShortFeatureName);
            Assert.Equal("TestFeature3", result.States.First(state => state.FeatureName == typeof(TestFeature3).FullName).ShortFeatureName);
        }