Ejemplo n.º 1
0
        public void Should_be_able_to_get_the_updates_file_size_from_the_update()
        {
            var reader = new AppcastReader();

            Update update = reader.Read(@"Samples\zunesocialtagger.xml").First();

            Assert.That(update.FileLength, Is.EqualTo(865843));
        }
Ejemplo n.º 2
0
        public void Should_be_able_to_get_the_file_url_from_the_update()
        {
            var reader = new AppcastReader();

            Update update = reader.Read(@"Samples\zunesocialtagger.xml").First();

            Assert.That(update.FileUrl, Is.EqualTo("http://cloud.github.com/downloads/leetreveil/Zune-Social-Tagger/Zune_Social_Tagger_1.2.zip"));
        }
Ejemplo n.º 3
0
        public void Should_be_able_to_get_the_version_no__from_the_update()
        {
            var reader = new AppcastReader();

            Update update = reader.Read(@"Samples\zunesocialtagger.xml").First();

            Assert.That(update.Version, Is.EqualTo(new Version(1,2)));
        }
Ejemplo n.º 4
0
        public void Should_be_able_to_get_the_title_from_the_update()
        {
            var reader = new AppcastReader();

            Update update = reader.Read(@"Samples\zunesocialtagger.xml").First();

            Assert.That(update.Title, Is.EqualTo("Zune Social Tagger"));
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Checks for the latest update and sets the NewUpdate property if one is available
        /// </summary>
        /// <returns></returns>
        public bool CheckForUpdate()
        {
            if (String.IsNullOrEmpty(AppFeedUrl))
                throw new ArgumentException("The AppFeedUrl has not been set");

            List<Update> results = new AppcastReader().Read(AppFeedUrl);

            return GetLatestUpdateFromUpdates(results);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Checks for the latest update and sets the NewUpdate property if one is available
        /// </summary>
        /// <returns></returns>
        public bool CheckForUpdate()
        {
            if (String.IsNullOrEmpty(AppFeedUrl))
            {
                throw new ArgumentException("The AppFeedUrl has not been set");
            }

            List <Update> results = new AppcastReader().Read(AppFeedUrl);

            return(GetLatestUpdateFromUpdates(results));
        }