1 17 18 19 20 package org.apache.lenya.cms.publication; 21 22 import junit.framework.Test; 23 import junit.framework.TestCase; 24 import junit.framework.TestSuite; 25 import junit.textui.TestRunner; 26 27 import org.apache.lenya.cms.PublicationHelper; 28 import org.apache.lenya.cms.publication.file.FilePublicationTest; 29 30 34 public class PublicationTest extends TestCase { 35 39 public PublicationTest(String test) { 40 super(test); 41 } 42 43 47 public static void main(String [] args) { 48 PublicationHelper.extractPublicationArguments(args); 49 TestRunner.run(getSuite()); 50 } 51 52 protected static final Class [] classes = 53 { FilePublicationTest.class, DefaultDocumentTest.class, DefaultDocumentBuilderTest.class }; 54 55 59 public static Test getSuite() { 60 TestSuite suite = new TestSuite(); 61 62 for (int i = 0; i < classes.length; i++) { 63 suite.addTestSuite(classes[i]); 64 } 65 66 return suite; 67 } 68 69 70 protected void setUp() throws Exception { 71 if (PublicationHelper.getPublication() == null) { 72 String [] args = { "D:\\Development\\build\\tomcat-4.1.24\\webapps\\lenya", "test" }; 73 PublicationHelper.extractPublicationArguments(args); 74 } 75 } 76 77 } 78 | Popular Tags |