public void TestBatchEnumerableFiltersItems() { var batchEnumerable = new BatchEnumerable <int, int>( ItemsList.AsQueryable(), i => i, null, i => i < 4, 5 ); Assert.AreEqual(1, batchEnumerable.Count()); Assert.AreEqual(new[] { 1, 2, 3 }, batchEnumerable.First()); }
public void TestBatchEnumerableFiltersItemsWithMultipleCalls() { var batchEnumerable = new BatchEnumerable <int, int>( ItemsList.AsQueryable(), i => i, null, i => i < 4, 5 ); for (var j = 0; j < 4; j++) { Assert.AreEqual(1, batchEnumerable.Count()); Assert.AreEqual(new[] { 1, 2, 3 }, batchEnumerable.First()); } }