Skip to content

Commit 1e45d5c

Browse files
committed
Merge branch '3.1.x' into 3.2.x
2 parents 68637fa + 6d27c0a commit 1e45d5c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringApplicationBannerPrinterTests.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2022 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -18,6 +18,7 @@
1818

1919
import org.apache.commons.logging.Log;
2020
import org.junit.jupiter.api.Test;
21+
import org.mockito.ArgumentCaptor;
2122

2223
import org.springframework.aot.hint.RuntimeHints;
2324
import org.springframework.aot.hint.predicate.RuntimeHintsPredicates;
@@ -53,7 +54,9 @@ void shouldUseUtf8() {
5354
new ResourceBanner(resource));
5455
Log log = mock(Log.class);
5556
printer.print(new MockEnvironment(), SpringApplicationBannerPrinterTests.class, log);
56-
then(log).should().info("\uD83D\uDE0D Spring Boot! \uD83D\uDE0D\n\n");
57+
ArgumentCaptor<String> captor = ArgumentCaptor.forClass(String.class);
58+
then(log).should().info(captor.capture());
59+
assertThat(captor.getValue()).isEqualToIgnoringNewLines("\uD83D\uDE0D Spring Boot! \uD83D\uDE0D");
5760
}
5861

5962
}

0 commit comments

Comments
 (0)