public void throws_exception_if_trying_to_save_empty_id()
        {
            var account = new Account { Id = string.Empty };

            Exception<InvalidOperationException>.ShouldBeThrownBy(() =>
            {
                theSession.Store(account);
            });
        }
        public void persist_and_load()
        {
            var account = new Account{Id = "*****@*****.**"};

            theSession.Store(account);
            theSession.SaveChanges();

            using (var session = theContainer.GetInstance<IDocumentSession>())
            {
                session.Load<Account>("*****@*****.**")
                    .ShouldNotBeNull();

                session.Load<Account>("*****@*****.**")
                    .ShouldBeNull();
            }
        }
        public void persist_and_delete()
        {
            var account = new Account { Id = "*****@*****.**" };

            theSession.Store(account);
            theSession.SaveChanges();

            using (var session = theContainer.GetInstance<IDocumentSession>())
            {
                session.Delete<Account>(account.Id);
                session.SaveChanges();
            }

            using (var session = theContainer.GetInstance<IDocumentSession>())
            {
                session.Load<Account>(account.Id)
                    .ShouldBeNull();
            }
        }