public void GetDependenciesRootIcon() { var project = UnconfiguredProjectFactory.Create(); var factory = new DependenciesViewModelFactory(project); Assert.Equal(KnownMonikers.ReferenceGroup, factory.GetDependenciesRootIcon(maximumDiagnosticLevel: DiagnosticLevel.None)); Assert.Equal(KnownMonikers.ReferenceGroupWarning, factory.GetDependenciesRootIcon(maximumDiagnosticLevel: DiagnosticLevel.Warning)); }
public void GetDependenciesRootIcon() { var project = UnconfiguredProjectFactory.Create(); var factory = new DependenciesViewModelFactory(project); Assert.Equal(ManagedImageMonikers.ReferenceGroup, factory.GetDependenciesRootIcon(hasVisibleUnresolvedDependency: false)); Assert.Equal(ManagedImageMonikers.ReferenceGroupWarning, factory.GetDependenciesRootIcon(hasVisibleUnresolvedDependency: true)); }
public void CreateTargetViewModel_HasUnresolvedDependency() { var project = UnconfiguredProjectFactory.Create(); var targetFramework = new TargetFramework(moniker: "tFm1"); var factory = new DependenciesViewModelFactory(project); var result = factory.CreateTargetViewModel(targetFramework, maximumDiagnosticLevel: DiagnosticLevel.Warning); Assert.NotNull(result); Assert.Equal(targetFramework.FullName, result.Caption); Assert.Equal(KnownMonikers.LibraryWarning, result.Icon); Assert.Equal(KnownMonikers.LibraryWarning, result.ExpandedIcon); Assert.True(result.Flags.Contains(DependencyTreeFlags.TargetNode)); Assert.True(result.Flags.Contains("$TFM:tFm1")); }