public void Check_to_see_if_session_is_open_before_saving()
        {
            object fakeEntity = new object();

             using (Record)
             {
            _session.FlushMode = FlushMode.Commit;
            Expect.Call(_session.IsOpen).Return(true);
            _session.SaveOrUpdate(fakeEntity);
            LastCall.IgnoreArguments();
             }

             using (Playback)
             {
            NHibernateSessionAdapter sessionAdapter =
               new NHibernateSessionAdapter(_session);
            sessionAdapter.Save(fakeEntity);
             }
        }
        public void Attempt_to_open_a_closed_session()
        {
            object fakeEntity = new object();

             using (Record)
             {
            _session.FlushMode = FlushMode.Commit;
            Expect.Call(_session.IsOpen).Return(true);
            _session.SaveOrUpdate(fakeEntity);
            LastCall.IgnoreArguments();
             }

             using (Playback)
             {
            NHibernateSessionAdapter sessionAdapter =
               new NHibernateSessionAdapter(_session);
            sessionAdapter.Save(fakeEntity);
             }
        }