blob: b45adc929a6e75a6894e91dc6fdcda65d56b98c7 (
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 Classes;
using Parser;
using Xunit;
namespace 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);
}
}
}
|