From b8597112037c224ca78193f42bc16ecfca363855 Mon Sep 17 00:00:00 2001
From: Aryadev Chavali <aryadevchavali1@gmail.com>
Date: Sat, 2 Feb 2019 14:02:52 +0000
Subject: Added xml parser to test if valid xml is found

---
 Aggregator/Tests/DownloadTests.cs | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'Aggregator')

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);
         }
     }
 }
-- 
cgit v1.2.3-13-gbd6f