1 23 24 package org.enhydra.xml.lazydom; 25 import java.io.File ; 26 import java.lang.reflect.Method ; 27 28 import junit.framework.Test; 29 30 import org.enhydra.xml.driver.TestDomOps; 31 import org.enhydra.xml.lazydom.html.LazyHTMLDocument; 32 33 36 public class BasicHTMLTests extends LazyDOMTestCaseBase { 37 38 private static final String FRAME_TREE_HTML_DIR = "../xmlc/html"; 39 private static final String FRAME_TREE_HTML = "FrameTree.html"; 40 41 42 private LazyDOMBuilder fBuilder 43 = new LazyDOMBuilder(getMsgWriter(), 44 org.enhydra.xml.xmlc.dom.lazydom.LazyHTMLDomFactory.class); 45 46 47 public static Test suite() { 48 return createSuite(BasicHTMLTests.class, null); 49 } 50 51 52 public BasicHTMLTests(Method method) { 53 super(method); 54 } 55 56 57 private LazyHTMLDocument parseFrameTree() { 58 File frameTree = getOtherInputFile(FRAME_TREE_HTML_DIR, 59 FRAME_TREE_HTML); 60 return (LazyHTMLDocument)fBuilder.parseUnexpanded(frameTree); 61 } 62 63 66 public void test1() { 67 LazyHTMLDocument lazyDoc = parseFrameTree(); 68 69 printDiffDom("Unexpanded Lazy DOM", lazyDoc, 70 "unexpanded.dom"); 71 TestDomOps.expandTree(lazyDoc); 72 printDiffDom("Expanded Lazy DOM", lazyDoc, 73 "expanded.dom"); 74 } 75 } 76 | Popular Tags |