You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ma...@apache.org on 2002/03/04 04:22:18 UTC

cvs commit: jakarta-commons/httpclient/src/test/org/apache/commons/httpclient TestCookie.java

marcsaeg    02/03/03 19:22:18

  Modified:    httpclient/src/test/org/apache/commons/httpclient
                        TestCookie.java
  Log:
  Changed expected version from 1 to 0 for 'Netscape' style cookies.  Changed
  testParseWithAll() to explicitly set Version=1 and verify that version
  is properly set.
  
  Revision  Changes    Path
  1.7       +9 -8      jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestCookie.java
  
  Index: TestCookie.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestCookie.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TestCookie.java	18 Feb 2002 23:42:07 -0000	1.6
  +++ TestCookie.java	4 Mar 2002 03:22:18 -0000	1.7
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestCookie.java,v 1.6 2002/02/18 23:42:07 dion Exp $
  - * $Revision: 1.6 $
  - * $Date: 2002/02/18 23:42:07 $
  + * $Header: /home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestCookie.java,v 1.7 2002/03/04 03:22:18 marcsaeg Exp $
  + * $Revision: 1.7 $
  + * $Date: 2002/03/04 03:22:18 $
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
  @@ -79,7 +79,7 @@
    * @author Rod Waldhoff
    * @author dIon Gillard
    * @author <a href="mailto:JEvans@Cyveillance.com">John Evans</a>
  - * @version $Revision: 1.6 $
  + * @version $Revision: 1.7 $
    */
   public class TestCookie extends TestCase {
   
  @@ -209,7 +209,7 @@
           assertEquals("Domain","127.0.0.1",parsed[0].getDomain());
           assertEquals("Path","/",parsed[0].getPath());
           assertTrue("Secure",!parsed[0].getSecure());
  -        assertEquals("Version",1,parsed[0].getVersion());
  +        assertEquals("Version",0,parsed[0].getVersion());
       }
   
       public void testParseNoName() throws Exception {
  @@ -225,7 +225,7 @@
           assertEquals("Domain","127.0.0.1",parsed[0].getDomain());
           assertEquals("Path","/",parsed[0].getPath());
           assertTrue("Secure",!parsed[0].getSecure());
  -        assertEquals("Version",1,parsed[0].getVersion());
  +        assertEquals("Version",0,parsed[0].getVersion());
       }
   
       public void testParseNoValue() throws Exception {
  @@ -241,7 +241,7 @@
           assertEquals("Domain","127.0.0.1",parsed[0].getDomain());
           assertEquals("Path","/",parsed[0].getPath());
           assertTrue("Secure",!parsed[0].getSecure());
  -        assertEquals("Version",1,parsed[0].getVersion());
  +        assertEquals("Version",0,parsed[0].getVersion());
       }
   
       public void testParseWithWhiteSpace() throws Exception {
  @@ -336,7 +336,7 @@
       }
   
       public void testParseWithAll() throws Exception {
  -        Header setCookie = new Header("Set-Cookie","cookie-name=cookie-value;Path=/commons;Domain=.apache.org;Comment=This is a comment.;secure;Expires=Thu, 01-Jan-1970 00:00:10 GMT");
  +        Header setCookie = new Header("Set-Cookie","cookie-name=cookie-value;Version=1;Path=/commons;Domain=.apache.org;Comment=This is a comment.;secure;Expires=Thu, 01-Jan-1970 00:00:10 GMT");
           Cookie[] parsed = Cookie.parse(".apache.org","/commons/httpclient",true,setCookie);
           assertEquals("Found 1 cookie.",1,parsed.length);
           assertEquals("Name","cookie-name",parsed[0].getName());
  @@ -346,6 +346,7 @@
           assertTrue("Secure",parsed[0].getSecure());
           assertEquals(new Date(10000L),parsed[0].getExpiryDate());
           assertEquals("Comment","This is a comment.",parsed[0].getComment());
  +        assertEquals("Version",1,parsed[0].getVersion());
       }
   
       public void testParseWithWrongDomain() throws Exception {
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>