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 virtual void testGetUlinked() { UnLinkFinder uf = new UnLinkFinder(); VElement v = uf.getUnlinkedResources(n); Assert.AreEqual(1, v.Count); Assert.IsTrue(v.Contains(rl)); }
/// /// <summary> * test whether a given node has the corect Types and Type Attribute /// * </summary> /// * <param name="testRoot"> the JDF or JMF to test </param> /// * <param name="bLocal"> if true, only check the root of this, else check children as well /// * </param> /// * <returns> boolean - true if this DeviceCaps TypeExpression fits testRoot/@Type and testRoot/@Types /// * </returns> /// public virtual bool matchesType(JDFNode testRoot, bool bLocal) { VElement v = getMatchingTypeNodeVector(testRoot); if (v == null) { return(false); } if (bLocal) { return(v.Contains(testRoot)); } return(true); }