Exemple #1
0
        public void GetCookieTest()
        {
            // Arrange
            var ctx = MockRepository.GenerateMock <IStormContext>();

            ctx.Stub(x => x.GetCookie("jalle")).IgnoreArguments().Return(new HttpCookie("jalle"));

            StormContext.SetInstance(ctx);

            // Act
            var cookie = StormContext.GetCookie("jalle");

            // Assert
            Assert.AreEqual("jalle", cookie.Name);
        }