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/tools/pamanager TestJetspeedPortletDescriptor.java
Date Thu, 11 Mar 2004 23:19:26 GMT
jford       2004/03/11 15:19:26

  Modified:    portal/src/test/org/apache/jetspeed/tools/pamanager
                        TestJetspeedPortletDescriptor.java
  Log:
  More tests
  
  Revision  Changes    Path
  1.2       +19 -3     jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/tools/pamanager/TestJetspeedPortletDescriptor.java
  
  Index: TestJetspeedPortletDescriptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/tools/pamanager/TestJetspeedPortletDescriptor.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestJetspeedPortletDescriptor.java	11 Mar 2004 19:23:16 -0000	1.1
  +++ TestJetspeedPortletDescriptor.java	11 Mar 2004 23:19:26 -0000	1.2
  @@ -30,6 +30,11 @@
       private PortletRegistryComponent registry;
       private MutablePicoContainer container;
       
  +    private static final String PORTLET_01 = "HelloWorld Portlet";
  +    private static final String PORTLET_02 = "Display the Portlet Request Information";
  +    private static final String PORTLET_03 = "Pick a number game";
  +    private static final String PORTLET_04 = "Attribute Scope Demo";
  +    
       /**
        * Defines the testcase name for JUnit.
        *
  @@ -99,13 +104,24 @@
           boolean result = JetspeedDescriptorUtilities.loadPortletDescriptor("./test/testdata/deploy/jetspeed-portlet.xml",
app);
           assertTrue(result);
           
  -        PortletDefinitionComposite def = (PortletDefinitionComposite)app.getPortletDefinitionByName("HelloWorld
Portlet");
  +        PortletDefinitionComposite def1 = (PortletDefinitionComposite)app.getPortletDefinitionByName(PORTLET_01);
  +        PortletDefinitionComposite def2 = (PortletDefinitionComposite)app.getPortletDefinitionByName(PORTLET_02);
  +        PortletDefinitionComposite def3 = (PortletDefinitionComposite)app.getPortletDefinitionByName(PORTLET_03);
  +        PortletDefinitionComposite def4 = (PortletDefinitionComposite)app.getPortletDefinitionByName(PORTLET_04);
           
           Collection titles = app.getMetadata().getFields("title");
  -        Collection defTitles = def.getMetadata().getFields("title");
  +        Collection def1Titles = def1.getMetadata().getFields("title");
  +        Collection def2Subjects = def2.getMetadata().getFields("subject");
  +        Collection def3Creators = def3.getMetadata().getFields("creator");
  +        Collection def4Field1 = def4.getMetadata().getFields("field1");
  +        Collection def4Fiels2 = def4.getMetadata().getFields("field2");
           
           assertEquals(titles.size(), 3);
  -        assertEquals(defTitles.size(), 3);
  +        assertEquals(def1Titles.size(), 4);
  +        assertEquals(def2Subjects.size(), 5);
  +        assertEquals(def3Creators.size(), 4);
  +        assertEquals(def4Field1.size(), 3);
  +        assertEquals(def4Fiels2.size(), 2);
       }
   
   }
  
  
  

---------------------------------------------------------------------
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