portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jf...@apache.org
Subject cvs commit: jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/page TestCastorXmlPageManager.java
Date Thu, 25 Mar 2004 22:28:49 GMT
jford       2004/03/25 14:28:49

  Modified:    portal/src/test/org/apache/jetspeed/page
                        TestCastorXmlPageManager.java
  Log:
  Updated test with metadata checks
  
  Revision  Changes    Path
  1.7       +11 -1     jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/page/TestCastorXmlPageManager.java
  
  Index: TestCastorXmlPageManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/page/TestCastorXmlPageManager.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TestCastorXmlPageManager.java	15 Mar 2004 19:38:01 -0000	1.6
  +++ TestCastorXmlPageManager.java	25 Mar 2004 22:28:49 -0000	1.7
  @@ -16,12 +16,14 @@
   package org.apache.jetspeed.page;
   
   // Java imports
  +import java.util.Collection;
   import java.util.List;
   
   import junit.framework.Test;
   import junit.framework.TestSuite;
   
   import org.apache.jetspeed.PortalComponentAssemblyTestCase;
  +import org.apache.jetspeed.om.common.GenericMetadata;
   import org.apache.jetspeed.om.page.Fragment;
   import org.apache.jetspeed.om.page.Page;
   import org.apache.jetspeed.om.page.Property;
  @@ -109,6 +111,13 @@
           assertTrue(testpage.getDefaultSkin().equals("test-skin"));
           assertTrue(testpage.getDefaultDecorator(Fragment.LAYOUT).equals("test-layout"));
           assertTrue(testpage.getDefaultDecorator(Fragment.PORTLET).equals("test-portlet"));
  +        
  +        GenericMetadata md = testpage.getMetadata();
  +        Collection descriptions = md.getFields("description");
  +        Collection subjects = md.getFields("subject");
  +        assertEquals(2, descriptions.size());
  +        assertEquals(1, subjects.size());
  +        
   
           Fragment root = testpage.getRootFragment();
           assertNotNull(root);
  @@ -157,6 +166,7 @@
           assertTrue(f.getFragments().size() == 2);
       }
   
  +    
       public void testRegisterPage() throws Exception
       {
           PageManager pm = (PageManager)componentManager.getComponent("CastorXmlPageManager");
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message