Exemple #1
0
        public static IEventMessage FromRecord(IEventStoreRecord record)
        {
            Type messageType = typeof(EventStoreEventMessage <>).MakeGenericType(record.Event.GetType());

            return((IEventMessage)messageType.GetConstructor(new[] { typeof(IEventStoreRecord) })
                   .Invoke(new object[] { record }));
        }
Exemple #2
0
        public async Task GetEventAsync_GetsBySeqNumber()
        {
            IEventStoreRecord record = await sut.GetEventAsync(eventStreams[0].Id, 1);

            record.Should().BeEquivalentTo(expectedStoreRecords[0]);
        }