[gatein-commits] gatein SVN: r6177 - components/pc/trunk/portlet/src/test/java/org/gatein/pc/test/portlet/state.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Apr 7 15:57:54 EDT 2011


Author: chris.laprun at jboss.com
Date: 2011-04-07 15:57:54 -0400 (Thu, 07 Apr 2011)
New Revision: 6177

Modified:
   components/pc/trunk/portlet/src/test/java/org/gatein/pc/test/portlet/state/AbstractStatefulPortletInvokerTestCase.java
Log:
- GTNPC-58:  Fixed improper tests that were actually passing due to too lenient implementation of PortletContext.

Modified: components/pc/trunk/portlet/src/test/java/org/gatein/pc/test/portlet/state/AbstractStatefulPortletInvokerTestCase.java
===================================================================
--- components/pc/trunk/portlet/src/test/java/org/gatein/pc/test/portlet/state/AbstractStatefulPortletInvokerTestCase.java	2011-04-07 17:25:59 UTC (rev 6176)
+++ components/pc/trunk/portlet/src/test/java/org/gatein/pc/test/portlet/state/AbstractStatefulPortletInvokerTestCase.java	2011-04-07 19:57:54 UTC (rev 6177)
@@ -1099,10 +1099,8 @@
 
       PortletContext portletContext = importedPortlet.getContext();
 
-      //make sure the expected portlet context and the one we get back from the import are the same
-//      assertEquals(originalPortletContext.getComponents().getApplicationName(), portletContext.getComponents().getApplicationName());
-//      assertEquals(originalPortletContext.getComponents().getPortletName(), portletContext.getComponents().getPortletName());
-      assertEquals(originalPortletContext, portletContext);
+      //check that the portlet info for the original and new imported portlet are the same (which is assumed to ensure that the contexts refer to the same portlet)
+      assertEquals(getPortlet(originalPortletContext).getInfo(), getPortlet(portletContext).getInfo());
 
       if (originalPortletContext instanceof StatefulPortletContext)
       {



More information about the gatein-commits mailing list