1 23 24 package org.enhydra.xml.xmlc.xml; 25 import java.lang.reflect.Method ; 26 27 import junit.framework.Test; 28 29 import org.enhydra.xml.driver.TestDiff; 30 import org.enhydra.xml.io.OutputOptions; 31 32 35 public class WMLTests extends XmlTestCaseBase { 36 37 38 public static Test suite() { 39 return createSuite(WMLTests.class, null); 40 } 41 42 43 public WMLTests(Method method) { 44 super(method); 45 } 46 47 48 private XmlBasicTest createWMLTest(String relInputDoc) { 49 return new XmlBasicTest(this, getInputFile(relInputDoc), 50 getInputFile("wml/wml_1.1.test.xml")); 51 } 52 53 57 public void test1() { 58 XmlBasicTest test = createWMLTest("wml/index.wml"); 59 OutputOptions options = test.getOutputOptions(); 60 options.setEncoding("ASCII"); 61 options.setOmitEncoding(true); 62 test.basicTest(); 63 64 String expectEntities = "民眾"; 65 TestDiff differ = getDiffer(); 66 differ.fgrepMustFind(expectEntities, test.getGenerateFile()); 67 differ.fgrepMustNotFind("encoding", test.getGenerateFile()); 68 } 69 70 73 public void test2() { 74 XmlBasicTest test = createWMLTest("wml/encoding.wml"); 77 test.setUseToDocument(); 78 test.basicTest(); 79 } 80 81 84 public void test3() { 85 XmlBasicTest test = createWMLTest("wml/Login.wml"); 86 test.basicTest(); 87 } 88 89 92 public void test4() { 93 XmlBasicTest test = createWMLTest("wml/Login2.wml"); 94 test.basicTest(); 95 } 96 } 97 | Popular Tags |