diff options
author | Aryadev Chavali <aryadevchavali1@gmail.com> | 2019-02-02 13:59:28 +0000 |
---|---|---|
committer | Aryadev Chavali <aryadevchavali1@gmail.com> | 2019-02-02 13:59:28 +0000 |
commit | 16166952b2aee43939e7d5ea2ffc1b2de4e3018c (patch) | |
tree | 5a3507af455916f574a2d02717aea3c5554d06b9 /Aggregator | |
parent | be6a1f89d2156478de91fb5dc8de612db7a06763 (diff) | |
download | newsaggregator-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
Diffstat (limited to 'Aggregator')
-rw-r--r-- | Aggregator/Tests/DownloadTests.cs | 9 |
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 != " "); } } } |