Exemple #1
0
        public void SetUp()
        {
            var storage = new InMemorySagaStorage();

            objectDef = storage.RepositoryFor(new SagaTypes
            {
                MessageType = typeof(Message1),
                StateType   = typeof(MySagaState)
            });
        }
Exemple #2
0
        protected override void SetUp()
        {
            _activator = Using(new BuiltinHandlerActivator());

            _sagas = new InMemorySagaStorage();

            _busStarter = Configure.With(_activator)
                          .Transport(t => t.UseInMemoryTransport(new InMemNetwork(), "saga-id-correlation"))
                          .Sagas(s => s.Register(c => _sagas))
                          .Create();
        }
        public void DoesNotEnforceUniquenessAcrossTypes()
        {
            var sagaStorage = new InMemorySagaStorage();

            var recycledId = "recycled-id";

            var instanceOfType1 = new Type1 {
                Id = Guid.NewGuid(), Revision = 0, CorrelationId = recycledId
            };
            var instanceOfType2 = new Type2 {
                Id = Guid.NewGuid(), Revision = 0, CorrelationId = recycledId
            };

            sagaStorage.Insert(instanceOfType1, For(typeof(Type1))).Wait();
            sagaStorage.Insert(instanceOfType2, For(typeof(Type2))).Wait();
        }
Exemple #4
0
 public void SetUp()
 {
     _inMemorySagaStorage   = new InMemorySagaStorage();
     _correlationProperties = new TestSaga().GetCorrelationProperties();
 }