public void CantCommitAfterCanceling() { var sf = MockRepository.GenerateStub<ISessionFactory>(); var cc = MockRepository.GenerateStub<INhConversationContext>(); var c = new NhConversation(sf, cc); c.Cancel(); Assert.Throws<InvalidOperationException>(() => c.Commit()); }