예제 #1
0
        public void GetInstalledPackagesReturnsEmptyCollection()
        {
            // Arrange
            var sut     = new UnsupportedSchemeProcessor();
            var project = TestFixtureHelper.CreateProject(VisualStudioProjectScheme.Unsupported, TestVersion.Low, TestPackage.One, new Dictionary <string, string>());

            // Act
            var installedPackages = sut.GetInstalledPackages(project.FilePath, null);

            // Assert
            Assert.Empty(installedPackages);
        }
예제 #2
0
        public void UpgradePackageCreatesWarning()
        {
            // Arrange
            var sut     = new UnsupportedSchemeProcessor();
            var tracing = new TestTracing();
            var project = TestFixtureHelper.CreateNuGetProject(VisualStudioProjectScheme.Unsupported, TestVersion.Low, TestPackage.One, nugetPackagesToInstall: new Dictionary <string, string>
            {
                { "TestPackage.One", "3.0.0" }
            });

            // Act
            sut.InstallPackages(
                project.Content,
                project.RequestedPackages,
                project.InstalledPackages,
                project.Name,
                tracing);

            // Assert
            Assert.Collection(tracing.DebugEntries,
                              element => Assert.Contains(
                                  "Skipped",
                                  element));
        }