aboutsummaryrefslogtreecommitdiff
path: root/Aggregator/Tests/ParserServiceTests.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Aggregator/Tests/ParserServiceTests.cs')
-rw-r--r--Aggregator/Tests/ParserServiceTests.cs13
1 files changed, 11 insertions, 2 deletions
diff --git a/Aggregator/Tests/ParserServiceTests.cs b/Aggregator/Tests/ParserServiceTests.cs
index eaa1102..a7654da 100644
--- a/Aggregator/Tests/ParserServiceTests.cs
+++ b/Aggregator/Tests/ParserServiceTests.cs
@@ -1,11 +1,13 @@
using System;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Collections.Generic;
using Aggregator.Parser;
using Aggregator.Classes;
-
using Xunit;
namespace Aggregator.Tests {
- public static class ParserServiceTests {
+ public class ParserServiceTests {
private static Config TestConfig = new Config()
{
Source = "BBC",
@@ -16,5 +18,12 @@ namespace Aggregator.Tests {
PublishDate = 4
};
+ [Fact]
+ public async void Test_Parse() {
+ string xml = await Download.DownloadXML("http://feeds.bbci.co.uk/news/rss.xml");
+ List<Article> articles = ParserService.Parse(xml, TestConfig).ToList();
+ Assert.True(articles != null);
+ Assert.True(articles.Count > 0);
+ }
}
} \ No newline at end of file