portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject cvs commit: jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/tools/pamanager TestPortletDescriptor.java
Date Tue, 18 Nov 2003 02:51:29 GMT
taylor      2003/11/17 18:51:29

  Modified:    portal/src/test/org/apache/jetspeed/tools/pamanager
                        TestPortletDescriptor.java
  Log:
  Portlet Descriptor test was dependent on the default locale being english, which was not
always the case.
  Changed test to explicitly use english to find the correct resource
  
  Revision  Changes    Path
  1.8       +5 -6      jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/tools/pamanager/TestPortletDescriptor.java
  
  Index: TestPortletDescriptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/tools/pamanager/TestPortletDescriptor.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- TestPortletDescriptor.java	18 Oct 2003 20:48:27 -0000	1.7
  +++ TestPortletDescriptor.java	18 Nov 2003 02:51:29 -0000	1.8
  @@ -54,7 +54,7 @@
   package org.apache.jetspeed.tools.pamanager;
   
   import java.util.Iterator;
  -
  +import java.util.Locale;
   import javax.portlet.PortletMode;
   
   import junit.framework.Test;
  @@ -62,7 +62,6 @@
   import junit.textui.TestRunner;
   
   import org.apache.commons.configuration.Configuration;
  -import org.apache.jetspeed.Jetspeed;
   import org.apache.jetspeed.cps.CommonPortletServices;
   import org.apache.jetspeed.om.common.MutableLanguage;
   import org.apache.jetspeed.om.common.ParameterComposite;
  @@ -182,7 +181,7 @@
           assertTrue("Portlet.Expiration invalid: " + portlet.getExpirationCache(), portlet.getExpirationCache().equals("-1"));
   
           // Display Name                
  -        DisplayName displayName = portlet.getDisplayName(Jetspeed.getDefaultLocale());
  +        DisplayName displayName = portlet.getDisplayName(Locale.ENGLISH);
           assertNotNull("Display Name is null", displayName);
           assertTrue(
               "Portlet.DisplayName invalid: " + displayName.getDisplayName(),
  @@ -198,8 +197,8 @@
               assertTrue("InitParam.Name invalid: " + parameter.getName(), parameter.getName().equals("hello"));
               assertTrue("InitParam.Value invalid: " + parameter.getValue(), parameter.getValue().equals("Hello
Portlet"));
               assertTrue(
  -                "InitParam.Description invalid: " + parameter.getDescription(Jetspeed.getDefaultLocale()),
  -                parameter.getDescription(Jetspeed.getDefaultLocale()).getDescription().equals("test
init param"));
  +                "InitParam.Description invalid: " + parameter.getDescription(Locale.ENGLISH),
  +                parameter.getDescription(Locale.ENGLISH).getDescription().equals("test
init param"));
               count++;
           }
           assertTrue("InitParam Count != 1, count = " + count, count == 1);
  
  
  

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