vmassol     01/10/19 14:11:34

  Modified:    docs/framework/xdocs changes.xml how_it_works.xml
                        howto_ide_jbuilder.xml mockobjects.xml
               src/framework/share/org/apache/cactus AbstractTestCase.java
               src/framework/share/org/apache/cactus/client
                        AbstractHttpClient.java
               src/test/share/org/apache/cactus TestAbstractTestCase.java
                        TestAbstractTestCase_InterceptorTestCase.java
  Log:
  removed ServletTestRequest (it was deprecated in 1.2 and is now removed in 1.3)
  
  Revision  Changes    Path
  1.54      +7 -0      jakarta-cactus/docs/framework/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/docs/framework/xdocs/changes.xml,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- changes.xml       2001/09/25 09:18:06     1.53
  +++ changes.xml       2001/10/19 21:11:34     1.54
  @@ -117,6 +117,13 @@
         <person name="Nicholas Lesiecki" email="[EMAIL PROTECTED]" id="NDL"/>
       </devs>
   
  +    <release version="1.3 in CVS">
  +      <action dev="VMA" type="remove">
  +        Removed <code>ServletTestRequest</code>. It was deprecated in version 1.2 
and is now
  +        removed in 1.3. You should use <code>WebRequest</code> instead.
  +      </action>
  +    </release>
  +
       <release version="1.2" date="September 25 2001">
         <action dev="NDL" type="add">
           Added code sample for unit testing tag libs.
  
  
  
  1.4       +3 -3      jakarta-cactus/docs/framework/xdocs/how_it_works.xml
  
  Index: how_it_works.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/docs/framework/xdocs/how_it_works.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- how_it_works.xml  2001/09/25 14:27:20     1.3
  +++ how_it_works.xml  2001/10/19 21:11:34     1.4
  @@ -33,9 +33,9 @@
           <li>
             The JUnit Test Runner calls a <code>YYYTestCase.runTest()</code>
             method. This method looks for a
  -          <code>beginXXX(ServletTestRequest)</code> method and executes it if
  +          <code>beginXXX(WebRequest)</code> method and executes it if
             one is found. This is executed on the client side (i.e. not in a
  -          server engine). The <code>ServletTestRequest</code>
  +          server engine). The <code>WebRequest</code>
             parameter passed to the <code>beginXXX()</code> method is used
             to set the HTTP headers, the HTTP parameters, ... that will be
             sent in step 2 to the Redirector proxy.
  @@ -78,7 +78,7 @@
               <li>
                 creates an HTTP Session if the user has expressed the wish
                 (using the
  -              <code>ServletTestRequest.setAutomaticSession(boolean)</code>
  +              <code>WebRequest.setAutomaticSession(boolean)</code>
                 code in the <code>beginXXX()</code> method. By default a session
                 is always created) and the redirector fills by reflection the
                 <code>session</code> implicit object.
  
  
  
  1.5       +1 -1      jakarta-cactus/docs/framework/xdocs/howto_ide_jbuilder.xml
  
  Index: howto_ide_jbuilder.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/docs/framework/xdocs/howto_ide_jbuilder.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- howto_ide_jbuilder.xml    2001/09/22 19:19:55     1.4
  +++ howto_ide_jbuilder.xml    2001/10/19 21:11:34     1.5
  @@ -184,7 +184,7 @@
           <p>
             If you right click on the file containing your test case and click on 
<code>debug</code>,
             you can stop at breakpoints on methods that are executed on the client 
side like
  -          <code>void endXXX(HttpURLConnection)</code> or <code>void 
beginXXX(ServletTestRequest)</code>
  +          <code>void endXXX(WebResponse)</code> or <code>void 
beginXXX(WebRequest)</code>
           </p>
         </s2>
       </s1>
  
  
  
  1.7       +3 -3      jakarta-cactus/docs/framework/xdocs/mockobjects.xml
  
  Index: mockobjects.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/docs/framework/xdocs/mockobjects.xml,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- mockobjects.xml   2001/09/22 19:19:55     1.6
  +++ mockobjects.xml   2001/10/19 21:11:34     1.7
  @@ -96,7 +96,7 @@
       MyServlet myServlet = new MyServlet();
   [...]
   
  -public void beginXXX(ServletTestRequest theRequest)
  +public void beginXXX(WebRequest theRequest)
   {
       theRequest.addParameter("param1", "value1");
       theRequest.addParameter("param2", "value2");
  @@ -110,9 +110,9 @@
       assertEquals("some value", session.getAttribute("some_name_set_in_mymethod"));
   }
   
  -public void endXXX()
  +public void endXXX(WebResponse theResponse)
   {
  -    String result = AssertUtils.getResponseAsString(theConnection);
  +    String result = theResponse.getText();
       assertEquals("<html><head/><body>A GET request</body></html>", result);
   }
   
  
  
  
  1.11      +6 -6      
