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

            RavenDb.OpenSession();
            RavenDb.OpenStorageSession();
            _log.Debug(m => m("Raven db session opened, id={0}", GetCurrentSessionId()));
        }
Example #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));
        }
Example #3
0
 public void DisposeRavenDb()
 {
     RavenDb.DisposeSessions();
     RavenDb.DisposeStorage();
     _log.Debug(m => m("Document store disposed"));
 }
Example #4
0
 public void CreateRavenDb()
 {
     RavenDb.InitializeStorage();
 }