aboutsummaryrefslogtreecommitdiff
path: root/Aggregator/Tests/DownloadTests.cs
blob: 4f384666b35fee20ce45a167cd6ba40da1e94757 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using System;
using System.Xml;
using System.Xml.Linq;
using System.Collections.Generic;
using Aggregator;
using Xunit;

namespace Aggregator.Tests {
    public class DownloadTests {
        [Fact]
        public void Test_DownloadXMLSync() {
            string xml = Download.DownloadXMLSync("http://feeds.bbci.co.uk/news/rss.xml");
            Assert.True(xml != null);
            Assert.True(xml != " ");
            Assert.True(XDocument.Parse(xml) != null);
        }

        [Fact]
        public async void Test_DownloadXML() {
            string xml = await Download.DownloadXML("http://feeds.bbci.co.uk/news/rss.xml");
            Assert.True(xml != null);
            Assert.True(xml != " ");
            Assert.True(XDocument.Parse(xml) != null);
        }
    }
}