maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From denn...@apache.org
Subject svn commit: r737601 - in /maven/doxia/doxia-sitetools/branches/doxia-sitetools-1.0.x: ./ doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/ doxia-decoration-model/src/test/java/org/apache/maven/doxia/site/decoratio...
Date Sun, 25 Jan 2009 23:14:53 GMT
Author: dennisl
Date: Sun Jan 25 23:14:52 2009
New Revision: 737601

URL: http://svn.apache.org/viewvc?rev=737601&view=rev
Log:
Merge revisions 736602,736629 from trunk.

Modified:
    maven/doxia/doxia-sitetools/branches/doxia-sitetools-1.0.x/   (props changed)
    maven/doxia/doxia-sitetools/branches/doxia-sitetools-1.0.x/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/DecorationModelInheritanceAssembler.java
    maven/doxia/doxia-sitetools/branches/doxia-sitetools-1.0.x/doxia-decoration-model/src/test/java/org/apache/maven/doxia/site/decoration/inheritance/DecorationModelInheritenceAssemblerTest.java
    maven/doxia/doxia-sitetools/branches/doxia-sitetools-1.0.x/doxia-decoration-model/src/test/java/org/apache/maven/doxia/site/decoration/inheritance/Doxia91Test.java
    maven/doxia/doxia-sitetools/branches/doxia-sitetools-1.0.x/doxia-decoration-model/src/test/java/org/apache/maven/doxia/site/decoration/inheritance/PathDescriptorTest.java

Propchange: maven/doxia/doxia-sitetools/branches/doxia-sitetools-1.0.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Jan 25 23:14:52 2009
@@ -1 +1 @@
-/maven/doxia/doxia-sitetools/trunk:629097,736603,736628,736630
+/maven/doxia/doxia-sitetools/trunk:629097,736602-736603,736628-736630

Modified: maven/doxia/doxia-sitetools/branches/doxia-sitetools-1.0.x/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/DecorationModelInheritanceAssembler.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/branches/doxia-sitetools-1.0.x/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/DecorationModelInheritanceAssembler.java?rev=737601&r1=737600&r2=737601&view=diff
==============================================================================
--- maven/doxia/doxia-sitetools/branches/doxia-sitetools-1.0.x/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/DecorationModelInheritanceAssembler.java
(original)
+++ maven/doxia/doxia-sitetools/branches/doxia-sitetools-1.0.x/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/DecorationModelInheritanceAssembler.java
Sun Jan 25 23:14:52 2009
@@ -25,13 +25,30 @@
  * Manage inheritance of the decoration model.
  *
  * @author <a href="mailto:brett@apache.org">Brett Porter</a>
+ * @version $Id$
  */
 public interface DecorationModelInheritanceAssembler
 {
+    /** Plexus lookup role. */
     String ROLE = DecorationModelInheritanceAssembler.class.getName();
 
-    void assembleModelInheritance( String name, DecorationModel child, DecorationModel parent,
String childBaseUrl,
-                                   String parentBaseUrl );
+    /**
+     * Manage inheritance of the decoration model between a parent and child.
+     *
+     * @param name a name, used for breadcrumb.
+     * @param child the child DecorationModel to be merged with parent.
+     * @param parent the parent DecorationModel not null.
+     * @param childBaseUrl the child base URL.
+     * @param parentBaseUrl the parent base URL.
+     */
+    void assembleModelInheritance( String name, DecorationModel child, DecorationModel parent,
+                                   String childBaseUrl, String parentBaseUrl );
 
+    /**
+     * Resolve relative paths for a DecorationModel given a base URL.
+     *
+     * @param decoration  the DecorationModel.
+     * @param baseUrl the base URL.
+     */
     void resolvePaths( DecorationModel decoration, String baseUrl );
 }

