Exemplo n.º 1
0
        public void RemoveFeedDeletesCacheItem()
        {
            var cache = new FileStorageDataService();

            cache.Initialize(Path.GetFullPath(_cacheDirectory));
            var feed = new NewsFeed();

            feed.cacheurl = "172.0.0.1.8081.1214057202.df05c3d0bd8748e68f121451084e3e62.xml";
            Assert.IsTrue(cache.FeedExists(feed), "The feed's there, look harder.");

            cache.RemoveFeed(feed);
            Assert.IsFalse(cache.FeedExists(feed), "The cache is still there though you removed it.");
            Assert.IsFalse(File.Exists(_cacheDirectory + @"\172.0.0.1.8081.1214057202.df05c3d0bd8748e68f121451084e3e62.xml"), "The cache file was not removed!");
        }