public void SetUp()
        {
            theHttpContext = MockRepository.GenerateMock<HttpContextBase>();
            theHttpSession = new StubSession();
            theHttpContext.Stub(x => x.Session).Return(theHttpSession);

            theSessionState = new SimpleSessionState(theHttpContext);
        }
Beispiel #2
0
        public void SetUp()
        {
            theHttpContext = MockRepository.GenerateMock <HttpContextBase>();
            theHttpSession = new StubSession();
            theHttpContext.Stub(x => x.Session).Return(theHttpSession);

            theSessionState = new SimpleSessionState(theHttpContext);
        }
 public static HttpContextBase Get()
 {
     var httpContextStub = new Mock<HttpContextBase>();
     if (sessionStub == null)
     {
         sessionStub = new StubSession();
     }
     httpContextStub.SetupGet(m => m.Session).Returns(sessionStub);
     return httpContextStub.Object;
 }
Beispiel #4
0
        public static HttpContextBase Get()
        {
            var httpContextStub = new Mock <HttpContextBase>();

            if (sessionStub == null)
            {
                sessionStub = new StubSession();
            }
            httpContextStub.SetupGet(m => m.Session).Returns(sessionStub);
            return(httpContextStub.Object);
        }
 public void CleanReferenceBooks()
 {
     SessionStub = null;
 }
 public void CleanReferenceBooks()
 {
     sessionStub = null;
 }