Exemplo n.º 1
0
        private async Task DoBetween()
        {
            var enumerable            = connection.RunAsync(testTable.Between("2", "4"));
            List <TestObject> objects = new List <TestObject>();
            var count = 0;

            while (true)
            {
                if (!await enumerable.MoveNext())
                {
                    break;
                }
                objects.Add(enumerable.Current);
                ++count;
            }
            Assert.That(count, Is.EqualTo(2));
            Assert.That(objects, Has.Count.EqualTo(2));

            Assert.That(objects, Has.Exactly(1).EqualTo(new TestObject()
            {
                Id = "2"
            }));
            Assert.That(objects, Has.Exactly(1).EqualTo(new TestObject()
            {
                Id = "3"
            }));
        }