Annotation Type RestResource


@Inherited @Documented @Target({FIELD,PARAMETER}) @Retention(RUNTIME) public @interface RestResource
Marks a field or constructor parameter for injection by the RESTEasy JUnit extension.
  • SeBootstrap.Configuration
  • Client
  • WebTarget
  • UriBuilder
  • URI

Example usage:

@RestBootstrap(MyApplication.class)
public class MyTest {
    @RestResource
    private Client client;

    @RestResource
    @RequestPath("/orders")
    private WebTarget ordersTarget;

    @Test
    public void testOrder(@RestResource URI baseUri) {
        // baseUri is injected as a parameter
    }
}
Since:
1.0
Author:
James R. Perkins