aboutsummaryrefslogtreecommitdiff
path: root/Aggregator/Tests/DownloadTests.cs
diff options
context:
space:
mode:
authorAryadev Chavali <aryadevchavali1@gmail.com>2019-02-02 14:02:52 +0000
committerAryadev Chavali <aryadevchavali1@gmail.com>2019-02-02 14:02:52 +0000
commitb8597112037c224ca78193f42bc16ecfca363855 (patch)
tree4f4839417a3820c532ae63bc91433ba628e5026c /Aggregator/Tests/DownloadTests.cs
parent16166952b2aee43939e7d5ea2ffc1b2de4e3018c (diff)
downloadnewsaggregator-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/DownloadTests.cs')
-rw-r--r--Aggregator/Tests/DownloadTests.cs4
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);
}
}
}