assertEquals(httpGet.getConfig().getSocketTimeout(), TIMEOUT + TIMEOUT_OFFSET);
}
- @Test(expected = AuthenticationException.class)
- public void shoudNotGetHttpRequest_whenBasicAuthNotSet() throws AuthenticationException {
-
- noBasicAuth();
-
- commonHttpClient.getReq(URI, TIMEOUT);
- }
-
@Test
public void shouldPostHttpRequest_whenSetBasicAuth() throws AuthenticationException {
assertEquals(httpPost.getConfig().getSocketTimeout(), TIMEOUT_OFFSET);
}
- @Test(expected = AuthenticationException.class)
- public void shoudNotPostHttpRequest_whenBasicAuthNotSet() throws AuthenticationException {
-
- noBasicAuth();
-
- commonHttpClient.postReq(URL);
- }
-
@Test
public void shouldGetClient() {
assertNotNull(commonHttpClient.getClient());