public void testGetPageInFile() { JDFRunList rlp = (JDFRunList)rl.addPartition(EnumPartIDKey.Run, "r1"); rlp.setPages(new JDFIntegerRangeList("1 3 5 7")); Assert.AreEqual(1, rlp.getPageInFile(0)); Assert.AreEqual(3, rlp.getPageInFile(1)); Assert.AreEqual(7, rlp.getPageInFile(3)); rlp.setNPage(3); Assert.AreEqual(-1, rlp.getPageInFile(3)); JDFRunList rlp2 = (JDFRunList)rl.addPartition(EnumPartIDKey.Run, "r2"); rlp2.setPages(new JDFIntegerRangeList("0 2 4 6")); Assert.AreEqual(-1, rlp2.getPageInFile(0)); Assert.AreEqual(0, rlp2.getPageInFile(3)); Assert.AreEqual(4, rlp2.getPageInFile(5)); Assert.AreEqual(6, rlp2.getPageInFile(6)); rlp2.setNPage(3); Assert.AreEqual(-1, rlp2.getPageInFile(6)); rlp2.setNPage(4); Assert.AreEqual(6, rlp2.getPageInFile(6)); }