use of org.glassfish.jersey.server.ContainerResponse in project jersey by jersey.
the class QueryParamStringConstructorTest method testBadStringConstructorValue.
@Test
public void testBadStringConstructorValue() throws ExecutionException, InterruptedException {
initiateWebApplication(ResourceString.class);
final ContainerResponse responseContext = getResponseContext("/?arg1=ABCDEF&arg2=3145&arg3=http:%2F%2Ftest");
assertEquals(404, responseContext.getStatus());
}
use of org.glassfish.jersey.server.ContainerResponse in project jersey by jersey.
the class UriTest method testResolveTemplateInFieldManagedClient.
@Test
public void testResolveTemplateInFieldManagedClient() throws Exception {
initiateWebApplication(Resource5.class);
final ContainerResponse response = apply(RequestContextBuilder.from("/test/1", "GET").build());
assertThat(response.getEntity().toString(), equalTo("http://oracle.com/foo"));
}
use of org.glassfish.jersey.server.ContainerResponse in project jersey by jersey.
the class UriTest method testGetRelative2.
@Test
public void testGetRelative2() throws ExecutionException, InterruptedException {
initiateWebApplication(Resource3.class);
final ContainerResponse response = apply(RequestContextBuilder.from("/test/parameter", "GET").build());
assertEquals("/parameter", response.getEntity());
}
use of org.glassfish.jersey.server.ContainerResponse in project jersey by jersey.
the class UriTest method testGetParam2.
@Test
public void testGetParam2() throws ExecutionException, InterruptedException {
initiateWebApplication(Resource2.class);
final ContainerResponse response = apply(RequestContextBuilder.from("/test/parameter", "GET").build());
assertEquals("http://oracle.com/parameter", response.getEntity());
}
use of org.glassfish.jersey.server.ContainerResponse in project jersey by jersey.
the class UriTest method testManagedClientInjection2.
@Test
public void testManagedClientInjection2() throws ExecutionException, InterruptedException {
final ResourceConfig resourceConfig = new ResourceConfig(Resource4.class);
resourceConfig.property(Managed.class.getName() + ".property.test-property", "test-value");
initiateWebApplication(resourceConfig);
final ContainerResponse response = apply(RequestContextBuilder.from("/test/2", "GET").build());
assertEquals("test-value", response.getEntity());
}
Aggregations