public void Can_load_settings(string fileName, int expected)
        {
            var content = EmbeddedResourceLoader.Load(Assembly.GetExecutingAssembly(), $"{GetType().Namespace}.MockData.{fileName}.settings.xml");

            using GitModuleTestHelper testHelper = new();
            var settingsFile = testHelper.CreateRepoFile(".git", "GitExtensions.settings", content);
            using GitExtSettingsCache settingsCache = new(settingsFile);
            RepoDistSettings settings = new(null, settingsCache, SettingLevel.Unknown);

            var definitions = _externalLinksStorage.Load(settings);
            definitions.Count.Should().Be(expected);
        }
        public void Add_should_add_new_definition_to_the_lowest_level_level2()
        {
            _externalLinksStorage.Load(_userRoaming).Count.Should().Be(1);

            ExternalLinksManager manager = new(_repoDistributed);

            // 1 comes from the user roaming settings
            // 3 come from the distributed
            manager.GetEffectiveSettings().Count.Should().Be(4);

            ExternalLinkDefinition definition = new()
            {
                Name          = "test",
                SearchPattern = "pattern"
            };

            manager.Add(definition);

            var effectiveSettings = manager.GetEffectiveSettings();

            // 2 comes from the user roaming settings
            // 3 come from the distributed
            effectiveSettings.Count.Should().Be(5);

            manager.Save();

            _externalLinksStorage.Load(_userRoaming).Count.Should().Be(2);
        }