use of jakarta.ws.rs.core.Configuration in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method deepCopyConfigWebTargetLevelTest.
/*
* @testName: deepCopyConfigWebTargetLevelTest
*
* @assertion_ids: JAXRS:SPEC:68; JAXRS:SPEC:72; JAXRS:JAVADOC:988;
*
* @test_Strategy: Note that changes to hello's configuration do not affect
* base, i.e. configuration inheritance requires performing a deep copy of the
* configuration.
*
* The following Client API types are configurable: Client, Invocation,
* Invocation.Builder and WebTarget.
*
* Get access to the underlying Configuration configuration.
*/
@Test
public void deepCopyConfigWebTargetLevelTest() throws Fault {
Client client = ClientBuilder.newClient();
Configuration config = client.getConfiguration();
int registeredInstances = config.getInstances().size();
// WebTarget level inheritance
WebTarget target1 = client.target("");
WebTarget target2 = client.target("");
target1.register(new StringBeanEntityProvider());
config = target2.getConfiguration();
assertTrue(config.getInstances().size() == registeredInstances, "configuration() does not perform deep copy");
}
Aggregations