1 16 package org.apache.cocoon; 17 18 23 public class FlowscriptDOMDumpTestCase 24 extends HtmlUnitTestCase 25 { 26 final String pageurl = "/samples/test/flowscript-dom-dump/"; 27 28 31 public void testDOMDump() 32 throws Exception 33 { 34 loadXmlPage(pageurl+"dom-dump"); 35 assertEquals("Content-type", "text/xml", response.getContentType()); 36 37 assertXPath("//dump-without-star/root/child", "childText"); 38 assertXPath("//dump-with-star/root/child", "childText"); 39 } 40 41 44 public void testDOMDumpXSLT() 45 throws Exception 46 { 47 loadXmlPage(pageurl+"dom-dump-xslt"); 48 assertEquals("Content-type", "text/xml", response.getContentType()); 49 50 assertXPath("//dump-without-star/root/@test-transform", "true"); 51 assertXPath("//dump-without-star/root/child", "childText"); 52 assertXPath("//dump-with-star/root/@test-transform", "true"); 53 assertXPath("//dump-with-star/root/child", "childText"); 54 } 55 } 56 | Popular Tags |