public void Feeder_ContainsMethodTest()
        {
            var feeder = new FeedManager();
            var provider = new ProviderMock(new Uri("http://feeds.feedburner.com/TEDTalks_video"), new FillerMock(null));

            feeder.Register(provider);
            bool isContains = feeder.Contains(provider);
            Assert.IsTrue(isContains);
        }
        public void RSSProvider_RequestMethodTest()
        {
            Provider provider = new RSSProvider(new Uri("rss://"), new FillerMock(new ObservableCollection<int>()));
            provider.RequestDelegate = new Action<Provider>(p => { Assert.AreEqual<Provider>(provider, p); });
            Assert.IsTrue(provider.Request());

            var false_provider = new ProviderMock(null, new FillerMock(new ObservableCollection<int>()));
            Assert.IsFalse(false_provider.Request());
        }
Esempio n. 3
0
        public void Provider_RequestMethodTest()
        {
            var filler = new FillerMock(null);
            var provider = new ProviderMock(new Uri("rss://"), filler);
            provider.RequestDelegate = new Action<Provider>(p => { Assert.AreEqual<Provider>(provider, p); });
            Assert.IsTrue(provider.Request());

            var false_provider = new ProviderMock(null, new FillerMock(null));
            Assert.IsFalse(false_provider.Request());
        }
Esempio n. 4
0
 public void Provider_ConstructorTest()
 {
     var provider = new ProviderMock(new Uri("rss://"), new FillerMock(null));
     Assert.IsNotNull(provider);
     Assert.AreEqual<string>(new Uri("rss://").AbsolutePath, provider.Uri.AbsolutePath);
 }