Beispiel #1
0
        public void LoadRssFeeds_CorrectInput_ReturnsRssFeed()
        {
            IFileController stubFileController = new Stubs.StubFileController();
            IXmlController  stubXmlController  = new Stubs.StubXmlController();

            _rssController.FileController = stubFileController;
            _rssController.XmlController  = stubXmlController;

            Assert.AreEqual("APO Rss", _rssController.LoadRssFeeds()[0].Title, "Title of the first RssFeed does not match.");
        }
        public void LoadRssFeeds_CorrectInput_ReturnsRssFeed()
        {
            IFileController stubFileController = new Stubs.StubFileController();
            IXmlController stubXmlController = new Stubs.StubXmlController();

            _rssController.FileController = stubFileController;
            _rssController.XmlController = stubXmlController;

            Assert.AreEqual("APO Rss", _rssController.LoadRssFeeds()[0].Title, "Title of the first RssFeed does not match.");
        }
Beispiel #3
0
 public void LoadRssFeeds_WrongInputFile_ThrowsException()
 {
     Stubs.StubFileController stubFileController = new Stubs.StubFileController();
     stubFileController.SimulateFileNotFoundException = true;
     List <RSSLib.Model.RssFeed> lstResult = _rssController.LoadRssFeeds();
 }
 public void LoadRssFeeds_WrongInputFile_ThrowsException()
 {
     Stubs.StubFileController stubFileController = new Stubs.StubFileController();
     stubFileController.SimulateFileNotFoundException = true;
     List<RSSLib.Model.RssFeed> lstResult = _rssController.LoadRssFeeds();
 }