1 17 18 19 20 package org.apache.lenya.cms.publication; 21 22 import junit.framework.Test; 23 import junit.framework.TestSuite; 24 import junit.textui.TestRunner; 25 26 import org.apache.lenya.cms.PublicationHelper; 27 28 33 public class DefaultDocumentBuilderTest extends DefaultDocumentTest { 34 40 public DefaultDocumentBuilderTest(String test) { 41 super(test); 42 } 43 44 50 public static void main(String [] args) { 51 PublicationHelper.extractPublicationArguments(args); 52 TestRunner.run(getSuite()); 53 } 54 55 60 public static Test getSuite() { 61 return new TestSuite(DefaultDocumentBuilderTest.class); 62 } 63 64 67 protected Document getDocument(DocumentTestSet set) throws DocumentBuildException { 68 Publication pub = PublicationHelper.getPublication(); 69 70 return pub.getDocumentBuilder().buildDocument( 71 pub, 72 "/" + pub.getId() + "/" + set.getArea() + set.getUrl()); 73 } 74 } 75 | Popular Tags |