Annotation Interface DomainServer
@Inherited
@Documented
@Target({FIELD,PARAMETER})
@Retention(RUNTIME)
public @interface DomainServer
Qualifies the injection point for a
URI to indicate which server in a domain is being targeted.
Note: This annotation is only used on tests annotated with WildFlyDomainTest.
It is silently ignored on standalone tests (WildFlyTest), which can be useful when using
test inheritance where a domain test extends a standalone test.
@WildFlyDomainTest
public class OrderTest {
@ServerResource
@DomainServer("server-one")
@RequestPath("orders")
private URI uri;
@Test
public void listOrders() throws Exception {
try (Response response = Client.newClient().target(uri).request().get()) {
Assertions.assertEquals(200, response.getStatus(),
() -> "Failed to get orders: %s".formatted(response.readEntity(String.class)));
}
}
}
- Author:
- James R. Perkins
-
Required Element Summary
Required Elements
-
Element Details
-
value
String valueThe name of the domain server- Returns:
- the name of the domain server
-