public void UpdateProjectTreeSettings_NullAsProjectTreeSettings_ThrowsArgumentNull()
        {
            var ruleSnapsnots      = IProjectRuleSnapshotsFactory.Create();
            var propertiesProvider = CreateInstance();
            IImmutableDictionary <string, string> projectTreeSettings = null;

            Assert.Throws <ArgumentNullException>("projectTreeSettings", () => {
                propertiesProvider.UpdateProjectTreeSettings(ruleSnapsnots, ref projectTreeSettings);
            });
        }
Beispiel #2
0
        internal void Verify(AppDesignerFolderProjectTreePropertiesProvider provider, IProjectTree expected, IProjectTree input, string folderName = null, bool?contentOnlyVisibleInShowAllFiles = null)
        {
            IImmutableDictionary <string, string> projectTreeSettings         = ImmutableStringDictionary <string> .EmptyOrdinal;
            IImmutableDictionary <string, IProjectRuleSnapshot> ruleSnapshots = IProjectRuleSnapshotsFactory.Create();

            if (folderName != null)
            {
                ruleSnapshots = ruleSnapshots.Add(AppDesigner.SchemaName, AppDesigner.FolderNameProperty, folderName);
            }

            if (contentOnlyVisibleInShowAllFiles != null)
            {
                ruleSnapshots = ruleSnapshots.Add(AppDesigner.SchemaName, AppDesigner.ContentsVisibleOnlyInShowAllFilesProperty, contentOnlyVisibleInShowAllFiles.Value.ToString());
            }

            provider.UpdateProjectTreeSettings(ruleSnapshots, ref projectTreeSettings);

            IProjectTree result = provider.ChangePropertyValuesForEntireTree(input, projectTreeSettings);

            AssertAreEquivalent(expected, result);
        }