formatting
This commit is contained in:
@@ -378,10 +378,10 @@ public class ConfigClientProperties {
|
||||
public String toString() {
|
||||
return "ConfigClientProperties [enabled=" + this.enabled + ", profile=" + this.profile + ", name=" + this.name
|
||||
+ ", label=" + this.label + ", username=" + this.username + ", password=" + this.password + ", uri="
|
||||
+ Arrays.toString(this.uri) + ", mediaType=" + this.mediaType + ", discovery=" + this.discovery + ", failFast=" + this.failFast
|
||||
+ ", token=" + this.token + ", requestConnectTimeout=" + this.requestConnectTimeout
|
||||
+ ", requestReadTimeout=" + this.requestReadTimeout + ", sendState=" + this.sendState + ", headers="
|
||||
+ this.headers + "]";
|
||||
+ Arrays.toString(this.uri) + ", mediaType=" + this.mediaType + ", discovery=" + this.discovery
|
||||
+ ", failFast=" + this.failFast + ", token=" + this.token + ", requestConnectTimeout="
|
||||
+ this.requestConnectTimeout + ", requestReadTimeout=" + this.requestReadTimeout + ", sendState="
|
||||
+ this.sendState + ", headers=" + this.headers + "]";
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -95,21 +95,18 @@ public class ConfigServicePropertySourceLocatorTests {
|
||||
mockRequestResponseWithoutLabel(new ResponseEntity<>(body, HttpStatus.OK));
|
||||
ConfigClientProperties properties = new ConfigClientProperties(this.environment);
|
||||
properties.setMediaType("application/json");
|
||||
ConfigServicePropertySourceLocator locator = new ConfigServicePropertySourceLocator(
|
||||
properties);
|
||||
ConfigServicePropertySourceLocator locator = new ConfigServicePropertySourceLocator(properties);
|
||||
locator.setRestTemplate(this.restTemplate);
|
||||
|
||||
ArgumentCaptor<HttpEntity> argumentCaptor = ArgumentCaptor
|
||||
.forClass(HttpEntity.class);
|
||||
ArgumentCaptor<HttpEntity> argumentCaptor = ArgumentCaptor.forClass(HttpEntity.class);
|
||||
|
||||
assertThat(locator.locateCollection(this.environment)).isNotNull();
|
||||
|
||||
Mockito.verify(this.restTemplate).exchange(anyString(), any(HttpMethod.class),
|
||||
argumentCaptor.capture(), any(Class.class), anyString(), anyString());
|
||||
Mockito.verify(this.restTemplate).exchange(anyString(), any(HttpMethod.class), argumentCaptor.capture(),
|
||||
any(Class.class), anyString(), anyString());
|
||||
|
||||
HttpEntity httpEntity = argumentCaptor.getValue();
|
||||
assertThat(httpEntity.getHeaders().getAccept())
|
||||
.containsExactly(MediaType.parseMediaType("application/json"));
|
||||
assertThat(httpEntity.getHeaders().getAccept()).containsExactly(MediaType.parseMediaType("application/json"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user