|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Retention(value=RUNTIME) @Target(value=FIELD) public @interface Context
The Context
annotation can be used within a TestCase to get the
or a Response
of an
HTTP request injected after it succeeds.PollState
A simple example looks like this:
@RunWith( HttpJUnitRunner.class ) public class Example { @Rule public Destination destination = new Destination( "http://localhost" ); @Context private Response response; @HttpTest( method = Method.GET, path = "/test" ) public void testMethod() { com.eclipsesource.restfuse.Assert.assertAccepted( response ); } }
HttpTest
,
Destination
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |