示例#1
0
        public void GetsLatestReleaseCorrectly()
        {
            // Arrange
            var sut = new GithubApi();

            // Act
            var githubRelease = sut.GetLatestRelease(new GithubRef("#/ckan/github/KSP-CKAN/Test", false, false));

            // Assert
            Assert.IsNotNull(githubRelease.Author);
            Assert.IsNotNull(githubRelease.Download);
            Assert.IsNotNull(githubRelease.Version);
        }
示例#2
0
        public void GetsLatestReleaseCorrectly()
        {
            // Arrange
            var sut = new GithubApi(new CachingHttpService(_cache));

            // Act
            var githubRelease = sut.GetLatestRelease(new GithubRef("#/ckan/github/KSP-CKAN/Test", false, false));

            // Assert
            Assert.IsNotNull(githubRelease.Author);
            Assert.IsNotNull(githubRelease.Tag);
            Assert.IsNotNull(githubRelease.Assets.FirstOrDefault());
            Assert.IsNotNull(githubRelease.Assets.FirstOrDefault()?.Download);
        }