1 7 8 package org.dom4j.dtd; 9 10 import junit.textui.TestRunner; 11 12 import org.dom4j.AbstractTestCase; 13 14 29 public class ElementDeclTest extends AbstractTestCase { 30 public static void main(String [] args) { 31 TestRunner.run(ElementDeclTest.class); 32 } 33 34 37 46 public void testSimpleElementDecl() { 47 String expectedName = "an-element"; 48 49 String expectedModel = "(#PCDATA)"; 50 51 String expectedText = "<!ELEMENT an-element (#PCDATA)>"; 52 53 ElementDecl actual = new ElementDecl(expectedName, expectedModel); 54 55 assertEquals("name is correct", expectedName, actual.getName()); 56 57 assertEquals("model is correct", expectedModel, actual.getModel()); 58 59 assertEquals("toString() is correct", expectedText, actual.toString()); 60 } 61 62 } 65 66 102 | Popular Tags |