Modified: maven/doxia/doxia-sitetools/branches/doxia-sitetools-1.0.x/doxia-decoration-model/src/test/java/org/apache/maven/doxia/site/decoration/inheritance/DecorationModelInheritenceAssemblerTest.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/branches/doxia-sitetools-1.0.x/doxia-decoration-model/src/test/java/org/apache/maven/doxia/site/decoration/inheritance/DecorationModelInheritenceAssemblerTest.java?rev=737601&r1=737600&r2=737601&view=diff
==============================================================================
--- maven/doxia/doxia-sitetools/branches/doxia-sitetools-1.0.x/doxia-decoration-model/src/test/java/org/apache/maven/doxia/site/decoration/inheritance/DecorationModelInheritenceAssemblerTest.java
(original)
+++ maven/doxia/doxia-sitetools/branches/doxia-sitetools-1.0.x/doxia-decoration-model/src/test/java/org/apache/maven/doxia/site/decoration/inheritance/DecorationModelInheritenceAssemblerTest.java
Sun Jan 25 23:14:52 2009
@@ -36,6 +36,7 @@
  * Test the inheritance assembler.
  *
  * @author <a href="mailto:brett@apache.org">Brett Porter</a>
+ * @version $Id$
  */
 public class DecorationModelInheritenceAssemblerTest
     extends TestCase
@@ -52,8 +53,8 @@
 
         assembler.assembleModelInheritance( NAME, childModel, parentModel, "http://maven.apache.org/doxia",
                                             "http://maven.apache.org" );
-
         DecorationModel mergedModel = readModel( "merged.xml" );
+
         assertEquals( "Check result", mergedModel, childModel );
     }
 
@@ -63,10 +64,11 @@
         // Test an empty model avoids NPEs
         DecorationModel childModel = readModel( "empty.xml" );
         DecorationModel parentModel = readModel( "empty.xml" );
+
         assembler.assembleModelInheritance( NAME, childModel, parentModel, "http://maven.apache.org/doxia",
                                             "http://maven.apache.org" );
-
         DecorationModel mergedModel = readModel( "empty.xml" );
+
         assertEquals( "Check result", mergedModel, childModel );
     }
 
