Polishing

This commit is contained in:
Sam Brannen
2022-07-13 16:58:56 +02:00
parent 0fb9de5d0e
commit a81558ee5a
2 changed files with 5 additions and 8 deletions

View File

@@ -132,7 +132,6 @@ public class HttpServiceMethodTests {
@Test
void blockingService() {
BlockingService service = this.proxyFactory.createClient(BlockingService.class);
service.execute();
@@ -144,7 +143,7 @@ public class HttpServiceMethodTests {
assertThat(body).isEqualTo("requestToBody");
Optional<String> optional = service.getBodyOptional();
assertThat(optional).isEqualTo(Optional.of("requestToBody"));
assertThat(optional).contains("requestToBody");
ResponseEntity<String> entity = service.getEntity();
assertThat(entity.getBody()).isEqualTo("requestToEntity");
@@ -155,7 +154,6 @@ public class HttpServiceMethodTests {
@Test
void methodAnnotatedService() {
MethodLevelAnnotatedService service = this.proxyFactory.createClient(MethodLevelAnnotatedService.class);
service.performGet();
@@ -177,7 +175,6 @@ public class HttpServiceMethodTests {
@Test
void typeAndMethodAnnotatedService() throws Exception {
HttpServiceProxyFactory proxyFactory = new HttpServiceProxyFactory(this.client);
proxyFactory.setEmbeddedValueResolver(value -> (value.equals("${baseUrl}") ? "/base" : value));
proxyFactory.afterPropertiesSet();
@@ -202,7 +199,7 @@ public class HttpServiceMethodTests {
}
private void verifyClientInvocation(String methodName, @Nullable ParameterizedTypeReference<?> expectedBodyType) {
assertThat((this.client.getInvokedMethodName())).isEqualTo(methodName);
assertThat(this.client.getInvokedMethodName()).isEqualTo(methodName);
assertThat(this.client.getBodyType()).isEqualTo(expectedBodyType);
}