jakarta-cactus/src/framework/share/org/apache/cactus/AbstractTestCase.java
  
  Index: AbstractTestCase.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-cactus/src/framework/share/org/apache/cactus/AbstractTestCase.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- AbstractTestCase.java     2001/09/21 09:10:57     1.10
  +++ AbstractTestCase.java     2001/10/19 21:11:34     1.11
  @@ -72,7 +72,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Vincent Massol</a>
    *
  - * @version $Id: AbstractTestCase.java,v 1.10 2001/09/21 09:10:57 vmassol Exp $
  + * @version $Id: AbstractTestCase.java,v 1.11 2001/10/19 21:11:34 vmassol Exp $
    */
   public abstract class AbstractTestCase extends TestCase
   {
  @@ -133,7 +133,7 @@
   
       /**
        * @return the name of the test begin method to call that initialize the
  -     *         test by initializing the <code>ServletTestRequest</code> object
  +     *         test by initializing the <code>WebRequest</code> object
        *         for the test case.
        */
       protected String getBeginMethodName()
  @@ -154,10 +154,10 @@
       /**
        * Call the test case begin method
        *
  -     * @param theRequest the <code>ServletTestRequest</code> object to
  +     * @param theRequest the <code>WebRequest</code> object to
        *                   pass to the begin method.
        */
  -    protected void callBeginMethod(ServletTestRequest theRequest)
  +    protected void callBeginMethod(WebRequest theRequest)
           throws Throwable
       {
           // First, verify if a begin method exist. If one is found, verify if
  @@ -225,7 +225,7 @@
        *        codes, headers, cookies can be checked using the get methods of
        *        this object.
        */
  -    protected void callEndMethod(ServletTestRequest theRequest,
  +    protected void callEndMethod(WebRequest theRequest,
           HttpURLConnection theConnection) throws Throwable
       {
           // First, verify if an end method exist. If one is found, verify if
  @@ -400,7 +400,7 @@
           logger.debug("Test case = " + currentTestMethod);
   
           // Call the begin method to fill the request object
  -        ServletTestRequest request = new ServletTestRequest();
  +        WebRequest request = new WebRequest();
           callBeginMethod(request);
   
           // Add the class name, the method name, the URL to simulate and
  
  
  
  1.9       +3 -3      
jakarta-cactus/src/framework/share/org/apache/cactus/client/AbstractHttpClient.java
  
  Index: AbstractHttpClient.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-cactus/src/framework/share/org/apache/cactus/client/AbstractHttpClient.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- AbstractHttpClient.java   2001/09/14 20:14:40     1.8
  +++ AbstractHttpClient.java   2001/10/19 21:11:34     1.9
  @@ -67,7 +67,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Vincent Massol</a>
    *
  - * @version $Id: AbstractHttpClient.java,v 1.8 2001/09/14 20:14:40 pier Exp $
  + * @version $Id: AbstractHttpClient.java,v 1.9 2001/10/19 21:11:34 vmassol Exp $
    */
   public abstract class AbstractHttpClient
   {
  @@ -113,7 +113,7 @@
        * @exception Throwable if an error occured in the test method or in the
        *                      redirector servlet.
        */
  -    public HttpURLConnection doTest(ServletTestRequest theRequest)
  +    public HttpURLConnection doTest(WebRequest theRequest)
           throws Throwable
       {
           logger.entry("doTest(" + theRequest + ")");
  @@ -139,7 +139,7 @@
           HttpClientHelper helper2 =
                   new HttpClientHelper(getRedirectorURL());
   
  -        ServletTestRequest resultsRequest = new ServletTestRequest();
  +        WebRequest resultsRequest = new WebRequest();
           resultsRequest.addParameter(ServiceDefinition.SERVICE_NAME_PARAM,
               ServiceEnumeration.GET_RESULTS_SERVICE.toString());
           HttpURLConnection resultConnection = helper2.connect(resultsRequest);
  
  
  
  1.5       +4 -26     
jakarta-cactus/src/test/share/org/apache/cactus/TestAbstractTestCase.java
  
  Index: TestAbstractTestCase.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-cactus/src/test/share/org/apache/cactus/TestAbstractTestCase.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestAbstractTestCase.java 2001/09/14 20:26:12     1.4
  +++ TestAbstractTestCase.java 2001/10/19 21:11:34     1.5
  @@ -66,7 +66,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Vincent Massol</a>
    *
  - * @version $Id: TestAbstractTestCase.java,v 1.4 2001/09/14 20:26:12 pier Exp $
  + * @version $Id: TestAbstractTestCase.java,v 1.5 2001/10/19 21:11:34 vmassol Exp $
    */
   public class TestAbstractTestCase extends
       TestAbstractTestCase_InterceptorTestCase
  @@ -223,44 +223,22 @@
       //-------------------------------------------------------------------------
   
       /**
  -     * Verify that the deprecated begin method with a
  -     * <code>ServletTestRequest</code> parameter is still supported.
  -     */
  -    public void beginBeginMethodOK1(ServletTestRequest theRequest)
  -    {
  -        // We send an exception just to verify that this code has been reached
  -        // The exception is intercepted in
  -        // TestAbstractTestCase_InterceptorTestCase
  -        fail("beginBeginMethodOK1");
  -    }
  -
  -    /**
  -     * Verify that the deprecated begin method with a
  -     * <code>ServletTestRequest</code> parameter is still supported.
  -     */
  -    public void testBeginMethodOK1()
  -    {
  -    }
  -
  -    //-------------------------------------------------------------------------
  -
  -    /**
        * Verify that the begin method with a
        * <code>WebRequest</code> parameter is called correctly.
        */
  -    public void beginBeginMethodOK2(WebRequest theRequest)
  +    public void beginBeginMethodOK(WebRequest theRequest)
       {
           // We send an exception just to verify that this code has been reached
           // The exception is intercepted in
           // TestAbstractTestCase_InterceptorTestCase
  -        fail("beginBeginMethodOK2");
  +        fail("beginBeginMethodOK");
       }
   
       /**
        * Verify that the begin method with a
        * <code>WebRequest</code> parameter is called correctly.
        */
  -    public void testBeginMethodOK2()
  +    public void testBeginMethodOK()
       {
       }
   
  
  
  
  1.6       +4 -11     
jakarta-cactus/src/test/share/org/apache/cactus/TestAbstractTestCase_InterceptorTestCase.java
  
  Index: TestAbstractTestCase_InterceptorTestCase.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-cactus/src/test/share/org/apache/cactus/TestAbstractTestCase_InterceptorTestCase.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TestAbstractTestCase_InterceptorTestCase.java     2001/09/14 20:26:23     1.5
  +++ TestAbstractTestCase_InterceptorTestCase.java     2001/10/19 21:11:34     1.6
  @@ -68,7 +68,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Vincent Massol</a>
    *
  - * @version $Id: TestAbstractTestCase_InterceptorTestCase.java,v 1.5 2001/09/14 
20:26:23 pier Exp $
  + * @version $Id: TestAbstractTestCase_InterceptorTestCase.java,v 1.6 2001/10/19 
21:11:34 vmassol Exp $
    */
   public class TestAbstractTestCase_InterceptorTestCase
       extends AbstractTestCase
  @@ -90,7 +90,7 @@
        {
           try {
               // Call the begin method
  -            ServletTestRequest request = new ServletTestRequest();
  +            WebRequest request = new WebRequest();
               callBeginMethod(request);
   
               // Create a mock HttpURLConnection as it is needed by HttpUnit
  @@ -156,17 +156,10 @@
                   return;
               }
   
  -            // Verify that the deprecated begin method with a
  -            // <code>ServletTestRequest</code> parameter is still supported.
  -            if (name().equals("testBeginMethodOK1")) {
  -                assertEquals("beginBeginMethodOK1", e.getMessage());
  -                return;
  -            }
  -
               // Verify that the begin method with a
               // <code>WebRequest</code> parameter is called correctly.
  -            if (name().equals("testBeginMethodOK2")) {
  -                assertEquals("beginBeginMethodOK2", e.getMessage());
  +            if (name().equals("testBeginMethodOK")) {
  +                assertEquals("beginBeginMethodOK", e.getMessage());
                   return;
               }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to