Ejemplo n.º 1
0
        public async Task QueryableTest()
        {
            IQueryable <int> queryableEnumeable = new EnumerableQuery <int>(Enumerable.Range(-100, 200).ToArray()).Where(v => v < 5 && v > 0);
            var task = queryableEnumeable.AsAsync();

            Assert.That(task.IsCompleted, Is.True);

            int before = 1;

            foreach (var value in await task)
            {
                Assert.That(value, Is.EqualTo(before));
                before++;
            }
        }