public void SettingPackageSourcesWithAggregateWillNotAddAggregate()
        {
            // Arrange
            var userSettingsManager     = new MockUserSettingsManager();
            var registrySettingsManager = new MockPackageSourceSettingsManager();

            registrySettingsManager.PackageSourcesString = "";
            var provider       = new VsPackageSourceProvider(registrySettingsManager, userSettingsManager);
            var packageSources = new List <PackageSource> {
                provider.AggregateSource,
                new PackageSource("source", "name")
            };

            // Act
            provider.SetPackageSources(packageSources);

            // Assert
            var values = userSettingsManager.GetValues(VsPackageSourceProvider.FileSettingsSectionName);

            Assert.AreEqual(1, values.Count);
            AssertPackageSource(values[0], "name", "source");
        }
        public void SettingPackageSourcesWithAggregateWillNotAddAggregate()
        {
            // Arrange
            var userSettingsManager = new MockUserSettingsManager();
            var registrySettingsManager = new MockPackageSourceSettingsManager();
            registrySettingsManager.PackageSourcesString = "";
            var provider = new VsPackageSourceProvider(registrySettingsManager, userSettingsManager);
            var packageSources = new List<PackageSource> {
                                                             provider.AggregateSource,
                                                             new PackageSource("source", "name")
                                                         };

            // Act
            provider.SetPackageSources(packageSources);

            // Assert
            var values = userSettingsManager.GetValues(VsPackageSourceProvider.FileSettingsSectionName);

            Assert.AreEqual(1, values.Count);
            AssertPackageSource(values[0], "name", "source");
        }