public void SetUpSessionStateUsesSessionStateValueFromRequestingPageIfAvailable() { // Arrange var page = new DisabledSessionWebPage(); var webPageHttpHandler = new WebPageHttpHandler(page, startPage: null); var context = new Mock<HttpContextBase>(MockBehavior.Strict); context.Setup(c => c.SetSessionStateBehavior(SessionStateBehavior.Disabled)).Verifiable(); // Act SessionStateUtil.SetUpSessionState(context.Object, webPageHttpHandler, new ConcurrentDictionary<Type, SessionStateBehavior?>()); // Assert context.Verify(); }
public void SetUpSessionStateUsesSessionStateValueFromRequestingPageIfAvailable() { // Arrange var page = new DisabledSessionWebPage(); var webPageHttpHandler = new WebPageHttpHandler(page, startPage: null); var context = new Mock <HttpContextBase>(MockBehavior.Strict); context.Setup(c => c.SetSessionStateBehavior(SessionStateBehavior.Disabled)).Verifiable(); // Act SessionStateUtil.SetUpSessionState(context.Object, webPageHttpHandler, new ConcurrentDictionary <Type, SessionStateBehavior?>()); // Assert context.Verify(); }