aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAryadev Chavali <aryadevchavali1@gmail.com>2019-02-02 13:59:28 +0000
committerAryadev Chavali <aryadevchavali1@gmail.com>2019-02-02 13:59:28 +0000
commit16166952b2aee43939e7d5ea2ffc1b2de4e3018c (patch)
tree5a3507af455916f574a2d02717aea3c5554d06b9
parentbe6a1f89d2156478de91fb5dc8de612db7a06763 (diff)
downloadnewsaggregator-16166952b2aee43939e7d5ea2ffc1b2de4e3018c.tar.gz
newsaggregator-16166952b2aee43939e7d5ea2ffc1b2de4e3018c.tar.bz2
newsaggregator-16166952b2aee43939e7d5ea2ffc1b2de4e3018c.zip
Added a test for async function, and assertion that it's not an empty string
-rw-r--r--Aggregator/Tests/DownloadTests.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/Aggregator/Tests/DownloadTests.cs b/Aggregator/Tests/DownloadTests.cs
index 2e8528a..9a3bbc1 100644
--- a/Aggregator/Tests/DownloadTests.cs
+++ b/Aggregator/Tests/DownloadTests.cs
@@ -9,7 +9,14 @@ namespace Tests {
public void Test_DownloadXMLSync() {
string xml = Download.DownloadXMLSync("http://feeds.bbci.co.uk/news/rss.xml");
Assert.True(xml != null);
- Console.WriteLine(xml);
+ Assert.True(xml != " ");
+ }
+
+ [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 != " ");
}
}
}