コード例 #1
0
        public void when_retrieving_latest_version_then_succeeds()
        {
            var task = new GetLatestVersion
            {
                BuildEngine       = engine,
                IncludePreRelease = true,
                PackageId         = "xunit"
            };

            Assert.True(task.Execute());

            Assert.NotEqual("0.0.0", task.PackageVersion);
        }
コード例 #2
0
        public void when_retrieving_latest_version_for_non_existent_package_then_returns_zero()
        {
            var task = new GetLatestVersion
            {
                BuildEngine       = engine,
                IncludePreRelease = true,
                PackageId         = Guid.NewGuid().ToString()
            };

            Assert.True(task.Execute());

            Assert.Equal("0.0.0", task.PackageVersion);
            Assert.Equal("0.0.0", task.SimpleVersion);
            Assert.Equal(0, task.Major);
            Assert.Equal(0, task.Minor);
            Assert.Equal(0, task.Patch);
        }