Exemplo n.º 1
0
        public void testCollapseNPage()
        {
            JDFRunList rl1 = rl.addPDF("file:///file1.pdf", 0, 2);
            JDFRunList rl2 = rl.addPDF("file:///file2.pdf", 1, 3);

            Assert.AreEqual(6, rl.getNPage());
            Assert.AreEqual(3, rl1.getNPage());
            Assert.AreEqual(3, rl2.getNPage());

            rl.collapse(false);
            Assert.AreEqual(6, rl.getNPage());
            Assert.AreEqual(3, rl1.getNPage());
            Assert.AreEqual(3, rl2.getNPage());
            JDFRunList rl3 = rl.addPDF("file:///file3.pdf", 1, 3);

            Assert.AreEqual(9, rl.getNPage());
            rl.expand(false);
            Assert.AreEqual(9, rl.getNPage());
            Assert.AreEqual(3, rl1.getNPage());
            Assert.AreEqual(3, rl2.getNPage());
            rl.collapse(false);
            Assert.AreEqual(9, rl.getNPage());
            Assert.AreEqual(3, rl1.getNPage());
            Assert.AreEqual(3, rl2.getNPage());
            Assert.AreEqual(3, rl3.getNPage());
        }