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 })); }
public async Task GetEventAsync_GetsBySeqNumber() { IEventStoreRecord record = await sut.GetEventAsync(eventStreams[0].Id, 1); record.Should().BeEquivalentTo(expectedStoreRecords[0]); }