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/test JetspeedTestSuite.java
Date Sun, 01 Aug 2004 15:51:19 GMT
weaver      2004/08/01 08:51:19

  Modified:    portal/src/test/org/apache/jetspeed/test
                        JetspeedTestSuite.java
  Log:
  Make sure a mocked ServletConfig is available during tests
  
  Revision  Changes    Path
  1.5       +7 -3      jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/test/JetspeedTestSuite.java
  
  Index: JetspeedTestSuite.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/test/JetspeedTestSuite.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- JetspeedTestSuite.java	20 Jul 2004 13:56:48 -0000	1.4
  +++ JetspeedTestSuite.java	1 Aug 2004 15:51:18 -0000	1.5
  @@ -22,6 +22,8 @@
   import java.util.Properties;
   import java.util.Map.Entry;
   
  +import javax.servlet.ServletConfig;
  +
   import junit.framework.Test;
   import junit.framework.TestResult;
   import junit.framework.TestSuite;
  @@ -30,9 +32,10 @@
   import org.apache.commons.configuration.PropertiesConfiguration;
   import org.apache.jetspeed.Jetspeed;
   import org.apache.jetspeed.engine.Engine;
  -import org.apache.jetspeed.engine.PicoEngine;
   import org.apache.jetspeed.engine.JetspeedEngineConstants;
  +import org.apache.jetspeed.engine.SpringEngine;
   import org.apache.jetspeed.exception.JetspeedException;
  +import org.jmock.Mock;
   
   /**
    * <p>
  @@ -102,7 +105,8 @@
               properties.setProperty(JetspeedEngineConstants.APPLICATION_ROOT_KEY, applicationRoot);
               //properties.setProperty(WEBAPP_ROOT_KEY, null);
               initializeConfiguration(properties, applicationRoot);
  -            engine = Jetspeed.createEngine(properties, applicationRoot, null, PicoEngine.class);
  +            Mock servletConfigMock = new Mock(ServletConfig.class);
  +            engine = Jetspeed.createEngine(properties, applicationRoot, (ServletConfig)
servletConfigMock.proxy(), SpringEngine.class);
   
           }
           catch (Exception e)
  
  
  

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