lenya-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From flor...@apache.org
Subject svn commit: r1049475 - in /lenya/branches/BRANCH_2_0_X/src: modules-core/linking/java/test/org/apache/lenya/cms/linking/LinkTest.java modules/export/java/test/org/apache/lenya/cms/export/ImportTest.java
Date Wed, 15 Dec 2010 10:31:06 GMT
Author: florent
Date: Wed Dec 15 10:31:05 2010
New Revision: 1049475

URL: http://svn.apache.org/viewvc?rev=1049475&view=rev
Log:
- suppress the test related to link size because the test class is about import.
-- add the test on link size in the LinkTest class.

Modified:
    lenya/branches/BRANCH_2_0_X/src/modules-core/linking/java/test/org/apache/lenya/cms/linking/LinkTest.java
    lenya/branches/BRANCH_2_0_X/src/modules/export/java/test/org/apache/lenya/cms/export/ImportTest.java

Modified: lenya/branches/BRANCH_2_0_X/src/modules-core/linking/java/test/org/apache/lenya/cms/linking/LinkTest.java
URL: http://svn.apache.org/viewvc/lenya/branches/BRANCH_2_0_X/src/modules-core/linking/java/test/org/apache/lenya/cms/linking/LinkTest.java?rev=1049475&r1=1049474&r2=1049475&view=diff
==============================================================================
--- lenya/branches/BRANCH_2_0_X/src/modules-core/linking/java/test/org/apache/lenya/cms/linking/LinkTest.java
(original)
+++ lenya/branches/BRANCH_2_0_X/src/modules-core/linking/java/test/org/apache/lenya/cms/linking/LinkTest.java
Wed Dec 15 10:31:05 2010
@@ -52,7 +52,8 @@ public class LinkTest extends AbstractAc
             resolver = (LinkResolver) getManager().lookup(LinkResolver.ROLE);
 
             Link[] links = linkManager.getLinksFrom(source);
-
+	    assertTrue(links.length > 0);
+	    
             boolean matched = false;
             for (int i = 0; i < links.length; i++) {
                 LinkTarget linkTarget = resolver.resolve(source, links[i].getUri());

Modified: lenya/branches/BRANCH_2_0_X/src/modules/export/java/test/org/apache/lenya/cms/export/ImportTest.java
URL: http://svn.apache.org/viewvc/lenya/branches/BRANCH_2_0_X/src/modules/export/java/test/org/apache/lenya/cms/export/ImportTest.java?rev=1049475&r1=1049474&r2=1049475&view=diff
==============================================================================
--- lenya/branches/BRANCH_2_0_X/src/modules/export/java/test/org/apache/lenya/cms/export/ImportTest.java
(original)
+++ lenya/branches/BRANCH_2_0_X/src/modules/export/java/test/org/apache/lenya/cms/export/ImportTest.java
Wed Dec 15 10:31:05 2010
@@ -54,8 +54,7 @@ public class ImportTest extends Abstract
             importer.importContent(defaultPub, area, path);
             
             assertTrue(area.getSite().contains("/tutorial"));
-            checkLinks(area);
-            
+                        
             session.commit();
         }
         
@@ -65,22 +64,5 @@ public class ImportTest extends Abstract
         
     }
 
-    protected void checkLinks(Area area) throws PublicationException, ServiceException {
-        SiteStructure site = area.getSite();
-        Document source = site.getNode("/index").getLink("en").getDocument();
-        
-        LinkManager linkManager = null;
-        try {
-            linkManager = (LinkManager) getManager().lookup(LinkManager.ROLE);
-            Link[] links = linkManager.getLinksFrom(source);
-            assertTrue(links.length > 0);
-        }
-        finally {
-            if (linkManager != null) {
-                getManager().release(linkManager);
-            }
-        }
-        
-    }
     
 }



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


Mime
View raw message