Пример #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);
        }