Esempio n. 1
0
        public async void ShouldErrorWhenAccessRecordsViaExtensionMethodsAfterConsume()
        {
            var result = ResultCursorCreator.CreateResultCursor(1, 3);
            await result.ConsumeAsync();

            await ConsumedException.ThrowsResultConsumedException(async() => await result.SingleAsync());

            await ConsumedException.ThrowsResultConsumedException(async() => await result.ToListAsync());

            await ConsumedException.ThrowsResultConsumedException(async() => await result.ForEachAsync(r => { }));
        }
Esempio n. 2
0
        public async void ShouldErrorWhenAccessRecordsAfterConsume()
        {
            var result = ResultCursorCreator.CreateResultCursor(1, 3);
            await result.ConsumeAsync();

            await ConsumedException.ThrowsResultConsumedException(async() => await result.FetchAsync());

            await ConsumedException.ThrowsResultConsumedException(async() => await result.PeekAsync());

            ConsumedException.ThrowsResultConsumedException(() => result.Current);
        }