コード例 #1
0
        public void testPageIteratorSpeed()
        {
            int nMax = 3000;

            for (int i = 0; i < nMax; i++)
            {
                JDFRunList rlp = (JDFRunList)rl.addPartition(EnumPartIDKey.Run, "r" + i);
                rlp.setPages(new JDFIntegerRangeList("1 3 5 7"));
                rlp.setFileURL("FileInfo://Test" + i + ".pdf");
            }
            IEnumerator it = rl.getPageIterator();
            int         n  = 0;

            while (it.MoveNext())
            {
                JDFRunData ri = (JDFRunData)it.Current;
                Assert.AreEqual(n, ri.getRunIndex());
                Assert.AreEqual(n % 4, ((ri.getPageInFile() - 1) / 2) % 4);
                n++;
            }
            Assert.AreEqual(n, 4 * nMax);
        }
コード例 #2
0
 public void testGetFileURL()
 {
     rl.setFileURL("./foo/bar.pdf");
     rl.setDirectory("FileInfo://c/fnarf");
     Assert.AreEqual("FileInfo://c/fnarf/foo/bar.pdf", rl.getFileURL());
 }