|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Inherited @Documented @Retention(value=RUNTIME) @Target(value={FIELD,PARAMETER}) public @interface ArquillianResource
Arquillian has support for multiple injection points like @EJB, @Resources and @Inject, but there are also non standard component model objects available within the Arquillian runtime that can be of useful during testing.
Arquillian can expose these objects to the test case using the @ArquillianResource injection annotation.
Usage Example of Field injection:
@ArquillianResource
private InitialContext context;
@Test
public void shouldBeAbleToGetContext() {
context.lookup("");
}
Usage Example of Argument injection:
@Test
public void shouldBeAbleToGetContext(@ArquillianResource InitialContext context) {
context.lookup("");
}
Optional Element Summary | |
---|---|
Class<?> |
value
Defines the resource target for this injection. |
public abstract Class<?> value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |