Пример #1
0

        
Пример #2
0
            public void Should_apply_sent_message_event()
            {
                var @event = _source.Flush().OfType <SentMessageEvent>().Single();

                Assert.AreEqual(_userId, @event.UserId);
                Assert.AreEqual(_messageId, @event.MessageId);
                Assert.AreEqual(_message, @event.Message);
                Assert.IsTrue(@event.Sent > _now);
            }
Пример #3
0
        public T Build()
        {
            _source = _aggregate = _eventSourceFactory.Create <T>();

            _source.Hydrate(_events);
            _source.Flush();

            return(_aggregate);
        }
Пример #4
0
 protected override void Event()
 {
     _flushedEvents = _eventSource.Flush().Cast <IEvent>();
 }