You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by dl...@apache.org on 2004/05/07 15:42:14 UTC
cvs commit: jakarta-jetspeed-2/components/registry/src/test/org/apache/jetspeed/components/portletregistry TestRegistryDirect.java TestRegistryDirectPart2.java
dlestrat 2004/05/07 06:42:14
Modified: components/registry/src/test/org/apache/jetspeed/components/portletregistry
TestRegistryDirect.java
TestRegistryDirectPart2.java
Log:
PLT 17: Fixes in loading user-attributes.
Revision Changes Path
1.7 +6 -5 jakarta-jetspeed-2/components/registry/src/test/org/apache/jetspeed/components/portletregistry/TestRegistryDirect.java
Index: TestRegistryDirect.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed-2/components/registry/src/test/org/apache/jetspeed/components/portletregistry/TestRegistryDirect.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- TestRegistryDirect.java 27 Apr 2004 00:39:23 -0000 1.6
+++ TestRegistryDirect.java 7 May 2004 13:42:14 -0000 1.7
@@ -126,6 +126,9 @@
PortletApplicationDefinitionImpl app = new PortletApplicationDefinitionImpl();
app.setName("App_1");
app.setApplicationIdentifier("App_1");
+
+ UserAttribute ua = new UserAttributeImpl("user.name.family", "User Last Name");
+ app.addUserAttribute(ua);
addDublinCore(app.getMetadata());
@@ -151,9 +154,6 @@
pc.addDescription(JetspeedLocale.getDefaultLocale(), "Preference Description");
portlet.addPreference(pc);
- UserAttribute ua = new UserAttributeImpl("user.name.family", "User Last Name");
- portlet.addUserAttribute(ua);
-
portlet.addLanguage(registry.createLanguage(Locale.getDefault(), "Portlet 1", "Portlet 1", "This is Portlet 1", null));
ContentTypeComposite html = new ContentTypeImpl();
@@ -189,6 +189,8 @@
assertNotNull("Failed to reteive portlet application via registry", registry.getPortletApplication("App_1"));
assertNotNull("Web app was not saved along with the portlet app.", webApp);
assertNotNull("Portlet was not saved along with the portlet app.", app.getPortletDefinitionByName("Portlet 1"));
+ assertTrue("\"user.name.family\" user attribute was not found.", app.getUserAttributes().size() == 1);
+
portlet = (PortletDefinitionComposite) registry.getPortletDefinitionByUniqueName("App_1::Portlet 1");
assertNotNull("Portlet could not be retreived by unique name.", portlet);
@@ -202,7 +204,6 @@
assertNotNull("display name was not materialized for the portlet.", portlet.getDisplayName(Locale.getDefault()));
assertNotNull("\"testparam\" portlet parameter was not saved", portlet.getInitParameterSet().get("testparam"));
assertNotNull("\"preference 1\" was not found.", portlet.getPreferenceSet().get("preference 1"));
- assertTrue("\"user.name.family\" user attribute was not found.", portlet.getUserAttributeSet().size() == 1);
assertNotNull("Language information not found for Portlet 1", portlet.getLanguageSet().get(Locale.getDefault()));
assertNotNull("Content Type html not found.", portlet.getContentTypeSet().get("html/text"));
assertNotNull("Content Type wml not found.", portlet.getContentTypeSet().get("wml"));
1.8 +2 -2 jakarta-jetspeed-2/components/registry/src/test/org/apache/jetspeed/components/portletregistry/TestRegistryDirectPart2.java
Index: TestRegistryDirectPart2.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed-2/components/registry/src/test/org/apache/jetspeed/components/portletregistry/TestRegistryDirectPart2.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- TestRegistryDirectPart2.java 27 Apr 2004 00:42:37 -0000 1.7
+++ TestRegistryDirectPart2.java 7 May 2004 13:42:14 -0000 1.8
@@ -134,6 +134,7 @@
assertNotNull("Failed to reteive portlet application via registry", registry.getPortletApplication("App_1"));
assertNotNull("Web app was not saved along with the portlet app.", webApp);
assertNotNull("Portlet was not saved along with the portlet app.", app.getPortletDefinitionByName("Portlet 1"));
+ assertTrue("\"user.name.family\" user attribute was not found.", app.getUserAttributes().size() == 1);
portlet = (PortletDefinitionComposite) registry.getPortletDefinitionByUniqueName("App_1::Portlet 1");
assertNotNull("Portlet could not be retreived by unique name.", portlet);
@@ -146,7 +147,6 @@
assertNotNull("display name was not materialized for the portlet.", portlet.getDisplayName(Locale.getDefault()));
assertNotNull("\"testparam\" portlet parameter was not saved", portlet.getInitParameterSet().get("testparam"));
assertNotNull("\"preference 1\" was not found.", portlet.getPreferenceSet().get("preference 1"));
- assertTrue("\"user.name.family\" user attribute was not found.", portlet.getUserAttributeSet().size() == 1);
assertNotNull("Language information not found for Portlet 1", portlet.getLanguageSet().get(Locale.getDefault()));
assertNotNull("Content Type html not found.", portlet.getContentTypeSet().get("html/text"));
assertNotNull("Content Type wml not found.", portlet.getContentTypeSet().get("wml"));
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org