Exemplo n.º 1
0
        public void ResetState()
        {
            _serviceResets.Each(x => {
                trace("Stopping services with {0}", x.GetType().Name);
                x.Stop();
            });

            trace("Clearing persisted state");
            _persistence.ClearPersistedState();

            // Think it's pretty likely that this changes
            trace("Loading initial data");
            _initialState.Load();

            _serviceResets.Each(x => {
                trace("Starting services with {0}", x.GetType().Name);
                x.Start();
            });
        }
        public void reset_wipes_the_slate_clean()
        {
            var repo = theUnitOfWork.Start();

            repo.Update(new User());
            repo.Update(new User());
            repo.Update(new User());
            repo.Update(new OtherEntity());
            repo.Update(new OtherEntity());
            repo.Update(new ThirdEntity());

            theUnitOfWork.Commit();

            theReset.ClearPersistedState();

            repo = theUnitOfWork.Start();

            repo.All <User>().Count().ShouldEqual(0);
            repo.All <OtherEntity>().Count().ShouldEqual(0);
            repo.All <ThirdEntity>().Count().ShouldEqual(0);
        }
Exemplo n.º 3
0
 public void can_access_the_new_store_by_url()
 {
     theReset.ClearPersistedState();
     Process.Start("http://localhost:8080");
     Thread.Sleep(60000);
 }