コード例 #1
0
            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);
            }
コード例 #2
0
            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);
            }
コード例 #3
0
            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);
            }
コード例 #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);
            }