public void OnDisableShould_SaveSessionStateKeys() { string ipAddressKey = m_Manager.GetPrivateIpAddressKey(0); string ipAddressVal = "123.1.2.3"; m_Manager.Initialize(m_Settings); m_Manager.GlobalProfileVariables.Clear(); m_Manager.GlobalProfileVariables.Add(ipAddressKey, ipAddressVal); m_Manager.OnDisable(); m_Manager.GlobalProfileVariables.Clear(); m_Manager.LoadSessionStateKeys(); Assert.AreEqual(1, m_Manager.GlobalProfileVariables.Count); Assert.IsTrue(m_Manager.GlobalProfileVariables.ContainsKey(ipAddressKey)); Assert.AreEqual(ipAddressVal, m_Manager.GlobalProfileVariables[ipAddressKey]); HostingServicesManager.EraseSessionStateKeys(); }