diff options
author | Aryadev Chavali <aryadevchavali1@gmail.com> | 2019-02-02 14:02:52 +0000 |
---|---|---|
committer | Aryadev Chavali <aryadevchavali1@gmail.com> | 2019-02-02 14:02:52 +0000 |
commit | b8597112037c224ca78193f42bc16ecfca363855 (patch) | |
tree | 4f4839417a3820c532ae63bc91433ba628e5026c /Aggregator/Tests | |
parent | 16166952b2aee43939e7d5ea2ffc1b2de4e3018c (diff) | |
download | newsaggregator-b8597112037c224ca78193f42bc16ecfca363855.tar.gz newsaggregator-b8597112037c224ca78193f42bc16ecfca363855.tar.bz2 newsaggregator-b8597112037c224ca78193f42bc16ecfca363855.zip |
Added xml parser to test if valid xml is found
Diffstat (limited to 'Aggregator/Tests')
-rw-r--r-- | Aggregator/Tests/DownloadTests.cs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Aggregator/Tests/DownloadTests.cs b/Aggregator/Tests/DownloadTests.cs index 9a3bbc1..b45adc9 100644 --- a/Aggregator/Tests/DownloadTests.cs +++ b/Aggregator/Tests/DownloadTests.cs @@ -1,4 +1,6 @@ using System; +using System.Xml; +using System.Xml.Linq; using Classes; using Parser; using Xunit; @@ -10,6 +12,7 @@ namespace Tests { 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] @@ -17,6 +20,7 @@ namespace Tests { 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); } } } |