Exemple #1
0
        public void RefreshSessionTest()
        {
            PartitionResolver     pr      = new PartitionResolver();
            AspSessionPersistence persist = new AspSessionPersistence();
            AspSessionContents    st      = new AspSessionContents();

            this.CreateSessionState(st);
            var sessionid = persist.GenerateSessionId();

            persist.SaveSession(sessionid, st, 20);
            persist.RefreshSession(sessionid);
            var sessionSaved = persist.LoadSession(sessionid);

            Assert.IsNotNull(sessionSaved);
        }
Exemple #2
0
        public void SaveSessionTest()
        {
            PartitionResolver     pr      = new PartitionResolver();
            AspSessionPersistence persist = new AspSessionPersistence();
            AspSessionContents    st      = new AspSessionContents();

            this.CreateSessionState(st);
            var sessionid = persist.GenerateSessionId();

            persist.SaveSession(sessionid, st, 20);
            var sessionSaved = persist.LoadSession(sessionid);

            foreach (var item in sessionSaved)
            {
                Assert.AreEqual(item.Value, st[item.Key]);
            }
        }