1 23 24 package org.enhydra.xml.xmlc.html; 25 import java.io.File ; 26 import java.lang.reflect.Method ; 27 import java.net.MalformedURLException ; 28 import java.net.URL ; 29 30 import junit.framework.Test; 31 32 import org.enhydra.xml.driver.TestError; 33 34 37 public class IOTests extends HtmlTestCaseBase { 38 39 private String fTestPage1Url 40 = "file:" + getInputFile("testPage1.html").getPath(); 41 42 43 public static Test suite() { 44 return createSuite(IOTests.class, null); 45 } 46 47 48 public IOTests(Method method) { 49 super(method); 50 } 51 52 53 private HtmlBasicTest setupTest(File inputDoc) { 54 return new HtmlBasicTest(this, inputDoc); 55 } 56 57 58 private HtmlBasicTest setupTest(String inputDocURL) { 59 try { 60 URL url = new URL (inputDocURL); 61 return setupTest(new File (url.getFile())); 62 } catch (MalformedURLException except) { 63 throw new TestError(except); 64 } 65 } 66 67 68 private HtmlBasicTest setupTest() { 69 return setupTest(fTestPage1Url); 70 } 71 72 75 private void disabled_test1() { 76 HtmlBasicTest test = setupTest(); 78 test.basicTest(); 79 } 80 81 84 private void disabled_test2() { 85 } 89 90 93 private void disabled_test3() { 94 } 98 99 102 public void test4() { 103 HtmlBasicTest test = setupTest(); 104 test.getOutputOptions().setPublicId("-publicid -//W3C//DTD@HTML@4.0//EN"); 105 test.basicTest(); 106 } 107 108 111 public void test5() { 112 HtmlBasicTest test = setupTest(); 113 test.getOutputOptions().setPublicId("-//W3C//DTD@HTML@4.0//EN"); 114 test.getOutputOptions().setSystemId("http://www.w3.org/TR/html4/strict.dtd"); 115 test.basicTest(); 116 } 117 118 121 public void test6() { 122 HtmlBasicTest test = setupTest(); 123 test.getOutputOptions().setSystemId("http://www.w3.org/TR/html4/strict.dtd"); 124 test.basicTest(); 125 } 126 } 127 | Popular Tags |