public void Implicit()
        {
            var properties = ImmutableStringDictionary <string> .EmptyOrdinal.Add("Version", "2.0.0");

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

            Assert.Equal(SdkRuleHandler.ProviderTypeString, model.ProviderType);
            Assert.Equal("c:\\myPath.dll", model.Path);
            Assert.Equal("myOriginalItemSpec", model.OriginalItemSpec);
            Assert.Equal("c:\\myPath.dll (2.0.0)", model.Caption);
            Assert.Equal(ResolvedSdkReference.SchemaName, model.SchemaName);
            Assert.True(model.Resolved);
            Assert.True(model.Implicit);
            Assert.Equal(properties, model.Properties);
            Assert.Equal(SdkReference.PrimaryDataSourceItemType, model.SchemaItemType);
            Assert.Equal(KnownMonikers.SDKPrivate, model.Icon);
            Assert.Equal(KnownMonikers.SDKPrivate, model.ExpandedIcon);
            Assert.Equal(KnownMonikers.SDKWarning, model.UnresolvedIcon);
            Assert.Equal(KnownMonikers.SDKWarning, model.UnresolvedExpandedIcon);
            Assert.Equal(
                DependencyTreeFlags.SdkDependency +
                DependencyTreeFlags.SupportsFolderBrowse +
                DependencyTreeFlags.ResolvedDependencyFlags -
                DependencyTreeFlags.SupportsRemove,
                model.Flags);
        }
Esempio n. 2
0
        public void Unresolved()
        {
            var properties = ImmutableStringDictionary <string> .EmptyOrdinal.Add("Version", "2.0.0");

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

            Assert.Equal(SdkRuleHandler.ProviderTypeString, model.ProviderType);
            Assert.Equal("c:\\myPath.dll", model.Path);
            Assert.Equal("myOriginalItemSpec", model.OriginalItemSpec);
            Assert.Equal("c:\\myPath.dll (2.0.0)", model.Caption);
            Assert.Equal(SdkReference.SchemaName, model.SchemaName);
            Assert.False(model.Resolved);
            Assert.False(model.Implicit);
            Assert.Equal(properties, model.Properties);
            Assert.Equal(SdkReference.PrimaryDataSourceItemType, model.SchemaItemType);
            Assert.Equal(ManagedImageMonikers.Sdk, model.Icon);
            Assert.Equal(ManagedImageMonikers.Sdk, model.ExpandedIcon);
            Assert.Equal(ManagedImageMonikers.SdkWarning, model.UnresolvedIcon);
            Assert.Equal(ManagedImageMonikers.SdkWarning, model.UnresolvedExpandedIcon);
            Assert.Equal(
                DependencyTreeFlags.SdkDependency +
                DependencyTreeFlags.GenericUnresolvedDependencyFlags,
                model.Flags);
        }