commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oglu...@apache.org
Subject cvs commit: jakarta-commons/httpclient/src/test/org/apache/commons/httpclient TestHttpClientLocalHost.java TestMethodsLocalHost.java
Date Fri, 01 Nov 2002 09:51:05 GMT
oglueck     2002/11/01 01:51:05

  Modified:    httpclient/src/test/org/apache/commons/httpclient
                        TestHttpClientLocalHost.java
                        TestMethodsLocalHost.java
  Log:
  unified assertions
  
  Revision  Changes    Path
  1.3       +6 -6      jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestHttpClientLocalHost.java
  
  Index: TestHttpClientLocalHost.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestHttpClientLocalHost.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestHttpClientLocalHost.java	4 Feb 2002 15:26:43 -0000	1.2
  +++ TestHttpClientLocalHost.java	1 Nov 2002 09:51:05 -0000	1.3
  @@ -119,7 +119,7 @@
   
       public void testExecuteMethod() throws Exception {
           client.startSession(host, port);
  -        assertTrue(200 == client.executeMethod(getSlash));
  +        assertEquals(200, client.executeMethod(getSlash));
           String data = getSlash.getResponseBodyAsString();
           assertTrue(null != data);
           assertTrue(data.length() > 0);
  @@ -130,7 +130,7 @@
       public void testExecuteMultipleMethods() throws Exception {
           client.startSession(host, port);
           for(int i=0;i<10;i++) {
  -            assertTrue(200 == client.executeMethod(getSlash));
  +            assertEquals(200, client.executeMethod(getSlash));
               String data = getSlash.getResponseBodyAsString();
               assertTrue(null != data);
               assertTrue(data.length() > 0);
  
  
  
  1.4       +6 -8      jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestMethodsLocalHost.java
  
  Index: TestMethodsLocalHost.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestMethodsLocalHost.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestMethodsLocalHost.java	4 Feb 2002 15:26:43 -0000	1.3
  +++ TestMethodsLocalHost.java	1 Nov 2002 09:51:05 -0000	1.4
  @@ -217,8 +217,7 @@
               fail("Unable to execute method : " + t.toString());
           }
   
  -        assertTrue("Method failed : " + method.getStatusCode(),
  -               (method.getStatusCode() == 200));
  +        assertEquals(200, method.getStatusCode());
   
           method.recycle();
           method.setPath("/index.html");
  @@ -230,8 +229,7 @@
               fail("Unable to execute method : " + t.toString());
           }
   
  -        assertTrue("Method failed : " + method.getStatusCode(),
  -               (method.getStatusCode() == 200));
  +        assertEquals(200, method.getStatusCode());
   
       }
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message