@@ -75,6 +77,7 @@
     {
         DecorationModel parentModel = readModel( "external-urls.xml" );
         DecorationModel childModel = readModel( "empty.xml" );
+
         assembler.assembleModelInheritance( NAME, childModel, parentModel, "http://maven.apache.org/doxia",
                                             "http://maven.apache.org" );
 
@@ -107,6 +110,7 @@
     {
         DecorationModel parentModel = readModel( "relative-urls.xml" );
         DecorationModel childModel = readModel( "empty.xml" );
+
         assembler.assembleModelInheritance( NAME, childModel, parentModel, "http://maven.apache.org/doxia/",
                                             "http://maven.apache.org" );
 
@@ -136,6 +140,7 @@
     {
         DecorationModel parentModel = readModel( "subsite-urls.xml" );
         DecorationModel childModel = readModel( "empty.xml" );
+
         assembler.assembleModelInheritance( NAME, childModel, parentModel, "http://maven.apache.org/doxia/",
                                             "http://maven.apache.org" );
 
@@ -165,6 +170,7 @@
     {
         DecorationModel parentModel = readModel( "relative-urls.xml" );
         DecorationModel childModel = readModel( "empty.xml" );
+
         assembler.assembleModelInheritance( NAME, childModel, parentModel, "http://maven.apache.org/doxia/core",
                                             "http://maven.apache.org" );
 
@@ -195,6 +201,7 @@
     {
         DecorationModel parentModel = readModel( "relative-urls.xml" );
         DecorationModel childModel = readModel( "empty.xml" );
+
         assembler.assembleModelInheritance( NAME, childModel, parentModel, "http://maven.apache.org/",
                                             "http://maven.apache.org/doxia/" );
 
@@ -225,6 +232,7 @@
     {
         DecorationModel parentModel = readModel( "relative-urls.xml" );
         DecorationModel childModel = readModel( "empty.xml" );
+
         assembler.assembleModelInheritance( NAME, childModel, parentModel, "http://maven.apache.org/",
                                             "http://maven.apache.org/doxia/core/" );
 
@@ -256,6 +264,7 @@
     {
         DecorationModel parentModel = readModel( "relative-urls.xml" );
         DecorationModel childModel = readModel( "empty.xml" );
+
         assembler.assembleModelInheritance( NAME, childModel, parentModel, "http://maven.apache.org",
                                             "http://jakarta.apache.org" );
 
@@ -288,10 +297,11 @@
         throws IOException, XmlPullParserException
     {
         DecorationModel childModel = readModel( "empty.xml" );
+
         assembler.assembleModelInheritance( NAME, childModel, null, "http://maven.apache.org/doxia",
                                             "http://maven.apache.org" );
-
         DecorationModel mergedModel = readModel( "empty.xml" );
+
         assertEquals( "Check result", mergedModel, childModel );
     }
 
@@ -300,11 +310,12 @@
     {
         DecorationModel childModel = readModel( "fully-populated-child.xml" );
         DecorationModel parentModel = readModel( "fully-populated-child.xml" );
+
         assembler.assembleModelInheritance( NAME, childModel, parentModel, "http://foo.apache.org/doxia",
                                             "http://foo.apache.org" );
-
         DecorationModel mergedModel = readModel( "fully-populated-child.xml" );
-        assertEquals( "Check result", mergedModel.toString(), childModel.toString() );
+
+        assertEquals( "Check result", mergedModel, childModel );
     }
 
     public void testFullyPopulatedParentAndEmptyChild()
@@ -312,10 +323,11 @@
     {
         DecorationModel childModel = readModel( "empty.xml" );
         DecorationModel parentModel = readModel( "fully-populated-child.xml" );
+
         assembler.assembleModelInheritance( NAME, childModel, parentModel, "http://maven.apache.org/doxia",
                                             "http://maven.apache.org" );
-
         DecorationModel mergedModel = readModel( "fully-populated-merged.xml" );
+
         assertEquals( "Check result", mergedModel, childModel );
     }
 
@@ -325,9 +337,9 @@
         DecorationModel model = readModel( "external-urls.xml" );
 
         assembler.resolvePaths( model, "http://foo.com/" );
+        DecorationModel mergedModel = readModel( "external-urls.xml" );
 
-        DecorationModel resolvedModel = readModel( "external-urls.xml" );
-        assertEquals( "Check result", resolvedModel, model );
+        assertEquals( "Check result", mergedModel, model );
     }
 
     public void testResolvingAllRelativeUrls()
@@ -338,6 +350,7 @@
         assembler.resolvePaths( model, "http://foo.com/" );
 
         DecorationModel resolvedModel = readModel( "relative-urls-resolved.xml" );
+
         assertEquals( "Check result", resolvedModel, model );
     }
 
@@ -393,9 +406,9 @@
     {
         DecorationModel model = readModel( "empty.xml" );
         assembler.resolvePaths( model, "http://maven.apache.org" );
+        DecorationModel mergedModel = readModel( "empty.xml" );
 
-        DecorationModel resolvedModel = readModel( "empty.xml" );
-        assertEquals( "Check result", resolvedModel, model );
+        assertEquals( "Check result", mergedModel, model );
     }
 
     public void testDuplicateParentElements()

Modified: maven/doxia/doxia-sitetools/branches/doxia-sitetools-1.0.x/doxia-decoration-model/src/test/java/org/apache/maven/doxia/site/decoration/inheritance/Doxia91Test.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/branches/doxia-sitetools-1.0.x/doxia-decoration-model/src/test/java/org/apache/maven/doxia/site/decoration/inheritance/Doxia91Test.java?rev=737601&r1=737600&r2=737601&view=diff
==============================================================================
--- maven/doxia/doxia-sitetools/branches/doxia-sitetools-1.0.x/doxia-decoration-model/src/test/java/org/apache/maven/doxia/site/decoration/inheritance/Doxia91Test.java
(original)
+++ maven/doxia/doxia-sitetools/branches/doxia-sitetools-1.0.x/doxia-decoration-model/src/test/java/org/apache/maven/doxia/site/decoration/inheritance/Doxia91Test.java
Sun Jan 25 23:14:52 2009
@@ -1,7 +1,5 @@
 package org.apache.maven.doxia.site.decoration.inheritance;
 
-import junit.framework.TestCase;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -21,17 +19,20 @@
  * under the License.
  */
 
+import junit.framework.TestCase;
+
 /**
  * Testcase for DOXIA-91 problems. All tests make sure that a passed in null will not generate
any path conversion but
  * just returns the old path.
- * 
+ *
  * @author <a href="mailto:henning@apache.org">Henning P. Schmiedehausen</a>
+ * @version $Id$
  */
-
-public class Doxia91Test extends TestCase
+public class Doxia91Test
+    extends TestCase
 {
-
-    public void testOldPathNull() throws Exception
+    public void testOldPathNull()
+        throws Exception
     {
         PathDescriptor oldPath = new PathDescriptor( null );
         PathDescriptor newPath = new PathDescriptor( "http://www.apache.org/" );
@@ -41,7 +42,8 @@
         assertEquals( diff, oldPath );
     }
 
-    public void testNewPathNull() throws Exception
+    public void testNewPathNull()
+        throws Exception
     {
         PathDescriptor oldPath = new PathDescriptor( "http://www.apache.org/", "file:///home/henning/foo"
);
         PathDescriptor newPath = new PathDescriptor( null );
@@ -51,7 +53,8 @@
         assertEquals( diff, oldPath );
     }
 
-    public void testBothPathNull() throws Exception
+    public void testBothPathNull()
+        throws Exception
     {
         PathDescriptor oldPath = new PathDescriptor( null );
         PathDescriptor newPath = new PathDescriptor( null );

Modified: maven/doxia/doxia-sitetools/branches/doxia-sitetools-1.0.x/doxia-decoration-model/src/test/java/org/apache/maven/doxia/site/decoration/inheritance/PathDescriptorTest.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/branches/doxia-sitetools-1.0.x/doxia-decoration-model/src/test/java/org/apache/maven/doxia/site/decoration/inheritance/PathDescriptorTest.java?rev=737601&r1=737600&r2=737601&view=diff
==============================================================================
--- maven/doxia/doxia-sitetools/branches/doxia-sitetools-1.0.x/doxia-decoration-model/src/test/java/org/apache/maven/doxia/site/decoration/inheritance/PathDescriptorTest.java
(original)
+++ maven/doxia/doxia-sitetools/branches/doxia-sitetools-1.0.x/doxia-decoration-model/src/test/java/org/apache/maven/doxia/site/decoration/inheritance/PathDescriptorTest.java
Sun Jan 25 23:14:52 2009
@@ -29,10 +29,13 @@
  * Test the PathDescriptor creation under various circumstances.
  *
  * @author <a href="mailto:henning@apache.org">Henning P. Schmiedehausen</a>
+ * @version $Id$
  */
-public class PathDescriptorTest extends TestCase
+public class PathDescriptorTest
+    extends TestCase
 {
-    public void testAbsPath() throws Exception
+    public void testAbsPath()
+        throws Exception
     {
         String path = "absolutePath";
 
@@ -48,7 +51,8 @@
         assertEquals( "wrong location", path, desc.getLocation() );
     }
 
-    public void testRelPath() throws Exception
+    public void testRelPath()
+        throws Exception
     {
         String path = "relativePath";
 
@@ -64,7 +68,8 @@
         assertEquals( "wrong location", path, desc.getLocation() );
     }
 
-    public void testEmptyAbsPath() throws Exception
+    public void testEmptyAbsPath()
+        throws Exception
     {
         String path = "";
 
@@ -80,7 +85,8 @@
         assertEquals( "wrong location", path, desc.getLocation() );
     }
 
-    public void testEmptyRelPath() throws Exception
+    public void testEmptyRelPath()
+        throws Exception
     {
         String path = "";
 
@@ -96,7 +102,8 @@
         assertEquals( "wrong location", path, desc.getLocation() );
     }
 
-    public void testNullPath() throws Exception
+    public void testNullPath()
+        throws Exception
     {
         String path = null;
 
@@ -112,7 +119,8 @@
         assertEquals( "wrong location", path, desc.getLocation() );
     }
 
-    public void testNullBaseAbsPath() throws Exception
+    public void testNullBaseAbsPath()
+        throws Exception
     {
         String base = null;
         String path = "absolutePath";
@@ -129,7 +137,8 @@
         assertEquals( "wrong location", path, desc.getLocation() );
     }
 
-    public void testNullBaseRelPath() throws Exception
+    public void testNullBaseRelPath()
+        throws Exception
     {
         String base = null;
         String path = "relativePath";
@@ -146,7 +155,8 @@
         assertEquals( "wrong location", path, desc.getLocation() );
     }
 
-    public void testNullBaseEmptyAbsPath() throws Exception
+    public void testNullBaseEmptyAbsPath()
+        throws Exception
     {
         String base = null;
         String path = "";
@@ -163,7 +173,8 @@
         assertEquals( "wrong location", path, desc.getLocation() );
     }
 
-    public void testNullBaseEmptyRelPath() throws Exception
+    public void testNullBaseEmptyRelPath()
+        throws Exception
     {
         String base = null;
         String path = "";
@@ -180,7 +191,8 @@
         assertEquals( "wrong location", path, desc.getLocation() );
     }
 
-    public void testNullBaseNullPath() throws Exception
+    public void testNullBaseNullPath()
+        throws Exception
     {
         String base = null;
         String path = null;
@@ -197,7 +209,8 @@
         assertEquals( "wrong location", path, desc.getLocation() );
     }
 
-    public void testUrlBaseAbsPath() throws Exception
+    public void testUrlBaseAbsPath()
+        throws Exception
     {
         String base = "http://maven.apache.org/";
         String path = "absolutePath";
@@ -214,7 +227,8 @@
         assertEquals( "wrong location", base + path, desc.getLocation() );
     }
 
-    public void testUrlBaseRelPath() throws Exception
+    public void testUrlBaseRelPath()
+        throws Exception
     {
         String base = "http://maven.apache.org/";
         String path = "relativePath";
@@ -231,7 +245,8 @@
         assertEquals( "wrong location", base + path, desc.getLocation() );
     }
 
-    public void testUrlBaseEmptyAbsPath() throws Exception
+    public void testUrlBaseEmptyAbsPath()
+        throws Exception
     {
         String base = "http://maven.apache.org/";
         String path = "";
@@ -248,7 +263,8 @@
         assertEquals( "wrong location", base + path, desc.getLocation() );
     }
 
-    public void testUrlBaseEmptyRelPath() throws Exception
+    public void testUrlBaseEmptyRelPath()
+        throws Exception
     {
         String base = "http://maven.apache.org/";
         String path = "";
@@ -265,7 +281,8 @@
         assertEquals( "wrong location", base + path, desc.getLocation() );
     }
 
-    public void testUrlBaseNullPath() throws Exception
+    public void testUrlBaseNullPath()
+        throws Exception
     {
         String base = "http://maven.apache.org/";
         String path = null;
@@ -282,7 +299,8 @@
         assertEquals( "wrong location", base, desc.getLocation() );
     }
 
-    public void testFileBaseAbsPath() throws Exception
+    public void testFileBaseAbsPath()
+        throws Exception
     {
         String base = "/tmp/foo";
         String path = "absolutePath";
@@ -308,7 +326,8 @@
         }
     }
 
-    public void testFileBaseRelPath() throws Exception
+    public void testFileBaseRelPath()
+        throws Exception
     {
         String base = "/tmp/foo";
         String path = "relativePath";
@@ -334,7 +353,8 @@
         }
     }
 
-    public void testFileBaseEmptyAbsPath() throws Exception
+    public void testFileBaseEmptyAbsPath()
+        throws Exception
     {
         String base = "/tmp/foo";
         String path = "";
@@ -360,7 +380,8 @@
         }
     }
 
-    public void testFileBaseEmptyRelPath() throws Exception
+    public void testFileBaseEmptyRelPath()
+        throws Exception
     {
         String base = "/tmp/foo";
         String path = "";
@@ -386,7 +407,8 @@
         }
     }
 
-    public void testFileBaseNullPath() throws Exception
+    public void testFileBaseNullPath()
+        throws Exception
     {
         String base = "/tmp/foo";
         String path = null;
@@ -403,7 +425,8 @@
         assertEquals( "wrong location", base, desc.getLocation() );
     }
 
-    public void testPathBaseAbsPath() throws Exception
+    public void testPathBaseAbsPath()
+        throws Exception
     {
         String base = "/tmp/foo";
         String path = "absolutePath";
@@ -429,7 +452,8 @@
         }
     }
 
-    public void testPathBaseRelPath() throws Exception
+    public void testPathBaseRelPath()
+        throws Exception
     {
         String base = "/tmp/foo";
         String path = "relativePath";
@@ -455,7 +479,8 @@
         }
     }
 
-    public void testPathBaseEmptyAbsPath() throws Exception
+    public void testPathBaseEmptyAbsPath()
+        throws Exception
     {
         String base = "/tmp/foo";
         String path = "";
@@ -481,7 +506,8 @@
         }
     }
 
-    public void testPathBaseEmptyRelPath() throws Exception
+    public void testPathBaseEmptyRelPath()
+        throws Exception
     {
         String base = "/tmp/foo";
         String path = "";
@@ -507,7 +533,8 @@
         }
     }
 
-    public void testPathBaseNullPath() throws Exception
+    public void testPathBaseNullPath()
+        throws Exception
     {
         String base = "/tmp/foo";
         String path = null;



Mime
View raw message