Use AssertJ's isEmpty() instead of hasSize(0)
Achieved via global search-and-replace.
This commit is contained in:
@@ -161,7 +161,7 @@ class ResourceHandlerRegistryTests {
|
||||
assertThat(resolvers.get(1)).isInstanceOf(PathResourceResolver.class);
|
||||
|
||||
List<ResourceTransformer> transformers = handler.getResourceTransformers();
|
||||
assertThat(transformers).hasSize(0);
|
||||
assertThat(transformers).isEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -71,7 +71,7 @@ public class ViewResolverRegistryTests {
|
||||
@Test
|
||||
public void noResolvers() {
|
||||
assertThat(this.registry.getViewResolvers()).isNotNull();
|
||||
assertThat(this.registry.getViewResolvers()).hasSize(0);
|
||||
assertThat(this.registry.getViewResolvers()).isEmpty();
|
||||
assertThat(this.registry.hasRegistrations()).isFalse();
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ public class RequestMappingInfoTests {
|
||||
|
||||
PathPattern emptyPattern = (new PathPatternParser()).parse("");
|
||||
assertThat(info.getPatternsCondition().getPatterns()).isEqualTo(Collections.singleton(emptyPattern));
|
||||
assertThat(info.getMethodsCondition().getMethods()).hasSize(0);
|
||||
assertThat(info.getMethodsCondition().getMethods()).isEmpty();
|
||||
assertThat(info.getConsumesCondition().isEmpty()).isTrue();
|
||||
assertThat(info.getProducesCondition().isEmpty()).isTrue();
|
||||
assertThat(info.getParamsCondition()).isNotNull();
|
||||
|
||||
@@ -141,7 +141,7 @@ public class ModelInitializerTests {
|
||||
|
||||
WebSession session = this.exchange.getSession().block(Duration.ZERO);
|
||||
assertThat(session).isNotNull();
|
||||
assertThat(session.getAttributes()).hasSize(0);
|
||||
assertThat(session.getAttributes()).isEmpty();
|
||||
|
||||
context.saveModel();
|
||||
assertThat(session.getAttributes()).hasSize(1);
|
||||
@@ -198,7 +198,7 @@ public class ModelInitializerTests {
|
||||
context.getSessionStatus().setComplete();
|
||||
context.saveModel();
|
||||
|
||||
assertThat(session.getAttributes()).hasSize(0);
|
||||
assertThat(session.getAttributes()).isEmpty();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@ public class ResponseEntityResultHandlerTests {
|
||||
this.resultHandler.handleResult(exchange, result).block(Duration.ofSeconds(5));
|
||||
|
||||
assertThat(exchange.getResponse().getStatusCode()).isEqualTo(HttpStatus.NO_CONTENT);
|
||||
assertThat(exchange.getResponse().getHeaders()).hasSize(0);
|
||||
assertThat(exchange.getResponse().getHeaders()).isEmpty();
|
||||
assertResponseBodyIsEmpty(exchange);
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ public class DefaultRenderingBuilderTests {
|
||||
assertThat(rendering.view()).isEqualTo("abc");
|
||||
assertThat(rendering.modelAttributes()).isEqualTo(Collections.emptyMap());
|
||||
assertThat(rendering.status()).isNull();
|
||||
assertThat(rendering.headers()).hasSize(0);
|
||||
assertThat(rendering.headers()).isEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user