Skip to content

Commit 9af5921

Browse files
committed
added testcase for cookie parsing fix
1 parent 59bda9d commit 9af5921

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* Copyright 2010 Ning, Inc.
3+
*
4+
* Ning licenses this file to you under the Apache License, version 2.0
5+
* (the "License"); you may not use this file except in compliance with the
6+
* License. You may obtain a copy of the License at:
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations
14+
* under the License.
15+
*/
16+
package com.ning.http.util;
17+
18+
import com.ning.http.client.Cookie;
19+
import org.testng.Assert;
20+
import org.testng.annotations.Test;
21+
22+
public class TestAsyncHttpProviderUtils
23+
{
24+
@Test(groups="fast")
25+
public void testCookieParsing()
26+
{
27+
String cookieValue = "ID=a3be7f468f2a528c:FF=0:TM=1397369269:LM=134759269:S=XZQK3o8HJ1mytzgz";
28+
String testCookie = "PREF=" + cookieValue + "; expires=Thu, 11-Sep-2013 13:14:29 GMT; path=/; domain=.google.co.uk";
29+
Cookie cookie = AsyncHttpProviderUtils.parseCookie(testCookie);
30+
31+
Assert.assertEquals(cookie.getValue(), cookieValue);
32+
}
33+
}

0 commit comments

Comments
 (0)