protected override void Context() { _eventSource = _aggregate = new AggregateStub(); _aggregate.DoSomething(_value); }
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; }