use of jakarta.ws.rs.core.FeatureContext in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method clientConfiguredTest.
/*
* @testName: clientConfiguredTest
*
* @assertion_ids: JAXRS:SPEC:73;
*
* @test_Strategy: This interface supports configuration of: Features,
* Properties, Providers
*/
@Test
public void clientConfiguredTest() throws Fault {
Client client = ClientBuilder.newClient();
client.register(new StringBeanEntityProvider());
checkConfig(client, 1 + registeredProviderCnt, registeredPropertyCnt);
client = ClientBuilder.newClient();
client.property(getClass().getName(), getClass().getName());
checkConfig(client, registeredProviderCnt, 1 + registeredPropertyCnt);
client = ClientBuilder.newClient();
client.register(new Feature() {
@Override
public boolean configure(FeatureContext context) {
return true;
}
});
checkConfig(client, 1 + registeredProviderCnt, registeredPropertyCnt);
}
Aggregations