public void StoreSessionValueIsStored()
        {
            FileBasedSessionCache cache = new FileBasedSessionCache();

            cache.StoreLocation = cacheLocation;
            string sessionToken = cache.AddToCache("johndoe");
            string key          = "An item";
            object value        = Guid.NewGuid();

            cache.StoreSessionValue(sessionToken, key, value);
            object result = cache.RetrieveSessionValue(sessionToken, key);

            Assert.AreEqual(value, result);
        }
        public void InitialiseWithSessions()
        {
            // Generate a cache
            FileBasedSessionCache cache = new FileBasedSessionCache();

            cache.StoreLocation = cacheLocation;
            cache.Initialise();
            string sessionToken = cache.AddToCache("johndoe");
            string key          = "An item";
            object value        = Guid.NewGuid();

            cache.StoreSessionValue(sessionToken, key, value);

            // Reload it
            cache = new FileBasedSessionCache();
            cache.StoreLocation = cacheLocation;
            cache.Initialise();
            object result = cache.RetrieveSessionValue(sessionToken, key);

            Assert.AreEqual(value.ToString(), result);
        }