Use AssertJ's isEmpty() instead of hasSize(0)

Achieved via global search-and-replace.
This commit is contained in:
Sam Brannen
2022-11-22 17:11:50 +01:00
parent d5b0b2b1a1
commit 7fcd1de8e3
79 changed files with 260 additions and 295 deletions

View File

@@ -72,7 +72,7 @@ public class WebMvcStompEndpointRegistryTests {
@Test
public void handlerMapping() {
SimpleUrlHandlerMapping hm = (SimpleUrlHandlerMapping) this.endpointRegistry.getHandlerMapping();
assertThat(hm.getUrlMap()).hasSize(0);
assertThat(hm.getUrlMap()).isEmpty();
UrlPathHelper pathHelper = new UrlPathHelper();
this.endpointRegistry.setUrlPathHelper(pathHelper);

View File

@@ -332,7 +332,7 @@ public class StompSubProtocolHandlerTests {
assertThat(stompAccessor.getPasscode()).isEqualTo("guest");
assertThat(stompAccessor.getHeartbeat()).isEqualTo(new long[] {10000, 10000});
assertThat(stompAccessor.getAcceptVersion()).isEqualTo(new HashSet<>(Arrays.asList("1.1","1.0")));
assertThat(this.session.getSentMessages()).hasSize(0);
assertThat(this.session.getSentMessages()).isEmpty();
}
@Test