コード例 #1
0
        public void TestSetPaddingWithNoIterationAfterReset()
        {
            var en = new BatchEnumerator <int, int>(
                Items.AsQueryable(),
                q => q,
                null,
                null,
                5
                );

            en.MoveNext();
            en.Reset();
            en.Padding = 6;
            Assert.AreEqual(6, en.Padding);
        }
コード例 #2
0
        public void TestResetResetsPage()
        {
            var en = new BatchEnumerator <int, int>(
                Items.AsQueryable(),
                q => q,
                null,
                null,
                5
                );

            Assert.True(en.MoveNext());
            Assert.True(en.MoveNext());
            Assert.AreEqual(2, en.BatchNumber);
            en.Reset();
            Assert.AreEqual(0, en.BatchNumber);
        }