From 153f9e70a24c6db27fb1f7fd29918e96306db69f Mon Sep 17 00:00:00 2001 From: Janne Valkealahti Date: Wed, 20 Jul 2022 10:10:58 +0100 Subject: [PATCH] Fix tests - Take2 - Relates to changes in #476 --- .../springframework/shell/style/TemplateExecutorTests.java | 3 +-- .../org/springframework/shell/style/ThemeSettingsTests.java | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/spring-shell-core/src/test/java/org/springframework/shell/style/TemplateExecutorTests.java b/spring-shell-core/src/test/java/org/springframework/shell/style/TemplateExecutorTests.java index ffd4491e..939c3c35 100644 --- a/spring-shell-core/src/test/java/org/springframework/shell/style/TemplateExecutorTests.java +++ b/spring-shell-core/src/test/java/org/springframework/shell/style/TemplateExecutorTests.java @@ -75,8 +75,7 @@ public class TemplateExecutorTests { attributes.put("foo", "bar"); AttributedString result = executor.render(template, attributes); AttributedString equalTo = new AttributedStringBuilder() - .append("bar", - AttributedStyle.DEFAULT.foreground(AttributedStyle.BRIGHT + AttributedStyle.WHITE).bold()) + .append("bar", AttributedStyle.DEFAULT.bold()) .toAttributedString(); assertThat(result).isEqualTo(equalTo); } diff --git a/spring-shell-core/src/test/java/org/springframework/shell/style/ThemeSettingsTests.java b/spring-shell-core/src/test/java/org/springframework/shell/style/ThemeSettingsTests.java index d436a6cc..a2ff085d 100644 --- a/spring-shell-core/src/test/java/org/springframework/shell/style/ThemeSettingsTests.java +++ b/spring-shell-core/src/test/java/org/springframework/shell/style/ThemeSettingsTests.java @@ -31,13 +31,12 @@ public class ThemeSettingsTests { public void testGeneratedStyle() { ThemeSettings themeSettings = ThemeSettings.defaults(); String resolveTag = themeSettings.styles().resolveTag(StyleSettings.TAG_TITLE); - assertThat(resolveTag).isEqualTo("bold,fg:bright-white"); + assertThat(resolveTag).isEqualTo("bold"); StyleSource styleSource = new MemoryStyleSource(); StyleResolver styleResolver = new StyleResolver(styleSource, "default"); AttributedStyle style = styleResolver.resolve(resolveTag); - assertThat(style) - .isEqualTo(AttributedStyle.DEFAULT.foreground(AttributedStyle.BRIGHT + AttributedStyle.WHITE).bold()); + assertThat(style).isEqualTo(AttributedStyle.DEFAULT.bold()); } @ParameterizedTest