public ReadStreamTheory(
     string streamId,
     int start,
     ReadDirection direction,
     int pageSize,
     StreamEventsPage expectedStreamEventsPage)
 {
     StreamId = streamId;
     Start = start;
     Direction = direction;
     PageSize = pageSize;
     ExpectedStreamEventsPage = expectedStreamEventsPage;
 }
        private Task<StreamEventsPage> ReadSteamBackwards(string streamId, int start, int count)
        {
            var connection = _getConnection();

            var results = connection.Table<SqliteEvent>()
                .Where(e => e.StreamId == streamId)
                .OrderByDescending(e => e.SequenceNumber)
                .Skip(start)
                .Take(count)
                // Must enumerate the results before selecting a StreamEvent else activation
                // exception from Sqlite.Net trying create a StreamEvent. Comment out the 
                // line below if you want to see the test(s) fail.
                .ToArray()
                .Select(@event => @event.ToStreamEvent())
                .ToArray();

            var streamEventsPage = new StreamEventsPage(
                streamId: streamId,
                status: PageReadStatus.Success,
                fromStreamVersion: start,
                nextStreamVersion: results[0].StreamVersion - 1,
                lastStreamVersion: results[0].StreamVersion,
                direction: ReadDirection.Backward,
                isEndOfStream: true,
                events: results);

            return Task.FromResult(streamEventsPage);
        }