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 2008/03/24 18:24:48 UTC

svn commit: r640473 - /lenya/trunk/src/impl/test/org/apache/lenya/cms/publication/PublicationTest.java

Author: andreas
Date: Mon Mar 24 10:24:47 2008
New Revision: 640473

URL: http://svn.apache.org/viewvc?rev=640473&view=rev
Log:
Updateing publication test to template handling changes.

Modified:
    lenya/trunk/src/impl/test/org/apache/lenya/cms/publication/PublicationTest.java

Modified: lenya/trunk/src/impl/test/org/apache/lenya/cms/publication/PublicationTest.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/impl/test/org/apache/lenya/cms/publication/PublicationTest.java?rev=640473&r1=640472&r2=640473&view=diff
==============================================================================
--- lenya/trunk/src/impl/test/org/apache/lenya/cms/publication/PublicationTest.java (original)
+++ lenya/trunk/src/impl/test/org/apache/lenya/cms/publication/PublicationTest.java Mon Mar 24 10:24:47 2008
@@ -81,12 +81,12 @@
 
         Set typeSet = new HashSet(Arrays.asList(types));
 
-        String[] templateIds = pub.getTemplateIds();
-        for (int i = 0; i < templateIds.length; i++) {
-            Publication template = pub.getFactory().getPublication(templateIds[i]);
+        String templateId = pub.getTemplateId();
+        if (templateId != null) {
+            Publication template = pub.getFactory().getPublication(templateId);
             String[] templateTypes = template.getResourceTypeNames();
             for (int t = 0; t < templateTypes.length; t++) {
-                assertTrue(typeSet.contains(templateTypes[i]));
+                assertTrue(typeSet.contains(templateTypes[t]));
             }
         }
 



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