Refactor.

This commit is contained in:
Olga MaciaszekSharma
2021-03-01 15:35:49 +01:00
parent b8129f52b7
commit b4fb3fe7b4
4 changed files with 27 additions and 28 deletions

View File

@@ -79,8 +79,8 @@ class FeignHttpClientUrlTests {
@Test
void testUrlHttpClient() {
assertThat(this.urlClient).as("UrlClient was null").isNotNull();
Hello hello = this.urlClient.getHello();
assertThat(urlClient).as("UrlClient was null").isNotNull();
Hello hello = urlClient.getHello();
assertThat(hello).as("hello was null").isNotNull();
assertThat(hello).as("first hello didn't match")
.isEqualTo(new Hello("hello world 1"));
@@ -88,7 +88,7 @@ class FeignHttpClientUrlTests {
@Test
void testBeanUrl() {
Hello hello = this.beanClient.getHello();
Hello hello = beanClient.getHello();
assertThat(hello).as("hello was null").isNotNull();
assertThat(hello).as("first hello didn't match")
.isEqualTo(new Hello("hello world 1"));
@@ -96,7 +96,7 @@ class FeignHttpClientUrlTests {
@Test
void testBeanUrlNoProtocol() {
Hello hello = this.beanClientNoProtocol.getHello();
Hello hello = beanClientNoProtocol.getHello();
assertThat(hello).as("hello was null").isNotNull();
assertThat(hello).as("first hello didn't match")
.isEqualTo(new Hello("hello world 1"));
@@ -180,16 +180,16 @@ class FeignHttpClientUrlTests {
private String message;
public Hello() {
Hello() {
}
public Hello(String message) {
Hello(String message) {
this.message = message;
}
public String getMessage() {
return this.message;
return message;
}
public void setMessage(String message) {
@@ -205,12 +205,12 @@ class FeignHttpClientUrlTests {
return false;
}
Hello that = (Hello) o;
return Objects.equals(this.message, that.message);
return Objects.equals(message, that.message);
}
@Override
public int hashCode() {
return Objects.hash(this.message);
return Objects.hash(message);
}
}

View File

@@ -82,8 +82,8 @@ class FeignHttpClientUrlTestsWithLoadBalancer {
@Test
void testUrlHttpClient() {
assertThat(this.urlClient).as("UrlClient was null").isNotNull();
Hello hello = this.urlClient.getHello();
assertThat(urlClient).as("UrlClient was null").isNotNull();
Hello hello = urlClient.getHello();
assertThat(hello).as("hello was null").isNotNull();
assertThat(hello).as("first hello didn't match")
.isEqualTo(new Hello("hello world 1"));
@@ -91,7 +91,7 @@ class FeignHttpClientUrlTestsWithLoadBalancer {
@Test
void testBeanUrl() {
Hello hello = this.beanClient.getHello();
Hello hello = beanClient.getHello();
assertThat(hello).as("hello was null").isNotNull();
assertThat(hello).as("first hello didn't match")
.isEqualTo(new Hello("hello world 1"));
@@ -99,7 +99,7 @@ class FeignHttpClientUrlTestsWithLoadBalancer {
@Test
void testBeanUrlNoProtocol() {
Hello hello = this.beanClientNoProtocol.getHello();
Hello hello = beanClientNoProtocol.getHello();
assertThat(hello).as("hello was null").isNotNull();
assertThat(hello).as("first hello didn't match")
.isEqualTo(new Hello("hello world 1"));
@@ -183,16 +183,16 @@ class FeignHttpClientUrlTestsWithLoadBalancer {
private String message;
public Hello() {
Hello() {
}
public Hello(String message) {
Hello(String message) {
this.message = message;
}
public String getMessage() {
return this.message;
return message;
}
public void setMessage(String message) {
@@ -208,12 +208,12 @@ class FeignHttpClientUrlTestsWithLoadBalancer {
return false;
}
Hello that = (Hello) o;
return Objects.equals(this.message, that.message);
return Objects.equals(message, that.message);
}
@Override
public int hashCode() {
return Objects.hash(this.message);
return Objects.hash(message);
}
}

View File

@@ -82,8 +82,8 @@ class FeignHttpClientUrlTestsWithRetryableLoadBalancer {
@Test
void testUrlHttpClient() {
assertThat(this.urlClient).as("UrlClient was null").isNotNull();
Hello hello = this.urlClient.getHello();
assertThat(urlClient).as("UrlClient was null").isNotNull();
Hello hello = urlClient.getHello();
assertThat(hello).as("hello was null").isNotNull();
assertThat(hello).as("first hello didn't match")
.isEqualTo(new Hello("hello world 1"));
@@ -91,7 +91,7 @@ class FeignHttpClientUrlTestsWithRetryableLoadBalancer {
@Test
void testBeanUrl() {
Hello hello = this.beanClient.getHello();
Hello hello = beanClient.getHello();
assertThat(hello).as("hello was null").isNotNull();
assertThat(hello).as("first hello didn't match")
.isEqualTo(new Hello("hello world 1"));
@@ -99,7 +99,7 @@ class FeignHttpClientUrlTestsWithRetryableLoadBalancer {
@Test
void testBeanUrlNoProtocol() {
Hello hello = this.beanClientNoProtocol.getHello();
Hello hello = beanClientNoProtocol.getHello();
assertThat(hello).as("hello was null").isNotNull();
assertThat(hello).as("first hello didn't match")
.isEqualTo(new Hello("hello world 1"));
@@ -183,16 +183,16 @@ class FeignHttpClientUrlTestsWithRetryableLoadBalancer {
private String message;
public Hello() {
Hello() {
}
public Hello(String message) {
Hello(String message) {
this.message = message;
}
public String getMessage() {
return this.message;
return message;
}
public void setMessage(String message) {
@@ -208,12 +208,12 @@ class FeignHttpClientUrlTestsWithRetryableLoadBalancer {
return false;
}
Hello that = (Hello) o;
return Objects.equals(this.message, that.message);
return Objects.equals(message, that.message);
}
@Override
public int hashCode() {
return Objects.hash(this.message);
return Objects.hash(message);
}
}

View File

@@ -16,7 +16,6 @@
<suppress files=".*ProtobufSpringEncoderTest.*" checks="LineLengthCheck"/>
<suppress files=".*ProtobufTest.*" checks="LineLengthCheck"/>
<suppress files=".*Hello.*" checks="RedundantModifier"/>
<suppress files=".*FeignHttp.*" checks="RedundantModifier"/>
<!-- Important -->
<suppress files=".*HttpEncoding.*" checks="InterfaceIsTypeCheck"/>
</suppressions>