コード例 #1
0
            public void ReturnsConstructorParameter()
            {
                var package        = StubPackageFactory.CreatePackage("A", "1.0.0");
                var packageUpgrade = new PackageUpgrade(null, PackageUpgradeAction.None, package);

                Assert.Equal(package, packageUpgrade.Package);
            }
コード例 #2
0
            public void ReturnsConstructorParameter()
            {
                var packageDependency = StubPackageDependencyFactory.CreateExact("A", "1.0.0");
                var packageUpgrade    = new PackageUpgrade(packageDependency, PackageUpgradeAction.None, null);

                Assert.Same(packageDependency, packageUpgrade.PackageDependency);
            }
コード例 #3
0
            public void ConsistsOfPackageDependencyAndAction()
            {
                PackageUpgrade packageUpgrade;

                var packageDependency = StubPackageDependencyFactory.CreateExact("A", "1.0.0");
                var package = StubPackageFactory.CreatePackage("A", "1.2.0");
                packageUpgrade = new PackageUpgrade(packageDependency, PackageUpgradeAction.MinVersion, package);
                Assert.Equal("A (= 1.0.0) MinVersion -> A 1.2.0", packageUpgrade.ToString());

                packageDependency = StubPackageDependencyFactory.Create("B", "1.0.0", "2.0.0");
                package = StubPackageFactory.CreatePackage("B", "2.1.0-beta2");
                packageUpgrade = new PackageUpgrade(packageDependency, PackageUpgradeAction.ReleaseToPrerelease, package);
                Assert.Equal("B (≥ 1.0.0 && < 2.0.0) ReleaseToPrerelease -> B 2.1.0-beta2", packageUpgrade.ToString());
            }
コード例 #4
0
            public void ConsistsOfPackageDependencyAndAction()
            {
                PackageUpgrade packageUpgrade;

                var packageDependency = StubPackageDependencyFactory.CreateExact("A", "1.0.0");
                var package           = StubPackageFactory.CreatePackage("A", "1.2.0");

                packageUpgrade = new PackageUpgrade(packageDependency, PackageUpgradeAction.MinVersion, package);
                Assert.Equal("A [1.0.0, 1.0.0] MinVersion -> A 1.2.0", packageUpgrade.ToString());

                packageDependency = StubPackageDependencyFactory.Create("B", "1.0.0", "2.0.0");
                package           = StubPackageFactory.CreatePackage("B", "2.1.0-beta2");
                packageUpgrade    = new PackageUpgrade(packageDependency, PackageUpgradeAction.ReleaseToPrerelease, package);
                Assert.Equal("B [1.0.0, 2.0.0) ReleaseToPrerelease -> B 2.1.0-beta2", packageUpgrade.ToString());
            }
コード例 #5
0
 public void ReturnsConstructorParameter()
 {
     var package = StubPackageFactory.CreatePackage("A", "1.0.0");
     var packageUpgrade = new PackageUpgrade(null, PackageUpgradeAction.None, package);
     Assert.Equal(package, packageUpgrade.Package);
 }
コード例 #6
0
 public void ReturnsConstructorParameter()
 {
     var packageUpgrade = new PackageUpgrade(null, PackageUpgradeAction.PrereleaseToRelease, null);
     Assert.Equal(PackageUpgradeAction.PrereleaseToRelease, packageUpgrade.Action);
 }
コード例 #7
0
 public void ReturnsConstructorParameter()
 {
     var packageDependency = StubPackageDependencyFactory.CreateExact("A", "1.0.0");
     var packageUpgrade = new PackageUpgrade(packageDependency, PackageUpgradeAction.None, null);
     Assert.Same(packageDependency, packageUpgrade.PackageDependency);
 }
コード例 #8
0
            public void ReturnsConstructorParameter()
            {
                var packageUpgrade = new PackageUpgrade(null, PackageUpgradeAction.PrereleaseToRelease, null);

                Assert.Equal(PackageUpgradeAction.PrereleaseToRelease, packageUpgrade.Action);
            }