You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by eg...@apache.org on 2003/08/07 18:08:21 UTC

cvs commit: cocoon-lenya/src/test/org/apache/lenya/cms/authoring DocumentCreatorTest.java

egli        2003/08/07 09:08:21

  Modified:    src/test/org/apache/lenya/cms/authoring
                        DocumentCreatorTest.java
  Log:
  Adapted to the changes in the SiteTree constructor signature.
  
  Revision  Changes    Path
  1.5       +6 -12     cocoon-lenya/src/test/org/apache/lenya/cms/authoring/DocumentCreatorTest.java
  
  Index: DocumentCreatorTest.java
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/test/org/apache/lenya/cms/authoring/DocumentCreatorTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DocumentCreatorTest.java	15 Jul 2003 14:11:10 -0000	1.4
  +++ DocumentCreatorTest.java	7 Aug 2003 16:08:21 -0000	1.5
  @@ -62,17 +62,12 @@
   import junit.textui.TestRunner;
   
   import org.apache.lenya.cms.PublicationHelper;
  -import org.apache.lenya.cms.publication.DefaultSiteTree;
   import org.apache.lenya.cms.publication.Publication;
   import org.apache.lenya.cms.publication.SiteTree;
  +import org.apache.lenya.cms.publication.SiteTreeException;
   import org.apache.lenya.cms.publication.SiteTreeNode;
   
  -import org.xml.sax.SAXException;
  -
   import java.io.File;
  -import java.io.IOException;
  -
  -import javax.xml.parsers.ParserConfigurationException;
   
   
   /**
  @@ -112,12 +107,10 @@
       /**
        * Tests whatever you want.
        * @throws CreatorException when something went wrong.
  -     * @throws ParserConfigurationException when something went wrong.
  -     * @throws SAXException when something went wrong.
  -     * @throws IOException when something went wrong.
  +     * @throws SiteTreeException when something went wrong.
        */
       public void testCreator()
  -        throws CreatorException, ParserConfigurationException, SAXException, IOException {
  +        throws CreatorException, SiteTreeException {
           Publication publication = PublicationHelper.getPublication();
           DocumentCreator creator = new DocumentCreator();
           File authoringDirectory = new File(publication.getDirectory(), AUTHORING_DIR);
  @@ -131,7 +124,7 @@
   
           File sitetreeFile = new File(authoringDirectory, TREE_FILE);
   
  -        SiteTree sitetree = new DefaultSiteTree(sitetreeFile);
  +        SiteTree sitetree = publication.getSiteTree(AREA);
           SiteTreeNode node = sitetree.getNode(PARENT_ID + "/" + CHILD_ID);
           assertNotNull(node);
           System.out.println("Sitetree node was created: " + node.getId() + " (label: " +
  @@ -147,6 +140,7 @@
       protected static final String DOCUMENT_TYPE = "simple";
       protected static final String CREATED_FILE = "tutorial/test-document/index.xml";
       protected static final String DOCUMENT_LANGUAGE = "en";
  +    protected static final String AREA = "authoring";
   
       /** @see junit.framework.TestCase#setUp() */
       protected void setUp() throws Exception {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-cvs-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-cvs-help@cocoon.apache.org