Пример #1
0
        public virtual void testError()
        {
            JDFDoc      doc = new JDFDoc(ElementName.JMF);
            JDFJMF      jmf = doc.getJMFRoot();
            JDFResponse r   = (JDFResponse)jmf.appendMessageElement(EnumFamily.Response, null);

            r.setType("Status");
            r.setrefID("r1");
            JDFNotification n = r.setErrorText("blub");

            Assert.AreEqual("blub", n.getComment(0).getText(), "get comment text");
            Assert.AreEqual("Error", n.getType(), "type");
            Assert.IsTrue(r.isValid(EnumValidationLevel.Complete));
            jmf.setSenderID("S1");
            Assert.IsTrue(jmf.isValid(EnumValidationLevel.Complete));
        }