예제 #1
0
        public void OpenSessions()
        {
            if (!IsRavenDbStepOrFeature)
            {
                return;
            }

            RavenDb.OpenSession();
            RavenDb.OpenStorageSession();
            _log.Debug(m => m("Raven db session opened, id={0}", GetCurrentSessionId()));
        }
예제 #2
0
        public void CloseSessions()
        {
            if (!RavenDb.HasCurrentSession)
            {
                return;
            }

            if (ScenarioContext.Current.TestError == null)
            {
                RavenDb.CurrentStorageSession.SubmitChanges();
                _log.Debug(m => m("All changes saved to raven db, id={0}", GetCurrentSessionId()));
            }

            var id = GetCurrentSessionId();

            RavenDb.DisposeSessions();
            _log.Debug(m => m("Raven Db session closed, id={0}", id));
        }
예제 #3
0
 public void DisposeRavenDb()
 {
     RavenDb.DisposeSessions();
     RavenDb.DisposeStorage();
     _log.Debug(m => m("Document store disposed"));
 }
예제 #4
0
 public void CreateRavenDb()
 {
     RavenDb.InitializeStorage();
 }