예제 #1
0
        public void SessionValues_CanGetKeys()
        {
            lock (TestOrderingLock.Lock)
            {
                var wa = new WebApplicationEngine();

                var checks  = new Dictionary <string, byte[]>();
                var session = CreateSessionMock(checks);

                var oscriptSession = new SessionImpl(session);
                oscriptSession.SetString("user", "EvilBeaver");
                oscriptSession.SetString("password", "1");

                var arr = oscriptSession.GetKeys();
                Assert.Equal(2, arr.Count());
                Assert.NotEqual(arr.Find(ValueFactory.Create("user")), ValueFactory.Create());
                Assert.NotEqual(arr.Find(ValueFactory.Create("password")), ValueFactory.Create());
            }
        }