Esempio n. 1
0
        public void Implicit()
        {
            var properties = ImmutableStringDictionary <string> .EmptyOrdinal.Add("myProp", "myVal");

            var model = new ComDependencyModel(
                "c:\\myPath.dll",
                "myOriginalItemSpec",
                isResolved: true,
                isImplicit: true,
                properties: properties);

            Assert.Equal(ComRuleHandler.ProviderTypeString, model.ProviderType);
            Assert.Equal("c:\\myPath.dll", model.Path);
            Assert.Equal("myOriginalItemSpec", model.OriginalItemSpec);
            Assert.Equal("myPath", model.Caption);
            Assert.Equal(ResolvedCOMReference.SchemaName, model.SchemaName);
            Assert.True(model.Resolved);
            Assert.True(model.Implicit);
            Assert.Equal(properties, model.Properties);
            Assert.Equal(Dependency.ComNodePriority, model.Priority);
            Assert.Equal(ComReference.PrimaryDataSourceItemType, model.SchemaItemType);
            Assert.Equal(ManagedImageMonikers.ComponentPrivate, model.Icon);
            Assert.Equal(ManagedImageMonikers.ComponentPrivate, model.ExpandedIcon);
            Assert.Equal(ManagedImageMonikers.ComponentWarning, model.UnresolvedIcon);
            Assert.Equal(ManagedImageMonikers.ComponentWarning, model.UnresolvedExpandedIcon);
            Assert.Equal(
                DependencyTreeFlags.ComSubTreeNodeFlags +
                DependencyTreeFlags.GenericResolvedDependencyFlags -
                DependencyTreeFlags.SupportsRemove,
                model.Flags);
        }
Esempio n. 2
0
        public void Implicit()
        {
            var properties = ImmutableDictionary <string, string> .Empty.Add("myProp", "myVal");

            var flag  = ProjectTreeFlags.Create("MyCustomFlag");
            var model = new ComDependencyModel(
                "myProvider",
                "c:\\myPath.dll",
                "myOriginalItemSpec",
                flags: flag,
                resolved: true,
                isImplicit: true,
                properties: properties);

            Assert.Equal("myProvider", model.ProviderType);
            Assert.Equal("c:\\myPath.dll", model.Path);
            Assert.Equal("myOriginalItemSpec", model.OriginalItemSpec);
            Assert.Equal("myPath", model.Caption);
            Assert.Equal(ResolvedCOMReference.SchemaName, model.SchemaName);
            Assert.True(model.Resolved);
            Assert.True(model.Implicit);
            Assert.Equal(properties, model.Properties);
            Assert.Equal(Dependency.ComNodePriority, model.Priority);
            Assert.Equal(ComReference.PrimaryDataSourceItemType, model.SchemaItemType);
            Assert.Equal(ManagedImageMonikers.ComponentPrivate, model.Icon);
            Assert.Equal(ManagedImageMonikers.ComponentPrivate, model.ExpandedIcon);
            Assert.Equal(ManagedImageMonikers.ComponentWarning, model.UnresolvedIcon);
            Assert.Equal(ManagedImageMonikers.ComponentWarning, model.UnresolvedExpandedIcon);
            Assert.True(model.Flags.Contains(flag));
        }