private void ComparePluginLocation(OldPluginLocation oldLocation, PluginLocation newLocation)
        {
            if (oldLocation == null)
            {
                return;
            }

            newLocation.Should().NotBeNull();

            var propertiesToCompare = new HashSet <string>
            {
                nameof(OldPluginLocation.DllHash),
                nameof(OldPluginLocation.DllPath),
                nameof(OldPluginLocation.LastModifiedDateTime),
                nameof(OldPluginLocation.VendorVersion),
                nameof(OldPluginLocation.PluginVendor),
                nameof(OldPluginLocation.PluginName),
                nameof(OldPluginLocation.PluginProduct),
                nameof(OldPluginLocation.VstPluginId)
            };
            var comparer = new PropertyComparisonHelper(oldLocation, newLocation);

            comparer.CompareProperties(propertiesToCompare);

            comparer.GetUnvisitedProperties().Should().BeEmpty();
        }
        private void ComparePreset(OldPreset oldPreset, Preset newPreset)
        {
            newPreset.Should().NotBeNull();

            var propertiesToCompare = new HashSet <string>
            {
                nameof(OldPreset.PresetId),
                nameof(OldPreset.IsIgnored),
                nameof(OldPreset.LastExported),
                nameof(OldPreset.PresetSize),
                nameof(OldPreset.PresetCompressedSize),
                nameof(OldPreset.PresetHash)
            };

            var metadataPropertiesToCompare = new HashSet <string>
            {
                nameof(OldPreset.PresetName),
                nameof(OldPreset.Author),
                nameof(OldPreset.Comment),
                nameof(OldPreset.BankPath)
            };

            var originalMetadataPropertiesToCompare = new HashSet <string>
            {
                nameof(OldPreset.PresetName),
                nameof(OldPreset.Author),
                nameof(OldPreset.Comment),
                nameof(OldPreset.SourceFile),
                nameof(OldPreset.BankPath)
            };

            var comparer = new PropertyComparisonHelper(oldPreset, newPreset);

            comparer.CompareProperties(propertiesToCompare);
            comparer.AddVisitedProperty(nameof(OldPreset.Plugin));
            comparer.AddVisitedProperty(nameof(OldPreset.IsMetadataModified));
            comparer.GetUnvisitedProperties().Should().BeEmpty();

            comparer = new PropertyComparisonHelper(oldPreset, newPreset.Metadata);
            comparer.CompareProperties(metadataPropertiesToCompare);
            comparer.AddVisitedProperty(nameof(OldPreset.Types));
            comparer.GetUnvisitedProperties().Should().BeEmpty();

            comparer = new PropertyComparisonHelper(oldPreset, newPreset.OriginalMetadata);
            comparer.CompareProperties(originalMetadataPropertiesToCompare);
            comparer.AddVisitedProperty(nameof(OldPreset.Types));
            comparer.AddVisitedProperty(nameof(OldPreset.Plugin));
            comparer.GetUnvisitedProperties().Should().BeEmpty();

            CompareTypes(oldPreset.Types, newPreset.OriginalMetadata.Types);
            CompareTypes(oldPreset.Types, newPreset.Metadata.Types);

            CompareModes(oldPreset.Modes, newPreset.OriginalMetadata.Characteristics);
            CompareModes(oldPreset.Modes, newPreset.Metadata.Characteristics);
        }
        private void ComparePlugin(OldPlugin oldPlugin, Plugin newPlugin)
        {
            var propertiesToCompare = new HashSet <string>
            {
                nameof(Plugin.IsEnabled),
                nameof(Plugin.PluginType),
                nameof(Plugin.LastKnownGoodDllPath),
                nameof(Plugin.AudioPreviewPreDelay),
                nameof(Plugin.IsReported),
                nameof(Plugin.DontReport),
                nameof(Plugin.PluginName),
                nameof(Plugin.PluginVendor),
                nameof(Plugin.HasMetadata),
                nameof(Plugin.IsSupported),
                nameof(Plugin.VstPluginId),
            };
            var comparer = new PropertyComparisonHelper(oldPlugin, newPlugin);

            comparer.CompareProperties(propertiesToCompare);

            ComparePluginLocation(oldPlugin.PluginLocation, newPlugin.PluginLocation);
            comparer.AddVisitedProperty(nameof(oldPlugin.PluginLocation));

            newPlugin.Presets.Count.Should().Be(oldPlugin.Presets.Count);

            foreach (var oldPreset in oldPlugin.Presets)
            {
                var newPreset = (from p in newPlugin.Presets where p.PresetId == oldPreset.PresetId select p)
                                .FirstOrDefault();
                ComparePreset(oldPreset, newPreset);
            }

            comparer.AddVisitedProperty(nameof(oldPlugin.Presets));

            CompareTypes(oldPlugin.DefaultTypes, newPlugin.DefaultTypes);
            comparer.AddVisitedProperty(nameof(oldPlugin.DefaultTypes));

            CompareModes(oldPlugin.DefaultModes, newPlugin.DefaultCharacteristics);

            newPlugin.PluginCapabilities.Should().BeEquivalentTo(oldPlugin.PluginCapabilities);
            comparer.AddVisitedProperty(nameof(oldPlugin.PluginCapabilities));

            newPlugin.PluginInfo.Should().BeEquivalentTo(oldPlugin.PluginInfo);
            comparer.AddVisitedProperty(nameof(oldPlugin.PluginInfo));

            CompareBankFiles(oldPlugin.AdditionalBankFiles, newPlugin.AdditionalBankFiles);
            comparer.AddVisitedProperty(nameof(oldPlugin.AdditionalBankFiles));


            newPlugin.DefaultControllerAssignments.Should().BeEquivalentTo(oldPlugin.DefaultControllerAssignments);
            comparer.AddVisitedProperty(nameof(oldPlugin.DefaultControllerAssignments));

            comparer.GetUnvisitedProperties().Should().BeEmpty();
        }