use of net.nemerosa.ontrack.client.JsonClientImpl in project ontrack by nemerosa.
the class DefaultJenkinsClientTest method before.
@Before
public void before() {
OTHttpClient httpClient = mock(OTHttpClient.class);
when(httpClient.getUrl(anyString(), any(String[].class))).thenAnswer(invocation -> {
String path = (String) invocation.getArguments()[0];
String parameters = (String) invocation.getArguments()[1];
return String.format("http://jenkins/%s", String.format(path, parameters));
});
JsonClient jsonClient = new JsonClientImpl(httpClient);
jenkinsClient = new DefaultJenkinsClient(jsonClient);
}
Aggregations