From dc61906620068c5b49f417b5beba5ce35c2386a9 Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Fri, 13 Mar 2009 15:53:52 +0000 Subject: [PATCH] Fixed test failures --- .../handler/codec/http/CookieEncoderTest.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/test/java/org/jboss/netty/handler/codec/http/CookieEncoderTest.java b/src/test/java/org/jboss/netty/handler/codec/http/CookieEncoderTest.java index 2a5cbe5463..d40886340a 100644 --- a/src/test/java/org/jboss/netty/handler/codec/http/CookieEncoderTest.java +++ b/src/test/java/org/jboss/netty/handler/codec/http/CookieEncoderTest.java @@ -37,11 +37,11 @@ import org.junit.Test; public class CookieEncoderTest { @Test public void testEncodingSingleCookieV0() { - String result = "myCookie=myValue;expires=XXX;path=/apathsomewhere;domain=.adomainsomewhere;secure"; + String result = "myCookie=myValue;Expires=XXX;Path=/apathsomewhere;Domain=.adomainsomewhere;Secure"; Cookie cookie = new DefaultCookie("myCookie", "myValue"); CookieEncoder encoder = new CookieEncoder(true); encoder.addCookie(cookie); - cookie.setComment("this is a comment"); + cookie.setComment("this is a Comment"); cookie.setCommentUrl("http://aurl.com"); cookie.setDomain(".adomainsomewhere"); cookie.setDiscard(true); @@ -55,12 +55,12 @@ public class CookieEncoderTest { } @Test public void testEncodingSingleCookieV1() { - String result = "myCookie=myValue;max-age=50;path=/apathsomewhere;domain=.adomainsomewhere;secure;comment=this is a comment;version=1"; + String result = "myCookie=myValue;Max-Age=50;Path=/apathsomewhere;Domain=.adomainsomewhere;Secure;Comment=this is a Comment;Version=1"; Cookie cookie = new DefaultCookie("myCookie", "myValue"); CookieEncoder encoder = new CookieEncoder(true); encoder.addCookie(cookie); cookie.setVersion(1); - cookie.setComment("this is a comment"); + cookie.setComment("this is a Comment"); cookie.setDomain(".adomainsomewhere"); cookie.setMaxAge(50); cookie.setPath("/apathsomewhere"); @@ -70,12 +70,12 @@ public class CookieEncoderTest { } @Test public void testEncodingSingleCookieV2() { - String result = "myCookie=myValue;max-age=50;path=/apathsomewhere;domain=.adomainsomewhere;secure;comment=this is a comment;version=1;commentURL=\"http://aurl.com\";port=\"80,8080\";discard"; + String result = "myCookie=myValue;Max-Age=50;Path=/apathsomewhere;Domain=.adomainsomewhere;Secure;Comment=this is a Comment;Version=1;CommentURL=\"http://aurl.com\";Port=\"80,8080\";Discard"; Cookie cookie = new DefaultCookie("myCookie", "myValue"); CookieEncoder encoder = new CookieEncoder(true); encoder.addCookie(cookie); cookie.setVersion(1); - cookie.setComment("this is a comment"); + cookie.setComment("this is a Comment"); cookie.setCommentUrl("http://aurl.com"); cookie.setDomain(".adomainsomewhere"); cookie.setDiscard(true); @@ -89,13 +89,13 @@ public class CookieEncoderTest { @Test public void testEncodingMultipleCookies() { - String c1 = "myCookie=myValue;max-age=50;path=/apathsomewhere;domain=.adomainsomewhere;secure;comment=this is a comment;version=1;commentURL=\"http://aurl.com\";port=\"80,8080\";discard;"; - String c2 = "myCookie2=myValue2;path=/anotherpathsomewhere;domain=.anotherdomainsomewhere;comment=this is another comment;version=1;commentURL=\"http://anotherurl.com\";"; - String c3 = "myCookie3=myValue3;version=1"; + String c1 = "myCookie=myValue;Max-Age=50;Path=/apathsomewhere;Domain=.adomainsomewhere;Secure;Comment=this is a Comment;Version=1;CommentURL=\"http://aurl.com\";Port=\"80,8080\";Discard;"; + String c2 = "myCookie2=myValue2;Path=/anotherpathsomewhere;Domain=.anotherdomainsomewhere;Comment=this is another Comment;Version=1;CommentURL=\"http://anotherurl.com\";"; + String c3 = "myCookie3=myValue3;Version=1"; CookieEncoder encoder = new CookieEncoder(true); Cookie cookie = new DefaultCookie("myCookie", "myValue"); cookie.setVersion(1); - cookie.setComment("this is a comment"); + cookie.setComment("this is a Comment"); cookie.setCommentUrl("http://aurl.com"); cookie.setDomain(".adomainsomewhere"); cookie.setDiscard(true); @@ -106,7 +106,7 @@ public class CookieEncoderTest { encoder.addCookie(cookie); Cookie cookie2 = new DefaultCookie("myCookie2", "myValue2"); cookie2.setVersion(1); - cookie2.setComment("this is another comment"); + cookie2.setComment("this is another Comment"); cookie2.setCommentUrl("http://anotherurl.com"); cookie2.setDomain(".anotherdomainsomewhere"); cookie2.setDiscard(false);