public void RecentPackagesAreNodesWithVersion()
            {
                var packageBuilder = new StubPackageBuilder();
                packageBuilder.AddPackageDefinitions("PackageA", "0.1.0", "0.2.0-rc1", "1.0.0");
                packageBuilder.AddPackageDefinitions("PackageB", "1.0.1", "1.0.2", "1.0.3-beta");
                var repository = StubPackageRepositoryFactory.Create(packageBuilder);

                var directedGraph = repository.VisualizeUpgradeableDependencies(_targetFramework);

                Assert.Equal(2, directedGraph.Nodes.Length);
                Assert.Equal("PackageA 1.0.0", directedGraph.Nodes[0].Label);
                Assert.Equal("PackageB 1.0.3-beta", directedGraph.Nodes[1].Label);
                Assert.Null(directedGraph.Links);
            }
            public async Task RecentPackagesAreNodesWithVersion()
            {
                var packageBuilder = new StubPackageBuilder();

                packageBuilder.AddPackageDefinitions("PackageA", "0.1.0", "0.2.0-rc1", "1.0.0");
                packageBuilder.AddPackageDefinitions("PackageB", "1.0.1", "1.0.2", "1.0.3-beta");
                var repository = StubSourceRepositoryFactory.Create(packageBuilder);

                var directedGraph = await repository.VisualizeUpgradeableDependenciesAsync(_targetFramework);

                Assert.Equal(2, directedGraph.Nodes.Length);
                Assert.Equal("PackageA 1.0.0", directedGraph.Nodes[0].Label);
                Assert.Equal("PackageB 1.0.3-beta", directedGraph.Nodes[1].Label);
                Assert.Null(directedGraph.Links);
            }
            public void PackagesAreNodesWithVersion()
            {
                var packageBuilder = new StubPackageBuilder();
                packageBuilder.AddPackageDefinition("A", "1.0.0");
                packageBuilder.AddPackageDefinition("B", "2.1.0-beta");
                var packages = packageBuilder.BuildPackages();
                var repository = StubPackageRepositoryFactory.Create(Enumerable.Empty<IPackage>());

                var directedGraph = packages.VisualizeUpgradeableDependencies(repository, _targetFramework);

                Assert.Equal(2, directedGraph.Nodes.Length);
                Assert.Equal("A 1.0.0", directedGraph.Nodes[0].Label);
                Assert.Equal("B 2.1.0-beta", directedGraph.Nodes[1].Label);
                Assert.Null(directedGraph.Links);
            }
Ejemplo n.º 4
0
            public async Task PackagesAreNodesWithVersion()
            {
                var packageBuilder = new StubPackageBuilder();

                packageBuilder.AddPackageDefinition("A", "1.0.0");
                packageBuilder.AddPackageDefinition("B", "2.1.0-beta");
                var packages   = packageBuilder.BuildPackages();
                var repository = StubSourceRepositoryFactory.Create(packages);

                var directedGraph = await packages.VisualizeUpgradeableDependenciesAsync(repository, _targetFramework);

                Assert.Equal(2, directedGraph.Nodes.Length);
                Assert.Equal("A 1.0.0", directedGraph.Nodes[0].Label);
                Assert.Equal("B 2.1.0-beta", directedGraph.Nodes[1].Label);
                Assert.Null(directedGraph.Links);
            }