public void Should_delete_the_saga()
        {
            var store = new EmbeddableDocumentStore { RunInMemory = true, DataDirectory = Guid.NewGuid().ToString() };
            store.Initialize();

            var saga = new TestSaga {Id = Guid.NewGuid()};

            var persister = new RavenSagaPersister { Store = store };

            persister.Save(saga);

            Assert.NotNull(persister.Get<TestSaga>(saga.Id));

            persister.Complete(saga);

            Assert.Null(persister.Get<TestSaga>(saga.Id));
        }
예제 #2
0
        public void Should_delete_the_saga()
        {
            var store = new EmbeddableDocumentStore {
                RunInMemory = true, DataDirectory = Guid.NewGuid().ToString()
            };

            store.Initialize();

            var saga = new TestSaga {
                Id = Guid.NewGuid()
            };

            var persister = new RavenSagaPersister {
                Store = store
            };

            persister.Save(saga);

            Assert.NotNull(persister.Get <TestSaga>(saga.Id));

            persister.Complete(saga);

            Assert.Null(persister.Get <TestSaga>(saga.Id));
        }
        public void Setup()
        {
            var store = new EmbeddableDocumentStore { RunInMemory = true, DataDirectory = Guid.NewGuid().ToString() };
            store.Initialize();

            entity = new TestSaga();
            entity.Id = Guid.NewGuid();

            SetupEntity(entity);

            var persister = new RavenSagaPersister { Store = store };

            persister.Save(entity);

            savedEntity = persister.Get<TestSaga>(entity.Id);
        }
예제 #4
0
        public void Setup()
        {
            var store = new EmbeddableDocumentStore {
                RunInMemory = true, DataDirectory = Guid.NewGuid().ToString()
            };

            store.Initialize();

            entity    = new TestSaga();
            entity.Id = Guid.NewGuid();

            SetupEntity(entity);

            var persister = new RavenSagaPersister {
                Store = store
            };

            persister.Save(entity);

            savedEntity = persister.Get <TestSaga>(entity.Id);
        }