use of org.openhab.habdroid.util.MyHttpClient in project openhab-android by openhab.
the class DefaultConnectionTest method testSyncResolveRelativeUrl.
@Test
public void testSyncResolveRelativeUrl() {
MyHttpClient httpClient = testConnection.getSyncHttpClient();
httpClient.get("/rest/test", new MyHttpClient.TextResponseHandler() {
@Override
public void onFailure(Call call, int statusCode, Headers headers, String responseBody, Throwable error) {
assertEquals(TEST_BASE_URL + "/rest/test", call.request().url().toString());
}
@Override
public void onSuccess(Call call, int statusCode, Headers headers, String responseBody) {
fail("The request should never succeed in tests.");
}
});
}
Aggregations