1 16 17 package org.apache.cocoon.transformation; 18 19 import org.apache.avalon.framework.parameters.Parameters; 20 import org.apache.cocoon.SitemapComponentTestCase; 21 22 import org.w3c.dom.Document ; 23 24 30 public class TraxTransformerTestCase extends SitemapComponentTestCase { 31 32 public void testFunctionForXalan() throws Exception { 33 34 String src = "resource://org/apache/cocoon/transformation/traxtest-style.xsl"; 35 Parameters parameters = new Parameters(); 36 String input = "resource://org/apache/cocoon/transformation/traxtest-input.xml"; 37 String result = "resource://org/apache/cocoon/transformation/traxtest-result.xml"; 38 39 assertEqual(load(result), transform("xalan", src, parameters, load(input))); 40 } 41 42 public void testStressForXalan() throws Exception { 43 44 String src = "resource://org/apache/cocoon/transformation/traxtest-style.xsl"; 45 Parameters parameters = new Parameters(); 46 String input = "resource://org/apache/cocoon/transformation/traxtest-input.xml"; 47 Document document = load(input); 48 49 for(int i=0; i<100; i++) 50 transform("xalan", src, parameters, document); 51 } 52 53 77 } 78 | Popular Tags |