public void SetAsActiveConversation_GivenANullConversation_ThrowsArgumentNullException() { var conversationManager = new NHibernateConversationManager(validsessionFactoryManager); Assert.Throws<ArgumentNullException>(() =>conversationManager.SetAsActiveConversation(null)); }
public void SetAsActiveConversation_GivenAConversation_SetsItAsActive() { var conversationManager = new NHibernateConversationManager(validsessionFactoryManager); var conversation1 = conversationManager.BeginConversation(); var conversation2 = conversationManager.BeginConversation(); conversationManager.SetAsActiveConversation(conversation1); Assert.IsTrue(conversation1.IsActive); Assert.IsFalse(conversation2.IsActive); }