Exemplo n.º 1
0
        public void OneUpdate_MakeCommitDetails_HasVersionLimitData()
        {
            var updates = PackageUpdates.LimitedToMinor(MakePackageForV110())
                          .InList();

            var report = _sut.MakeCommitDetails(updates);

            Assert.That(report, Does.Contain($"There is also a higher version, `foo.bar 2.3.4`, but this was not applied as only `Minor` version changes are allowed."));
        }
Exemplo n.º 2
0
        public void OneUpdateWithDate_MakeCommitDetails_HasVersionLimitDataWithDate()
        {
            var publishedAt = new DateTimeOffset(2018, 2, 20, 11, 32, 45, TimeSpan.Zero);

            var updates = PackageUpdates.LimitedToMinor(publishedAt, MakePackageForV110())
                          .InList();

            var report = _sut.MakeCommitDetails(updates);

            Assert.That(report, Does.Contain($"There is also a higher version, `foo.bar 2.3.4` published at `2018-02-20T11:32:45Z`,"));
            Assert.That(report, Does.Contain(" ago, but this was not applied as only `Minor` version changes are allowed."));
        }