Fix tests

- Take2
- Relates to changes in #476
This commit is contained in:
Janne Valkealahti
2022-07-20 10:10:58 +01:00
parent 0fd67f2fad
commit 153f9e70a2
2 changed files with 3 additions and 5 deletions

View File

@@ -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);
}

View File

@@ -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