From 16166952b2aee43939e7d5ea2ffc1b2de4e3018c Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sat, 2 Feb 2019 13:59:28 +0000 Subject: Added a test for async function, and assertion that it's not an empty string --- Aggregator/Tests/DownloadTests.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Aggregator') 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 != " "); } } } -- cgit v1.2.3-13-gbd6f