public override void Setup()
        {
            base.Setup();

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

            SetupEntity(entity);

            WithASagaPersistenceUnitOfWork(p => p.Save(entity));

            WithASagaPersistenceUnitOfWork(p => savedEntity = p.Get<TestSaga>(entity.Id));
        }
        public override void Setup()
        {
            base.Setup();

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

            SetupEntity(entity);

            WithASagaPersistenceUnitOfWork(p => p.Save(entity));
            
            WithASagaPersistenceUnitOfWork(p => savedEntity = p.Get<TestSaga>(entity.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);
        }
        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));
        }
예제 #5
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);
        }
예제 #6
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 override void SetupEntity(TestSaga saga)
 {
     entity.Status = StatusEnum.AnotherStatus;
 }
 public override void SetupEntity(TestSaga saga)
 {
     entity.TestComponent = new TestComponent {
         Property = "Prop"
     };
 }
 public override void SetupEntity(TestSaga saga)
 {
     entity.RelatedClass = new RelatedClass { ParentSaga = entity };
 }
예제 #10
0
 public override void SetupEntity(TestSaga saga)
 {
     entity.RelatedClass = new RelatedClass {
         ParentSaga = entity
     };
 }
 public override void SetupEntity(TestSaga saga)
 {
     entity.TestComponent = new TestComponent { Property = "Prop" };
 }
예제 #12
0
 public override void SetupEntity(TestSaga saga)
 {
     entity.Status = StatusEnum.AnotherStatus;
 }
 public override void SetupEntity(TestSaga saga)
 {
     entity.PolymorpicRelatedProperty = new PolymorpicProperty {SomeInt = 9};
 }
 public override void SetupEntity(TestSaga saga)
 {
     entity.PolymorpicRelatedProperty = new PolymorpicProperty {
         SomeInt = 9
     };
 }
 public override void SetupEntity(TestSaga saga)
 {
     saga.DateTimeProperty = DateTime.Parse("12/02/2010 12:00:00.01");
 }
예제 #16
0
 public abstract void SetupEntity(TestSaga saga);
 public abstract void SetupEntity(TestSaga saga);
예제 #18
0
 public override void SetupEntity(TestSaga saga)
 {
     saga.DateTimeProperty = DateTime.Parse("12/02/2010 12:00:00.01");
 }