@Test void testOf_color_decorations() { final KeybindComponent component = KeybindComponent.of("key.jump", TextColor.GREEN, ImmutableSet.of(TextDecoration.BOLD)); assertEquals("key.jump", component.keybind()); assertEquals(TextColor.GREEN, component.color()); assertEquals(TextDecoration.State.NOT_SET, component.decoration(TextDecoration.OBFUSCATED)); assertEquals(TextDecoration.State.TRUE, component.decoration(TextDecoration.BOLD)); assertEquals(TextDecoration.State.NOT_SET, component.decoration(TextDecoration.STRIKETHROUGH)); assertEquals(TextDecoration.State.NOT_SET, component.decoration(TextDecoration.UNDERLINED)); assertEquals(TextDecoration.State.NOT_SET, component.decoration(TextDecoration.ITALIC)); }
@Test void testOf_color() { final KeybindComponent component = KeybindComponent.of("key.jump", TextColor.GREEN); assertEquals("key.jump", component.keybind()); assertEquals(TextColor.GREEN, component.color()); for(final TextDecoration decoration : TextDecoration.values()) { assertEquals(TextDecoration.State.NOT_SET, component.decoration(decoration)); } }
@Test void testOf() { final KeybindComponent component = KeybindComponent.of("key.jump"); assertEquals("key.jump", component.keybind()); assertNull(component.color()); for(final TextDecoration decoration : TextDecoration.values()) { assertEquals(TextDecoration.State.NOT_SET, component.decoration(decoration)); } }