use of javax.ws.rs.core.Cookie in project jersey by jersey.
the class CookieParamAsStringTest method testStringListGet.
@Test
public void testStringListGet() throws ExecutionException, InterruptedException {
initiateWebApplication(ResourceStringList.class);
_test("/", "application/stringlist", new Cookie("args", "a"));
}
use of javax.ws.rs.core.Cookie in project jersey by jersey.
the class CookieParamAsStringTest method testStringDefaultOverride.
@Test
public void testStringDefaultOverride() throws ExecutionException, InterruptedException {
initiateWebApplication(ResourceStringDefaultOverride.class);
_test("/", new Cookie("arg1", "d"), new Cookie("arg2", "e"), new Cookie("arg3", "f"));
}
use of javax.ws.rs.core.Cookie in project jersey by jersey.
the class CookieParamStringConstructorTest method testStringConstructorGet.
@Test
public void testStringConstructorGet() throws ExecutionException, InterruptedException {
initiateWebApplication(ResourceString.class);
_test("/", new Cookie("arg1", "3.145"), new Cookie("arg2", "3145"), new Cookie("arg3", "http://test"));
}
use of javax.ws.rs.core.Cookie in project jersey by jersey.
the class CookieParamStringConstructorTest method testStringConstructorListEmptyGet.
@Test
public void testStringConstructorListEmptyGet() throws ExecutionException, InterruptedException {
initiateWebApplication(ResourceStringListEmpty.class);
_test("/", "application/stringlist", new Cookie("args", ""));
}
use of javax.ws.rs.core.Cookie in project jersey by jersey.
the class CookieParamStringConstructorTest method testBadStringConstructorValue.
@Test
public void testBadStringConstructorValue() throws ExecutionException, InterruptedException {
initiateWebApplication(ResourceString.class);
final ContainerResponse responseContext = apply(RequestContextBuilder.from("/", "GET").cookie(new Cookie("arg1", "ABCDEF")).cookie(new Cookie("arg2", "3145")).cookie(new Cookie("arg3", "http://test")).build());
assertEquals(400, responseContext.getStatus());
}
Aggregations