Пример #1
0
        public void Should_ThrowException_When_SelectUnkownUpdate()
        {
            UpdateFake update1 = new UpdateFake("update1");
            var        holder  = new WuUpdateHolder();

            holder.SetApplicableUpdates(ToUpdateCollection(update1));
            holder.SelectUpdate("update2");
        }
Пример #2
0
        public void Should_ReturnTrue_When_VerifySelectedUpdate()
        {
            UpdateFake update1 = new UpdateFake("update1");
            var        holder  = new WuUpdateHolder();

            holder.SetApplicableUpdates(ToUpdateCollection(update1));
            Assert.IsFalse(holder.IsSelected("update1"));
            holder.SelectUpdate("update1");
            Assert.IsTrue(holder.IsSelected("update1"));
        }
Пример #3
0
        public void Should_ResetSelectedUpdates_When_AddNewSearchResult()
        {
            Update3Fake update1 = new Update3Fake("update1", true);
            var         holder  = new WuUpdateHolder();

            holder.SetApplicableUpdates(ToUpdateCollection(update1));
            holder.SelectUpdate("update1");
            Assert.IsNotNull(holder.GetSelectedUpdates().Single());
            holder.SetApplicableUpdates(ToUpdateCollection(update1));
            Assert.IsFalse(holder.GetSelectedUpdates().Any());
        }
Пример #4
0
        public void Should_ApplyUpdateSelection_When_UseValidUpdateId()
        {
            UpdateFake update1 = new UpdateFake("update1");
            UpdateFake update2 = new UpdateFake("update2");
            UpdateFake update3 = new UpdateFake("update3");
            var        holder  = new WuUpdateHolder();

            holder.SetApplicableUpdates(ToUpdateCollection(update1, update2, update3));
            holder.SelectUpdate("update2");
            Assert.IsTrue(holder.GetSelectedUpdates().Single() == update2);
            holder.UnselectUpdate("update2");
            Assert.IsFalse(holder.GetSelectedUpdates().Any());
        }
Пример #5
0
        public void Should_ThrowException_When_SelectAndNoApplUpdates()
        {
            var holder = new WuUpdateHolder();

            holder.SelectUpdate("update2");
        }