public void RemoveFromCacheNotThere()
        {
            HttpSessionStateBase session = mocks.HtmlHelper.ViewContext.HttpContext.Session;

            session.ClearFromSession("key1");
            Assert.IsNull(session.GetObjectFromSession <Claim>(Surface, "key1"));
        }
        public void RemoveValueFromCache()
        {
            HttpSessionStateBase session = mocks.HtmlHelper.ViewContext.HttpContext.Session;

            session.AddValueToSession("key1", 1);
            Assert.AreEqual(1, session.GetValueFromSession <int>("key1"));
            session.ClearFromSession("key1");
            Assert.IsNull(session.GetValueFromSession <int>("key1"));
        }
        public void RemoveObjectFromCache()
        {
            HttpSessionStateBase session = mocks.HtmlHelper.ViewContext.HttpContext.Session;
            Claim claim = NakedObjectsFramework.Persistor.Instances <Claim>().First();

            session.AddObjectToSession(Surface, "key1", claim);
            Assert.AreSame(claim, session.GetObjectFromSession <Claim>(Surface, "key1"));
            session.ClearFromSession("key1");
            Assert.IsNull(session.GetObjectFromSession <Claim>(Surface, "key1"));
        }