public void testGetPageLeaves() { JDFRunList rlp = (JDFRunList)rl.addPartition(EnumPartIDKey.Run, "r1"); JDFRunList rlp2 = (JDFRunList)rl.addPartition(EnumPartIDKey.Run, "r2"); VElement v = rl.getPageLeaves(); Assert.IsTrue(v.Contains(rlp)); Assert.IsTrue(v.Contains(rlp2)); Assert.AreEqual(2, v.Count); JDFRunList rlp21 = (JDFRunList)rlp2.addPartition(EnumPartIDKey.RunSet, "s1"); JDFRunList rlp22 = (JDFRunList)rlp2.addPartition(EnumPartIDKey.RunSet, "s2"); v = rl.getPageLeaves(); Assert.IsTrue(v.Contains(rlp)); Assert.IsFalse(v.Contains(rlp2)); Assert.IsTrue(v.Contains(rlp21)); Assert.IsTrue(v.Contains(rlp22)); Assert.AreEqual(3, v.Count); rlp21.setIsPage(false); rlp22.setIsPage(false); v = rl.getPageLeaves(); Assert.IsTrue(v.Contains(rlp)); Assert.IsTrue(v.Contains(rlp2)); Assert.AreEqual(2, v.Count); v = rlp2.getPageLeaves(); Assert.IsTrue(v.Contains(rlp2)); Assert.AreEqual(1, v.Count); }
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()); }