Esempio n. 1
0
        public virtual void testIsValidMessageElement()
        {
            JDFDoc    doc = new JDFDoc(ElementName.JMF);
            JDFJMF    jmf = doc.getJMFRoot();
            JDFSignal sig = (JDFSignal)jmf.appendMessageElement(EnumFamily.Signal, EnumType.UpdateJDF);

            Assert.IsTrue(sig.isValidMessageElement(ElementName.UPDATEJDFCMDPARAMS, 0));
            Assert.IsFalse(sig.isValidMessageElement(ElementName.MODIFYNODECMDPARAMS, 0));

            JDFResponse resp = (JDFResponse)jmf.appendMessageElement(EnumFamily.Response, EnumType.RepeatMessages);

            Assert.IsTrue(resp.isValidMessageElement(ElementName.SIGNAL,3));
            Assert.IsTrue(resp.isValidMessageElement(ElementName.REGISTRATION,3));
            Assert.IsFalse(resp.isValidMessageElement(ElementName.QUEUE,0));

            JDFRegistration reg = (JDFRegistration)jmf.appendMessageElement(EnumFamily.Registration,EnumType.RepeatMessages);

            Assert.IsFalse(reg.isValidMessageElement(ElementName.SIGNAL,3));
        }