From fa4545ff1ae4af86143f1305da2825d188dbc640 Mon Sep 17 00:00:00 2001 From: Yanming Zhou Date: Fri, 8 Dec 2023 09:13:02 +0800 Subject: [PATCH] Use idiomatic AssertJ assertions Replace assertThat(x.isEmpty()).isTrue() with assertThat(x).isEmpty() Search for : assertThat\((.+).isEmpty\(\)\).isTrue\(\) Replace with : assertThat($1).isEmpty() Search for : assertThat\((.+).isEmpty\(\)\).isFalse\(\) Replace with : assertThat($1).isNotEmpty() --- .../springframework/boot/loader/jar/StringSequenceTests.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader-classic/src/test/java/org/springframework/boot/loader/jar/StringSequenceTests.java b/spring-boot-project/spring-boot-tools/spring-boot-loader-classic/src/test/java/org/springframework/boot/loader/jar/StringSequenceTests.java index ee7170f08c25..779636e06447 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader-classic/src/test/java/org/springframework/boot/loader/jar/StringSequenceTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader-classic/src/test/java/org/springframework/boot/loader/jar/StringSequenceTests.java @@ -92,12 +92,12 @@ void subSequenceWhenStartPastExistingEndShouldThrowException() { @Test void isEmptyWhenEmptyShouldReturnTrue() { - assertThat(new StringSequence("").isEmpty()).isTrue(); + assertThat(new StringSequence("")).isEmpty(); } @Test void isEmptyWhenNotEmptyShouldReturnFalse() { - assertThat(new StringSequence("x").isEmpty()).isFalse(); + assertThat(new StringSequence("x")).isNotEmpty(); } @Test