You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2007/11/15 17:18:14 UTC
svn commit: r595347 -
/lenya/trunk/src/impl/test/org/apache/lenya/cms/publication/DocumentManagerTest.java
Author: andreas
Date: Thu Nov 15 08:17:59 2007
New Revision: 595347
URL: http://svn.apache.org/viewvc?rev=595347&view=rev
Log:
Added failing test for bug 43858
Modified:
lenya/trunk/src/impl/test/org/apache/lenya/cms/publication/DocumentManagerTest.java
Modified: lenya/trunk/src/impl/test/org/apache/lenya/cms/publication/DocumentManagerTest.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/impl/test/org/apache/lenya/cms/publication/DocumentManagerTest.java?rev=595347&r1=595346&r2=595347&view=diff
==============================================================================
--- lenya/trunk/src/impl/test/org/apache/lenya/cms/publication/DocumentManagerTest.java (original)
+++ lenya/trunk/src/impl/test/org/apache/lenya/cms/publication/DocumentManagerTest.java Thu Nov 15 08:17:59 2007
@@ -28,6 +28,7 @@
import org.apache.lenya.cms.site.SiteNode;
import org.apache.lenya.cms.site.SiteStructure;
import org.apache.lenya.cms.site.SiteUtil;
+import org.apache.lenya.util.StringUtil;
/**
* Document manager test.
@@ -122,6 +123,7 @@
Area authoring = pub.getArea("authoring");
SiteNode sourceNode = authoring.getSite().getNode(sourcePath);
+
NodeSet nodes = SiteUtil.getSubSite(getManager(), sourceNode);
Document[] docs = nodes.getDocuments();
Map doc2path = new HashMap();
@@ -144,7 +146,21 @@
assertEquals(newDoc.getContentLength(), docs[i].getContentLength());
assertFalse(newDoc.getUUID().equals(docs[i].getUUID()));
}
+
+ String[] sourceNames = getChildNames(sourceNode);
+ SiteNode targetNode = authoring.getSite().getNode(targetPath);
+ String[] targetNames = getChildNames(targetNode);
+ assertEquals(StringUtil.join(sourceNames, ","), StringUtil.join(targetNames, ","));
}
+
+ protected String[] getChildNames(SiteNode node) {
+ SiteNode[] sourceChildren = node.getChildren();
+ String[] names = new String[sourceChildren.length];
+ for (int i = 0; i < names.length; i++) {
+ names[i] = sourceChildren[i].getName();
+ }
+ return names;
+ }
protected void doTestMoveAll(DocumentManager docManager, String sourcePath, String targetPath)
throws SiteException, DocumentException, PublicationException {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org