示例#1
0
        public virtual void testGetMatchingTypeNodeVector()
        {
            JDFDoc  d = new JDFDoc("JDF");
            JDFNode n = d.getJDFRoot();

            n.setType("bar", false);
            Assert.IsNull(devicecap.getMatchingTypeNodeVector(n));

            n.setType("fnarf", false);
            Assert.IsTrue(devicecap.getMatchingTypeNodeVector(n).Contains(n));

            devicecap.setCombinedMethod(EnumCombinedMethod.ProcessGroup);
            n.setType("ProcessGroup", true);
            JDFNode n2 = n.addJDFNode("fnarf");

            Assert.IsFalse(devicecap.getMatchingTypeNodeVector(n).Contains(n), "Only the actually matching nodes are returned, not their ancestors");
            Assert.IsTrue(devicecap.getMatchingTypeNodeVector(n).Contains(n2));
            Assert.IsNull(devicecap.getMatchingTypeNodeVector(n2), "want pg but have local node");
        }