use of io.crnk.client.http.apache.HttpClientAdapter in project crnk-framework by crnk-project.
the class HttpClientAdapterTest method testCannotAddListenersAfterInitialization.
@Test
public void testCannotAddListenersAfterInitialization() {
HttpClientAdapter adapter = new HttpClientAdapter();
adapter.getImplementation();
try {
adapter.addListener(Mockito.mock(HttpClientAdapterListener.class));
Assert.fail();
} catch (IllegalStateException e) {
// ok
}
}
use of io.crnk.client.http.apache.HttpClientAdapter in project crnk-framework by crnk-project.
the class HttpAdapterProviderTest method testHttpClientProvider.
@Test
public void testHttpClientProvider() {
HttpClientAdapterProvider provider = new HttpClientAdapterProvider();
Assert.assertTrue(provider.isAvailable());
Assert.assertTrue(provider.newInstance() instanceof HttpClientAdapter);
}
Aggregations