public void addadminmenu_should_cache_html() { // Arrange CacheMock cache = new CacheMock(); SiteCache siteCache = new SiteCache(cache); // Act siteCache.AddAdminMenu("some html"); // Assert Assert.That(cache.Count(), Is.EqualTo(1)); IEnumerable <string> keys = cache.Select(x => x.Key); Assert.That(keys, Contains.Item(CacheKeys.AdminMenuKey())); }
public void AddAdminMenu_Should_Cache_Html() { // Arrange CacheMock cache = new CacheMock(); ApplicationSettings settings = new ApplicationSettings(); SiteCache siteCache = new SiteCache(settings, cache); // Act siteCache.AddAdminMenu("some html"); // Assert Assert.That(cache.Count(), Is.EqualTo(1)); IEnumerable <string> keys = cache.Select(x => x.Key); Assert.That(keys, Contains.Item(CacheKeys.AdminMenuKey())); }