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

            n.setType("ConventionalPrinting", true);
            JDFExposedMedia xmpl = (JDFExposedMedia)n.appendMatchingResource("ExposedMedia", EnumProcessUsage.Plate, null);
            JDFExposedMedia xmpr = (JDFExposedMedia)n.appendMatchingResource("ExposedMedia", EnumProcessUsage.Proof, null);
            JDFMedia        m    = xmpr.appendMedia();

            Assert.IsNotNull(xmpr.getMedia());
            m.setID("id1");
            KElement t1 = n.getTarget("id1", "ID");

            m = (JDFMedia)m.makeRootResource(null, null, true);
            Assert.AreEqual(t1, m);
            Assert.IsTrue(n.getHRefs(null, true, false).Contains("id1"));
            Assert.IsTrue(xmpr.getHRefs(null, true, false).Contains("id1"));
            Assert.IsFalse(xmpl.getHRefs(null, true, false).Contains("id1"));
            Assert.IsTrue(n.getHRefs(null, true, true).Contains("id1"));
            Assert.IsTrue(xmpr.getHRefs(null, true, true).Contains("id1"));
            Assert.IsFalse(xmpl.getHRefs(null, true, true).Contains("id1"));
        }