예제 #1
0
        public void SessionValues_CanBeRead()
        {
            var checks  = new Dictionary <string, byte[]>();
            var session = CreateSessionMock(checks);

            var oscriptSession = new SessionImpl(session);

            oscriptSession.SetString("user", "EvilBeaver");
            oscriptSession.SetNumber("num", 1);

            Assert.Equal("EvilBeaver", oscriptSession.GetString("user").AsString());
            Assert.Equal(1m, oscriptSession.GetNumber("num").AsNumber());
        }