[jboss-svn-commits] JBoss Portal SVN: r5574 - in trunk: testsuite theme/src/main/org/jboss/portal/test/theme theme/src/resources/test/xml

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Nov 3 09:51:47 EST 2006


Author: roy.russo at jboss.com
Date: 2006-11-03 09:51:46 -0500 (Fri, 03 Nov 2006)
New Revision: 5574

Modified:
   trunk/testsuite/build.xml
   trunk/theme/src/main/org/jboss/portal/test/theme/TestLayoutServiceImpl.java
   trunk/theme/src/resources/test/xml/portal-layouts.xml
Log:
JBPORTAL-1099 - added theme service tests, added theme tests to testsuite

Modified: trunk/testsuite/build.xml
===================================================================
--- trunk/testsuite/build.xml	2006-11-03 14:34:33 UTC (rev 5573)
+++ trunk/testsuite/build.xml	2006-11-03 14:51:46 UTC (rev 5574)
@@ -146,6 +146,9 @@
             <param name="module" value="wsrp"/>
          </antcall>
          <antcall target="internal-test-module">
+            <param name="module" value="theme"/>
+         </antcall>
+         <antcall target="internal-test-module">
             <param name="module" value="core"/>
          </antcall>
          <antcall target="agent-undeploy"/>
@@ -185,6 +188,8 @@
          <fileset dir="../identity" includes="output/tests/TEST-*.xml,output/tests/TEST-*.txt"/>
          <fileset dir="../wsrp" includes="*.log"/>
          <fileset dir="../wsrp" includes="output/tests/TEST-*.xml,output/tests/TEST-*.txt"/>
+         <fileset dir="../theme" includes="*.log"/>
+         <fileset dir="../theme" includes="output/tests/TEST-*.xml,output/tests/TEST-*.txt"/>
       </delete>
       <!-- remove testsuite output dir -->
       <delete includeEmptyDirs="true" quiet="true">

Modified: trunk/theme/src/main/org/jboss/portal/test/theme/TestLayoutServiceImpl.java
===================================================================
--- trunk/theme/src/main/org/jboss/portal/test/theme/TestLayoutServiceImpl.java	2006-11-03 14:34:33 UTC (rev 5573)
+++ trunk/theme/src/main/org/jboss/portal/test/theme/TestLayoutServiceImpl.java	2006-11-03 14:51:46 UTC (rev 5574)
@@ -94,9 +94,24 @@
 
    public void testGetLayoutInfos()
    {
-      // TODO
+      PortalLayout layout = layoutService.getLayout("nodesk", true);
+      assertTrue(layout.getLayoutInfo().getName().equals("nodesk"));
+      assertTrue(layout.getLayoutInfo().getURI().equals("/nodesk/index.jsp"));
+      assertTrue(layout.getLayoutInfo().getRegionNames().size() == 0);
+
+      layout = layoutService.getLayout("phalanx", true);
+      assertTrue(layout.getLayoutInfo().getName().equals("phalanx"));
+      assertNull(layout.getLayoutInfo().getURI());
+
+      layout = layoutService.getLayout("generic", true);
+      assertTrue(layout.getLayoutInfo().getName().equals("generic"));
+      assertTrue(layout.getLayoutInfo().getRegionNames().size() == 3);
+      List regions = layout.getLayoutInfo().getRegionNames();
+      assertTrue(regions.get(0).equals("left"));
+      assertTrue(regions.get(1).equals("center"));
+      assertTrue(regions.get(2).equals("navigation"));
    }
-   
+
    public void testRemoveLayouts()
    {
       try

Modified: trunk/theme/src/resources/test/xml/portal-layouts.xml
===================================================================
--- trunk/theme/src/resources/test/xml/portal-layouts.xml	2006-11-03 14:34:33 UTC (rev 5573)
+++ trunk/theme/src/resources/test/xml/portal-layouts.xml	2006-11-03 14:51:46 UTC (rev 5574)
@@ -27,14 +27,18 @@
       <name>nodesk</name>
       <uri>/nodesk/index.jsp</uri>
       <uri state="maximized">/nodesk/index.jsp</uri>
+<!--
       <regions>
          <region name="left"/>
          <region name="center"/>
       </regions>
+-->
    </layout>
    <layout>
       <name>phalanx</name>
+<!--
       <uri>/phalanx/index.jsp</uri>
+-->
       <uri state="maximized">/phalanx/index.jsp</uri>
       <regions>
          <region name="left"/>




More information about the jboss-svn-commits mailing list