1 19 package org.enhydra.zeus.util; 20 21 import junit.framework.Test; 23 import junit.framework.TestCase; 24 import junit.framework.TestSuite; 25 26 import com.wutka.dtd.DTDElement; 28 import com.wutka.dtd.DTDName; 29 import com.wutka.dtd.DTDPCData; 30 31 38 public class DTDUtilsTest extends TestCase { 39 40 47 public DTDUtilsTest(String name) { 48 super(name); 49 } 50 51 60 public static Test suite(){ 61 return new TestSuite(DTDUtilsTest.class); 62 } 63 64 69 public void testIsSimpleType() { 70 DTDElement element = new DTDElement(); 71 boolean ignoreIDAttributes = true; 72 element.setContent(new DTDPCData()); 73 assertTrue(DTDUtils.isSimpleElement(element, ignoreIDAttributes)); 74 75 DTDName name = new DTDName("child"); 76 element.setContent(name); 77 assertTrue(!DTDUtils.isSimpleElement(element, ignoreIDAttributes)); 78 } 79 } 80 | Popular Tags |