Exemple #1
0
        public void addloggedinmenu_should_cache_html()
        {
            // Arrange
            CacheMock cache     = new CacheMock();
            SiteCache siteCache = new SiteCache(cache);

            // Act
            siteCache.AddLoggedInMenu("some html");

            // Assert
            Assert.That(cache.Count(), Is.EqualTo(1));
            IEnumerable <string> keys = cache.Select(x => x.Key);

            Assert.That(keys, Contains.Item(CacheKeys.LoggedInMenuKey()));
        }
Exemple #2
0
        public void AddLoggedInMenu_Should_Cache_Html()
        {
            // Arrange
            CacheMock           cache     = new CacheMock();
            ApplicationSettings settings  = new ApplicationSettings();
            SiteCache           siteCache = new SiteCache(settings, cache);

            // Act
            siteCache.AddLoggedInMenu("some html");

            // Assert
            Assert.That(cache.Count(), Is.EqualTo(1));
            IEnumerable <string> keys = cache.Select(x => x.Key);

            Assert.That(keys, Contains.Item(CacheKeys.LoggedInMenuKey()));
        }