[jboss-cvs] jboss-portal/portlet/src/main/org/jboss/portal/portlet/test ...

Julien Viet julien at jboss.com
Sun Jul 30 08:36:23 EDT 2006


  User: julien  
  Date: 06/07/30 08:36:23

  Modified:    portlet/src/main/org/jboss/portal/portlet/test   
                        PortletController.java
  Added:       portlet/src/main/org/jboss/portal/portlet/test   
                        ValueMapAssert.java
  Removed:     portlet/src/main/org/jboss/portal/portlet/test   
                        TestProducerStateStore.java
  Log:
  JBPORTAL-973 : Portlet instance container integration testing
  JBPORTAL-972 : Portlet stateful invoker testing
  
  Revision  Changes    Path
  1.74      +3 -3      jboss-portal/portlet/src/main/org/jboss/portal/portlet/test/PortletController.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: PortletController.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-portal/portlet/src/main/org/jboss/portal/portlet/test/PortletController.java,v
  retrieving revision 1.73
  retrieving revision 1.74
  diff -u -b -r1.73 -r1.74
  --- PortletController.java	12 Jul 2006 09:29:55 -0000	1.73
  +++ PortletController.java	30 Jul 2006 12:36:23 -0000	1.74
  @@ -83,7 +83,7 @@
   
   /**
    * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
  - * @version $Revision: 1.73 $
  + * @version $Revision: 1.74 $
    */
   public class PortletController extends AbstractJBossService implements RequestController
   {
  @@ -401,12 +401,12 @@
            return portletId;
         }
   
  -      public void portletCloned(String portletId, String cloneId)
  +      public void portletCloned(String cloneId)
         {
            req.getSession().setAttribute(CLONE_OF + portletId, cloneId);
         }
   
  -      public void portletCloned(String portletId, byte[] state)
  +      public void portletCloned(byte[] state)
         {
            throw new UnsupportedOperationException("NYI");
         }
  
  
  
  1.1      date: 2006/07/30 12:36:23;  author: julien;  state: Exp;jboss-portal/portlet/src/main/org/jboss/portal/portlet/test/ValueMapAssert.java
  
  Index: ValueMapAssert.java
  ===================================================================
  /*
  * JBoss, Home of Professional Open Source
  * Copyright 2005, JBoss Inc., and individual contributors as indicated
  * by the @authors tag. See the copyright.txt in the distribution for a
  * full listing of individual contributors.
  *
  * This is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as
  * published by the Free Software Foundation; either version 2.1 of
  * the License, or (at your option) any later version.
  *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this software; if not, write to the Free
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  */
  package org.jboss.portal.portlet.test;
  
  import junit.framework.Assert;
  import org.jboss.portal.common.value.ValueMap;
  import org.jboss.portal.common.value.Value;
  
  import java.util.HashSet;
  import java.util.Iterator;
  
  /**
   * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
   * @version $Revision: 1.1 $
   */
  public class ValueMapAssert extends Assert
  {
     public static void assertEquals(ValueMap vm1, ValueMap vm2)
     {
        if (vm1 == null)
        {
           if (vm2 != null)
           {
              fail("Value map should be null");
           }
        }
        else
        {
           if (vm2 == null)
           {
              fail("Value map should not be null");
           }
           assertEquals("Value maps don't have the same keys", new HashSet(vm1.getKeys()), new HashSet(vm2.getKeys()));
           for (Iterator i = vm1.getKeys().iterator(); i.hasNext();)
           {
              String key = (String)i.next();
              Value v1 = vm1.getValue(key);
              Value v2 = vm2.getValue(key);
              assertEquals("Values for key " + key + " are not equals", v1, v2);
           }
        }
     }
  
  
  }
  
  
  



More information about the jboss-cvs-commits mailing list