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()); }
public void testGetNPage() { JDFRunList rlp = (JDFRunList)rl.addPartition(EnumPartIDKey.Run, "r1"); rlp.setPages(new JDFIntegerRangeList("1 3 5 7")); Assert.AreEqual(4, rlp.getNPage()); rlp.setNPage(3); Assert.AreEqual(3, rlp.getNPage()); JDFRunList rlp2 = (JDFRunList)rl.addPartition(EnumPartIDKey.Run, "r2"); rlp2.setPages(new JDFIntegerRangeList("0 2 4 6")); Assert.AreEqual(4, rlp2.getNPage()); rlp2.setNPage(3); Assert.AreEqual(3, rlp2.getNPage()); Assert.AreEqual(6, rl.getNPage()); }