feat(io): welcome banner for game start
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package thb.jeanluc.adventure.io.text;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
class BannerTest {
|
||||
|
||||
@Test
|
||||
void welcome_containsTitleAsHeading() {
|
||||
StyledText b = Banner.welcome("Haunted Manor");
|
||||
assertThat(b.plainText()).contains("Haunted Manor");
|
||||
boolean hasHeading = b.spans().stream().anyMatch(s -> s.style() == Style.HEADING);
|
||||
assertThat(hasHeading).isTrue();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user