portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wea...@apache.org
Subject cvs commit: jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/container TestPortletContainer.java
Date Thu, 27 May 2004 19:55:52 GMT
weaver      2004/05/27 12:55:52

  Modified:    portal/src/test/org/apache/jetspeed/container
                        TestPortletContainer.java
  Log:
  JS2-59 <http://nagoya.apache.org/jira/browse/JS2-59>
  
  Revision  Changes    Path
  1.3       +11 -17    jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/container/TestPortletContainer.java
  
  Index: TestPortletContainer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/container/TestPortletContainer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestPortletContainer.java	17 Mar 2004 22:23:06 -0000	1.2
  +++ TestPortletContainer.java	27 May 2004 19:55:52 -0000	1.3
  @@ -16,10 +16,11 @@
   package org.apache.jetspeed.container;
   
   import junit.framework.Test;
  +import junit.framework.TestCase;
  +import junit.framework.TestSuite;
   
  -import org.apache.jetspeed.components.AbstractComponentAwareTestCase;
  -import org.apache.jetspeed.components.ComponentAwareTestSuite;
   import org.apache.pluto.PortletContainer;
  +import org.apache.pluto.PortletContainerImpl;
   import org.picocontainer.MutablePicoContainer;
   
   /**
  @@ -28,7 +29,7 @@
    * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
    * @version $Id$
    */
  -public class TestPortletContainer extends AbstractComponentAwareTestCase 
  +public class TestPortletContainer extends TestCase 
   {
       private MutablePicoContainer container;
       private PortletContainer portletContainer;
  @@ -56,26 +57,19 @@
       protected void setUp() throws Exception
       {
           super.setUp();
  -        container = (MutablePicoContainer) getContainer();
  -        portletContainer = (PortletContainer) container.getComponentInstance(PortletContainer.class);
       
  +        
  +        portletContainer = new JetspeedPortletContainerWrapper(new PortletContainerImpl());
       }
   
  -    /**
  -     * Creates the test suite.
  -     *
  -     * @return a test suite (<code>TestSuite</code>) that includes all methods
  -     *         starting with "test"
  -     */
  -    public static Test suite()
  +   public static Test suite()
       {
  -        ComponentAwareTestSuite suite = new ComponentAwareTestSuite(TestPortletContainer.class);
  -        suite.setScript("org/apache/jetspeed/containers/portlet-container.groovy");
  -        return suite;
  +        // All methods starting with "test" will be executed in the test suite.
  +        return new TestSuite(TestPortletContainer.class);
       }
   
       public void testBasic()
       {
  -        assertNotNull("portlet container is null", portletContainer);
  +        
           // not much more i can do without setting up a mock servlet or portlet framework
       }
   }
  
  
  

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