public void CancelsProperly()
        {
            var actionFilter = new EnumerateQueryableAsyncAttribute();

            var context = CreateActionExecutedContext(new WaitsUntilCancellationDbAsyncEnumerator <Dummy>(1000, _fixtures.GetEnumerator()));

            var cts = new CancellationTokenSource();

            cts.CancelAfter(300);

            Func <Task> action = async() =>
            {
                await actionFilter.OnActionExecutedAsync(context, cts.Token);
            };

            action.ShouldThrow <TaskCanceledException>();
        }
        public async Task ResolvesQueryable()
        {
            var actionFilter = new EnumerateQueryableAsyncAttribute();

            var context = CreateActionExecutedContext(new TestDbAsyncEnumerator <Dummy>(_fixtures.GetEnumerator()));

            await actionFilter.OnActionExecutedAsync(context, new CancellationToken());

            var objectContent = context.Response.Content as ObjectContent;

            objectContent.Should().NotBeNull();

            var array = objectContent.Value as Dummy[];

            array.Should().NotBeNull();
            array.Length.Should().Be(3);
            array[0].Id.Should().Be("1");
            array[1].Id.Should().Be("2");
            array[2].Id.Should().Be("3");
        }