示例#1
0
        public void testPageIterator()
        {
            JDFRunList rlp = (JDFRunList)rl.addPartition(EnumPartIDKey.Run, "r1");

            rlp.setPages(new JDFIntegerRangeList("1 3 5 7"));
            rlp.setNPage(3);
            JDFRunList rlp2 = (JDFRunList)rl.addPartition(EnumPartIDKey.Run, "r2");

            rlp2.setPages(new JDFIntegerRangeList("0 2 4 6"));
            IEnumerator it = rl.getPageIterator();
            int         n  = 0;

            while (it.MoveNext())
            {
                JDFRunData ri = (JDFRunData)it.Current;
                Assert.AreEqual(ri.getRunIndex(), n);
                Assert.AreEqual(ri.getRunList(), n < 3 ? rlp : rlp2);
                n++;
            }
            Assert.AreEqual(7, n);
        }