Exemple #1
0
        public virtual void testTheSenderID()
        {
            JDFJMF.setTheSenderID("sid");
            JDFDoc     doc = new JDFDoc(ElementName.JMF);
            JDFJMF     jmf = doc.getJMFRoot();
            JDFCommand c   = jmf.appendCommand();

            Assert.IsTrue(c.getID().IndexOf(".sid.") != -1);
            JDFJMF.setTheSenderID(null);
        }
Exemple #2
0
        public virtual void testInit()
        {
            JDFDoc doc = new JDFDoc(ElementName.JMF);
            JDFJMF jmf = doc.getJMFRoot();

            jmf.setSenderID("sid");
            JDFCommand c = jmf.appendCommand();

            Assert.IsTrue(c.getID().IndexOf(".sid.") != -1);
            Assert.IsTrue(jmf.ToString().IndexOf("xsi:type=") > 0);
            Assert.AreEqual(jmf.getMaxVersion(), jmf.getVersion(false));
            Assert.AreEqual(jmf.getMaxVersion(), c.getMaxVersion(true));
        }
Exemple #3
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());
        }