Exemple #1
0
        public virtual void testSetType()
        {
            JDFDoc     doc     = new JDFDoc(ElementName.JMF);
            JDFJMF     jmf     = doc.getJMFRoot();
            JDFCommand command = (JDFCommand)jmf.appendMessageElement(EnumFamily.Command,EnumType.UpdateJDF);

            Assert.AreEqual("CommandUpdateJDF",command.getXSIType());
            command.setType("foo:bar");
            Assert.IsNull(command.getXSIType());
            Assert.AreEqual("foo:bar",command.getType());
        }
Exemple #2
0
        public virtual void testCreateResponse()
        {
            JDFDoc     doc     = new JDFDoc(ElementName.JMF);
            JDFJMF     jmf     = doc.getJMFRoot();
            JDFCommand command = (JDFCommand)jmf.appendMessageElement(EnumFamily.Command,EnumType.UpdateJDF);

            Assert.AreEqual("CommandUpdateJDF",command.getXSIType());
            command.setType("foo:bar");
            Assert.IsNull(command.getXSIType());
            Assert.AreEqual("foo:bar",command.getType());
            JDFJMF      resp     = command.createResponse();
            JDFResponse response = resp.getResponse(0);

            Assert.AreEqual(resp.getMessageElement(null,null,0),response);
            Assert.AreEqual("foo:bar",response.getType());
            Assert.AreEqual(command.getID(),response.getrefID());
        }