public void InspectionsAreSetInCtor()
        {
            var defaultConfig = GetDefaultConfig();
            var viewModel     = new InspectionSettingsViewModel(defaultConfig, null);

            Assert.IsTrue(defaultConfig.UserSettings.CodeInspectionSettings.CodeInspections.OrderBy(setting => setting.InspectionType).SequenceEqual(
                              viewModel.InspectionSettings.SourceCollection.OfType <CodeInspectionSetting>().OrderBy(setting => setting.InspectionType)));
        }
        public void SetDefaultsWorks()
        {
            var viewModel = new InspectionSettingsViewModel(GetNondefaultConfig(), null);

            var defaultConfig = GetDefaultConfig();

            viewModel.SetToDefaults(defaultConfig);

            Assert.IsTrue(defaultConfig.UserSettings.CodeInspectionSettings.CodeInspections.OrderBy(setting => setting.InspectionType).SequenceEqual(
                              viewModel.InspectionSettings.SourceCollection.OfType <CodeInspectionSetting>().OrderBy(setting => setting.InspectionType)));
        }
        public void SaveConfigWorks()
        {
            var customConfig = GetNondefaultConfig();
            var viewModel    = new InspectionSettingsViewModel(customConfig, null);

            var config = GetDefaultConfig();

            viewModel.UpdateConfig(config);

            Assert.IsTrue(config.UserSettings.CodeInspectionSettings.CodeInspections.OrderBy(setting => setting.InspectionType).SequenceEqual(
                              viewModel.InspectionSettings.SourceCollection.OfType <CodeInspectionSetting>().OrderBy(setting => setting.InspectionType)));
        }
        public void InspectionSeveritiesAreUpdated()
        {
            var defaultConfig = GetDefaultConfig();
            var viewModel     = new InspectionSettingsViewModel(defaultConfig, null);

            viewModel.InspectionSettings.SourceCollection.OfType <CodeInspectionSetting>().First().Severity =
                GetNondefaultConfig().UserSettings.CodeInspectionSettings.CodeInspections.First().Severity;

            var updatedConfig = defaultConfig;

            updatedConfig.UserSettings.CodeInspectionSettings.CodeInspections.First().Severity =
                GetNondefaultConfig().UserSettings.CodeInspectionSettings.CodeInspections.First().Severity;

            Assert.IsTrue(updatedConfig.UserSettings.CodeInspectionSettings.CodeInspections.OrderBy(setting => setting.InspectionType).SequenceEqual(
                              viewModel.InspectionSettings.SourceCollection.OfType <CodeInspectionSetting>().OrderBy(setting => setting.InspectionType)));
        }