示例#1
0
        public virtual void testGetMatchingPartAmountVector()
        {
            JDFDoc          d      = JDFTestCaseBase.creatXMDoc();
            JDFNode         n      = d.getJDFRoot();
            JDFResourceLink xmLink = n.getLink(0, ElementName.EXPOSEDMEDIA, null, null);
            JDFAttributeMap mPart  = new JDFAttributeMap("SignatureName", "Sig1");

            mPart.put("SheetName", "S1");
            mPart.put("Side", "Front");
            mPart.put("Separation", "Black");
            mPart.put("Condition", "Good");
            xmLink.setAmount(2, mPart);
            mPart.put("Condition", "Waste");
            xmLink.setAmount(1, mPart);

            JDFAmountPool aplocal = xmLink.getAmountPool();

            Assert.IsNotNull(aplocal);
            mPart.Remove("Condition");

            VElement v = aplocal.getMatchingPartAmountVector(mPart);

            Assert.AreEqual(2, v.Count);
            mPart.put("Side", "Moebius");
            v = aplocal.getMatchingPartAmountVector(mPart);
            Assert.IsNull(v, "there certainly is no moebius side ...");
        }