blob: cb0e307cb69d7656258a417e6b9e01fb6641d51f (
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.Parser;
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);
}
}
}
|