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/engine TestSpringEngine.java AbstractEngineTest.java
Date Sun, 01 Aug 2004 15:51:07 GMT
weaver      2004/08/01 08:51:07

  Modified:    portal/src/test/org/apache/jetspeed/engine
                        TestSpringEngine.java AbstractEngineTest.java
  Log:
  Make sure a mocked ServletConfig is available during tests
  
  Revision  Changes    Path
  1.2       +6 -2      jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/engine/TestSpringEngine.java
  
  Index: TestSpringEngine.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/engine/TestSpringEngine.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestSpringEngine.java	20 Jul 2004 13:56:34 -0000	1.1
  +++ TestSpringEngine.java	1 Aug 2004 15:51:07 -0000	1.2
  @@ -6,6 +6,8 @@
    */
   package org.apache.jetspeed.engine;
   
  +import javax.servlet.ServletConfig;
  +
   import junit.framework.Test;
   import junit.framework.TestSuite;
   
  @@ -31,6 +33,7 @@
   import org.apache.jetspeed.security.impl.RdbmsPolicy;
   import org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManager;
   import org.apache.jetspeed.userinfo.UserInfoManager;
  +import org.apache.pluto.services.information.StaticInformationProvider;
   
   /**
    * <p>
  @@ -55,7 +58,8 @@
                                        GroupManager.class, RoleManager.class, PermissionManager.class,
RdbmsPolicy.class, SecurityProvider.class,
                                        UserInfoManager.class, NavigationalStateComponent.class,
RequestContextComponent.class, PortletWindowAccessor.class,
                                        PortletRenderer.class, PageAggregator.class, PortletAggregator.class,
ApplicationServerManager.class, "PAM",
  -                                     "deploymentManager"};
  +                                     "deploymentManager", "portletCache", "portletFactory",
"portletFactoryProxy", ServletConfig.class, 
  +                                     StaticInformationProvider.class};
       }
       
       public static Test suite()
  
  
  
  1.2       +6 -2      jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/engine/AbstractEngineTest.java
  
  Index: AbstractEngineTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/engine/AbstractEngineTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractEngineTest.java	20 Jul 2004 13:56:34 -0000	1.1
  +++ AbstractEngineTest.java	1 Aug 2004 15:51:07 -0000	1.2
  @@ -8,11 +8,14 @@
   
   import java.io.FileInputStream;
   
  +import javax.servlet.ServletConfig;
  +
   import junit.framework.TestCase;
   
   import org.apache.commons.configuration.PropertiesConfiguration;
   import org.apache.jetspeed.Jetspeed;
   import org.apache.jetspeed.components.ComponentManagement;
  +import org.jmock.Mock;
   
   /**
    * <p>
  @@ -61,7 +64,8 @@
           System.setProperty("portal.use.internal.jndi", "true");
           PropertiesConfiguration config = new  PropertiesConfiguration();
           config.load(new FileInputStream("./src/webapp/WEB-INF/conf/jetspeed.properties"));

  -        engine = Jetspeed.createEngine(config, "./src/webapp", null, getEngineClass());
  +        Mock servletConfigMock = new Mock(ServletConfig.class);
  +        engine = Jetspeed.createEngine(config, "./src/webapp", (ServletConfig) servletConfigMock.proxy(),
getEngineClass());
       
       }
       protected void tearDown() throws Exception
  
  
  

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