Beispiel #1
0
        public void OneUpdateWithMajorVersionChange()
        {
            var updates = PackageUpdates.ForNewVersion(new PackageIdentity("foo.bar", new NuGetVersion("2.1.1")), MakePackageForV110())
                          .InList();

            var report = CommitWording.MakeCommitDetails(updates);

            Assert.That(report, Does.StartWith("NuKeeper has generated a major update of `foo.bar` to `2.1.1` from `1.1.0"));
        }
Beispiel #2
0
        public void OneUpdateWithPatchVersionChange()
        {
            var updates = PackageUpdates.ForNewVersion(new PackageIdentity("foo.bar", new NuGetVersion("1.1.9")), MakePackageForV110())
                          .InList();

            var report = _sut.MakeCommitDetails(updates);

            Assert.That(report, Does.StartWith("NuKeeper has generated a patch update of `foo.bar` to `1.1.9` from `1.1.0"));
        }
        public void TwoUpdateSets()
        {
            var packageTwo = new PackageIdentity("packageTwo", new NuGetVersion("3.4.5"));

            var updates = new List <PackageUpdateSet>
            {
                PackageUpdates.ForNewVersion(new PackageIdentity("foo.bar", new NuGetVersion("2.1.1")), MakePackageForV110()),
                PackageUpdates.ForNewVersion(packageTwo, MakePackageForV110("packageTwo"))
            };

            var report = CommitWording.MakeCommitDetails(updates);

            Assert.That(report, Does.StartWith("2 packages were updated: `foo.bar`, `packageTwo`"));
            Assert.That(report, Does.Contain("NuKeeper has generated a major update of `foo.bar` to `2.1.1` from `1.1.0`"));
            Assert.That(report, Does.Contain("NuKeeper has generated a major update of `packageTwo` to `3.4.5` from `1.1.0`"));
        }