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)); }
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)); }
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 }; }
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"); }
public abstract void SetupEntity(TestSaga saga);