Exemplo n.º 1
0
        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);
        }