public void ReadsTheAppendedEvents(string streamName, int version) { var sut = new InMemoryEventStorage(); var expectedEvents = CreateManyUntypedEventEnvelopes(10); sut.AppendEvents(streamName, version, expectedEvents); var actualEvents = sut.ReadEvents(streamName).Result; Assert.Equal(expectedEvents, actualEvents); }
public void DoesNotThrowStreamNotFoundException(string writeStreamName, string readStreamName) { var sut = new InMemoryEventStorage(); var expectedEvents = CreateManyUntypedEventEnvelopes(10); sut.AppendEvents(writeStreamName , 1 , expectedEvents); var actualEvents = sut.ReadEvents(readStreamName).Result; Assert.Equal(expectedEvents, actualEvents); // Assert.ThrowsAsync<InMemoryEventStorage.StreamNotFoundException>(() => // sut.ReadEvents(readStreamName)); }