Search in sources :

Example 6 with GoAgentServerHttpClient

use of com.thoughtworks.go.agent.common.ssl.GoAgentServerHttpClient in project gocd by gocd.

the class SslInfrastructureServiceTest method httpClientStub.

private GoAgentServerHttpClient httpClientStub() {
    final GoAgentServerHttpClient client = context.mock(GoAgentServerHttpClient.class);
    context.checking(new Expectations() {

        {
            try {
                allowing(client).reset();
            } catch (Exception e) {
                throw bomb(e);
            }
        }
    });
    return client;
}
Also used : Expectations(org.jmock.Expectations) GoAgentServerHttpClient(com.thoughtworks.go.agent.common.ssl.GoAgentServerHttpClient) IOException(java.io.IOException)

Aggregations

GoAgentServerHttpClient (com.thoughtworks.go.agent.common.ssl.GoAgentServerHttpClient)6 CloseableHttpResponse (org.apache.http.client.methods.CloseableHttpResponse)4 AgentAutoRegistrationPropertiesImpl (com.thoughtworks.go.agent.AgentAutoRegistrationPropertiesImpl)2 DefaultAgentRegistry (com.thoughtworks.go.config.DefaultAgentRegistry)2 SystemEnvironment (com.thoughtworks.go.util.SystemEnvironment)2 Properties (java.util.Properties)2 Test (org.junit.Test)2 GoAgentServerHttpClientBuilder (com.thoughtworks.go.agent.common.ssl.GoAgentServerHttpClientBuilder)1 AgentAutoRegistrationProperties (com.thoughtworks.go.config.AgentAutoRegistrationProperties)1 URLService (com.thoughtworks.go.util.URLService)1 IOException (java.io.IOException)1 HttpGet (org.apache.http.client.methods.HttpGet)1 BasicStatusLine (org.apache.http.message.BasicStatusLine)1 Expectations (org.jmock.Expectations)1 Before (org.junit.Before)1