示例#1
0
        public void Releases_ShouldBeEmpty_WhenCategories_AreEmpty()
        {
            var categories = new CategoryContract[0];
            var releases   = new Update.Releases.Releases(categories, new Version(), "");

            releases.Should().HaveCount(0);
        }
示例#2
0
        public void Releases_ShouldImplement_IEnumerable()
        {
            var categories = new CategoryContract[0];
            var releases   = new Update.Releases.Releases(categories, new Version(), "");

            releases.Should().BeAssignableTo <IEnumerable <Release> >();
        }
示例#3
0
        public void Releases_ShouldContain_AllReleases_FromCategories()
        {
            var json       = File.ReadAllText(@"TestData\win-update.json");
            var categories = JsonConvert.DeserializeObject <CategoriesContract>(json);
            var releases   = new Update.Releases.Releases(categories.Categories, new Version(), "");

            releases.Should().HaveCount(5);
        }
示例#4
0
        public void Releases_ShouldBeEmpty_WhenCategories_HaveNoReleases()
        {
            var categories = new[] { new CategoryContract {
                                         Name = "Stable"
                                     } };
            var releases = new Update.Releases.Releases(categories, new Version(), "");

            releases.Should().HaveCount(0);
        }