Exemple #1
0
            protected override void Context()
            {
                _unitOfWork = new UnitOfWork(_commandContextProvider.Object, _eventSourceMapper.Object);
                _aggregate  = new AggregateStub(_id);

                _commandContextProvider.Setup(p => p.Get()).Returns(_commandContext);
                _eventSourceMapper.Setup(m => m.Get <AggregateStub, Guid>(BucketSupport.DefaultBucketId, _id.ToString(), int.MaxValue)).Returns(_aggregate);
            }
Exemple #2
0
            protected override void Context()
            {
                _unitOfWork = new UnitOfWork(_commandContextProvider.Object, _eventSourceMapper.Object);
                _aggregate  = new AggregateStub(_id);

                _commandContextProvider.Setup(p => p.Get()).Returns(_commandContext);
                _eventSourceMapper.Setup(m => m.Get <AggregateStub>(_id)).Returns(_aggregate);
            }
Exemple #3
0
            protected override void Context()
            {
                //var eventSourceMapper = new EventSourceMapper(new Mock<IEventSourceFactory>().Object, new Mock<IEventStore>().Object);
                _commandContextProvider.Setup(p => p.Get()).Returns(_commandContext);


                var aggregate = new AggregateStub(id);

                ((IEventSourceBase)aggregate).Flush();
                _eventSourceMapper.Setup(m => m.Get <AggregateStub, Guid>(string.Empty, id.ToString(), 1)).Returns(aggregate);

                aggregate = new AggregateStub(id);
                aggregate.DoSomething("Hi version 2");
                ((IEventSourceBase)aggregate).Flush();
                _aggregate = aggregate;
            }
 protected override void Context()
 {
     _eventSource = _aggregate = new AggregateStub();
 }
 protected override void Context()
 {
     _eventSource = _aggregate = new AggregateStub();
     _events.Add(_eventFactory.Create <SomethingHappenedEvent>(e => {}));
 }
 protected override void Context()
 {
     _eventSource = _aggregate = new AggregateStub();
     _aggregate.DoSomething(_value);
 }
Exemple #7
0
 protected override void Event()
 {
     _returnedAggregate = _unitOfWork.Get <AggregateStub, Guid>(BucketSupport.DefaultBucketId, _id.ToString());
     _returnedAggregate = _unitOfWork.Get <AggregateStub, Guid>(BucketSupport.DefaultBucketId, _id.ToString());
 }
Exemple #8
0
 protected override void Event()
 {
     _returnedAggregate = _unitOfWork.Get <AggregateStub>(_id);
     _returnedAggregate = _unitOfWork.Get <AggregateStub>(_id);
 }