rwaldhoff    01/08/13 08:57:43

  Modified:    httpclient/src/test/org/apache/commons/httpclient Tag:
                        rlwrefactoring TestGetMethodLocal.java
  Log:
  make host value variable
  some other trivial changes
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.2   +13 -11    
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/Attic/TestGetMethodLocal.java
  
  Index: TestGetMethodLocal.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/Attic/TestGetMethodLocal.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- TestGetMethodLocal.java   2001/08/11 00:39:16     1.1.2.1
  +++ TestGetMethodLocal.java   2001/08/13 15:57:43     1.1.2.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/Attic/TestGetMethodLocal.java,v
 1.1.2.1 2001/08/11 00:39:16 rwaldhoff Exp $
  - * $Revision: 1.1.2.1 $
  - * $Date: 2001/08/11 00:39:16 $
  + * $Header: 
/home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/Attic/TestGetMethodLocal.java,v
 1.1.2.2 2001/08/13 15:57:43 rwaldhoff Exp $
  + * $Revision: 1.1.2.2 $
  + * $Date: 2001/08/13 15:57:43 $
    * ====================================================================
    * Copyright (C) The Apache Software Foundation. All rights reserved.
    *
  @@ -20,22 +20,25 @@
    * Simple tests of {@link GetMethod} hitting
    * a local webserver.
    * <p>
  - * This test assumes a webserver is running on port 8080 on
  - * the 127.0.0.1.
  + * This test suite assumes a webserver is running on
  + * port 8080 on the 127.0.0.1 (localhost) host.  It
  + * further assumes that this webserver will respond
  + * to an HTTP GET of <tt>/</tt> with a 200 response.
    * <p>
    * You can change the assumed port by setting the
    * "httpclient.test.localPort" property.
  + * You can change the assumed host by setting the
  + * "httpclient.test.localHost" property.
    *
    * @author Rodney Waldhoff
  - * @version $Id: TestGetMethodLocal.java,v 1.1.2.1 2001/08/11 00:39:16 rwaldhoff 
Exp $
  + * @version $Id: TestGetMethodLocal.java,v 1.1.2.2 2001/08/13 15:57:43 rwaldhoff 
Exp $
    */
   public class TestGetMethodLocal extends TestCase {
   
   
       // -------------------------------------------------------------- Constants
   
  -
  -    private static final String host = "127.0.0.1";
  +    private static final String host = 
System.getProperty("httpclient.test.localHost","127.0.0.1");
       private static final int port;
       static {
           String portString = System.getProperty("httpclient.test.localPort","8080");
  @@ -48,7 +51,6 @@
           port = tempPort;
       }
   
  -
       // ------------------------------------------------------------ Constructor
   
   
  @@ -65,7 +67,7 @@
       }
   
   
  -    // ----------------------------------------------------------- OPTIONS Test
  +    // ------------------------------------------------------------------ Tests
   
   
       public void testGetSlashWithoutDisk() {
  @@ -161,7 +163,7 @@
           HttpClient client = new HttpClient();
           client.startSession(host, port);
   
  -        GetMethod method = new 
GetMethod("/i/am/assuming/this/path/and/file/doesnt/exist/on/the/web/server.zyxxz");
  +        GetMethod method = new 
GetMethod("/i/am/assuming/this/path/and/file/doesnt/exist/on/the/web/server.xyzzy");
           method.setUseDisk(false);
           try {
               client.executeMethod(method);
  
  
  

Reply via email to