Skip to content

Commit

Permalink
Fix SpringApplicationBannerPrinterTests on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mhalbritter committed Feb 19, 2024
1 parent ddd3e37 commit 6d27c0a
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -18,6 +18,7 @@

import org.apache.commons.logging.Log;
import org.junit.jupiter.api.Test;
import org.mockito.ArgumentCaptor;

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

}

0 comments on commit 6d27c0a

Please sign in to comment.