示例#1
0
 public virtual void testIsCommentStatic()
 {
     _setUp();
     Assert.IsFalse(m_kElement is JDFComment, "Bug: This is a comment!");
     m_jdfElement.appendComment();
     m_kElement = m_jdfElement.getChildByTagName("Comment", "", 0, null, false, true);
     Assert.IsTrue(m_kElement is JDFComment, "Bug: This is no comment!");
 }
示例#2
0
        public virtual void testRemoveAttributeStringString()
        {
            JDFParser p      = new JDFParser();
            JDFDoc    jdfDoc = p.parseFile(sm_dirTestData + "emptyAuthorAttribute.jdf");

            JDFElement root  = jdfDoc.getJDFRoot();
            KElement   kElem = root.getChildByTagName("Created", "", 0, null, false, true);

            bool before = kElem.hasAttribute("Author", "", false);

            Assert.IsTrue(before, "The Attribute 'Author' does not exist");

            if (before)
            {
                kElem.removeAttribute("Author", "");
                bool after = kElem.hasAttribute("Author", "", false);

                Assert.IsFalse(after, "The Attribute 'Author' was not removed");
            }
        }