lenya-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject cvs commit: cocoon-lenya/src/test/org/apache/lenya/cms/authoring DocumentCreatorTest.java
Date Fri, 08 Aug 2003 10:37:41 GMT
egli        2003/08/08 03:37:41

  Modified:    src/test/org/apache/lenya/cms/authoring
                        DocumentCreatorTest.java
  Log:
  The interface to the creator has changed so the unit test
  needs to adapt. Also since the language is appended now
  to the xml file the assuption on the file has change and so
  this assertion needed to be changed.
  The creator test works again.
  
  Revision  Changes    Path
  1.6       +4 -7      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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DocumentCreatorTest.java	7 Aug 2003 16:08:21 -0000	1.5
  +++ DocumentCreatorTest.java	8 Aug 2003 10:37:41 -0000	1.6
  @@ -115,15 +115,13 @@
           DocumentCreator creator = new DocumentCreator();
           File authoringDirectory = new File(publication.getDirectory(), AUTHORING_DIR);
   
  -        creator.create(publication, authoringDirectory, TREE_FILE, PARENT_ID, CHILD_ID,
CHILD_NAME,
  +        creator.create(publication, authoringDirectory, AREA, PARENT_ID, CHILD_ID, CHILD_NAME,
               CHILD_TYPE, DOCUMENT_TYPE, DOCUMENT_LANGUAGE);
   
           File documentFile = new File(authoringDirectory, CREATED_FILE);
           assertTrue(documentFile.exists());
           System.out.println("File was created: " + documentFile.getAbsolutePath());
   
  -        File sitetreeFile = new File(authoringDirectory, TREE_FILE);
  -
           SiteTree sitetree = publication.getSiteTree(AREA);
           SiteTreeNode node = sitetree.getNode(PARENT_ID + "/" + CHILD_ID);
           assertNotNull(node);
  @@ -132,20 +130,19 @@
       }
   
       protected static final String AUTHORING_DIR = "content" + File.separator + "authoring";
  -    protected static final String TREE_FILE = "sitetree.xml";
       protected static final String PARENT_ID = "/tutorial";
       protected static final String CHILD_ID = "test-document";
       protected static final String CHILD_NAME = "Test Document";
       protected static final String CHILD_TYPE = "leaf";
       protected static final String DOCUMENT_TYPE = "simple";
  -    protected static final String CREATED_FILE = "tutorial/test-document/index.xml";
  +    protected static final String CREATED_FILE = "tutorial/test-document/index_en.xml";
       protected static final String DOCUMENT_LANGUAGE = "en";
       protected static final String AREA = "authoring";
   
       /** @see junit.framework.TestCase#setUp() */
       protected void setUp() throws Exception {
           if (PublicationHelper.getPublication() == null) {
  -            String[] args = { "D:\\Development\\build\\tomcat-4.1.24\\webapps\\lenya",
"test" };
  +            String[] args = { "/home/egli/build/jakarta-tomcat-4.1.21-LE-jdk14/webapps/lenya",
"test" };
               PublicationHelper.extractPublicationArguments(args);
           }
       }
  
  
  

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


Mime
View raw message