use of org.apache.commons.httpclient.NameValuePair in project ecf by eclipse.
the class TestCookieCompatibilitySpec method testParseAttributeBlankPath.
public void testParseAttributeBlankPath() throws Exception {
CookieSpec cookiespec = new CookieSpecBase();
Cookie cookie = new Cookie();
cookiespec.parseAttribute(new NameValuePair("path", " "), cookie);
assertEquals("/", cookie.getPath());
}
use of org.apache.commons.httpclient.NameValuePair in project ecf by eclipse.
the class TestCookieNetscapeDraft method testParseAttributeInvalidCookieExpires.
public void testParseAttributeInvalidCookieExpires() throws Exception {
CookieSpec cookiespec = new NetscapeDraftSpec();
Cookie cookie = new Cookie();
try {
cookiespec.parseAttribute(new NameValuePair("expires", null), cookie);
fail("MalformedCookieException must have been thrown");
} catch (MalformedCookieException expected) {
}
}
use of org.apache.commons.httpclient.NameValuePair in project ecf by eclipse.
the class TestCookieNetscapeDraft method testParseAttributeInvalidCookie.
public void testParseAttributeInvalidCookie() throws Exception {
CookieSpec cookiespec = new NetscapeDraftSpec();
try {
cookiespec.parseAttribute(new NameValuePair("name", "value"), null);
fail("IllegalArgumentException must have been thrown");
} catch (IllegalArgumentException expected) {
}
}
use of org.apache.commons.httpclient.NameValuePair in project ecf by eclipse.
the class TestCookieRFC2109Spec method testParseAttributeNullPath.
public void testParseAttributeNullPath() throws Exception {
CookieSpec cookiespec = new RFC2109Spec();
try {
Cookie cookie = new Cookie();
cookiespec.parseAttribute(new NameValuePair("path", null), cookie);
fail("MalformedCookieException must have been thrown");
} catch (MalformedCookieException expected) {
}
}
use of org.apache.commons.httpclient.NameValuePair in project ecf by eclipse.
the class TestCookieRFC2109Spec method testParseAttributeInvalidCookie.
public void testParseAttributeInvalidCookie() throws Exception {
CookieSpec cookiespec = new RFC2109Spec();
try {
cookiespec.parseAttribute(new NameValuePair("name", "value"), null);
fail("IllegalArgumentException must have been thrown");
} catch (IllegalArgumentException expected) {
}
}
Aggregations