Пример #1
0
        public void SetTheEnvironenmentToTheSessionStateIfNotNull()
        {
            Isolate.WhenCalled(() => _sessionState[SessionStateManager.EnvironmentSetting]).WillReturn("Test");

            SessionStateManager.SetEnvironment("Test", _sessionState);

            Isolate.Verify.WasCalledWithAnyArguments(() => _sessionState[SessionStateManager.EnvironmentSetting] = null);
            Assert.AreEqual("Test", SessionStateManager.GetEnvironment(_sessionState));
        }
Пример #2
0
 public void GetTheDefaultTestGenFormEnvironmentIfNoEnvironmentInSessionState()
 {
     Assert.AreEqual("TestGenForm", SessionStateManager.GetEnvironment(_sessionState));
 }
Пример #3
0
        public void GetTheEnvironmentFromTheSessionStateIfSet()
        {
            Isolate.WhenCalled(() => _sessionState[SessionStateManager.EnvironmentSetting]).WillReturn("Test");

            Assert.AreEqual("Test", SessionStateManager.GetEnvironment(_sessionState));
        }