package de.gecheckt.pdf.umbenenner.adapter.in.gui.editor;

import static org.assertj.core.api.Assertions.assertThat;

import org.junit.jupiter.api.Test;

/**
 * Tests for {@link GuiMessageSeverity}.
 */
class GuiMessageSeverityTest {

    @Test
    void allValuesHaveGermanPrefix() {
        assertThat(GuiMessageSeverity.INFO.getPrefixLabel()).isEqualTo("Info:");
        assertThat(GuiMessageSeverity.HINT.getPrefixLabel()).isEqualTo("Hinweis:");
        assertThat(GuiMessageSeverity.WARNING.getPrefixLabel()).isEqualTo("Warnung:");
        assertThat(GuiMessageSeverity.ERROR.getPrefixLabel()).isEqualTo("Fehler:");
    }

    @Test
    void allValuesHaveCssColour() {
        for (GuiMessageSeverity severity : GuiMessageSeverity.values()) {
            assertThat(severity.getPrefixCssColour())
                    .as("CSS colour for %s must be a hex colour string", severity)
                    .isNotBlank()
                    .startsWith("#");
        }
    }

    @Test
    void allFourValuesPresent() {
        assertThat(GuiMessageSeverity.values()).containsExactly(
                GuiMessageSeverity.INFO,
                GuiMessageSeverity.HINT,
                GuiMessageSeverity.WARNING,
                GuiMessageSeverity.ERROR);
    }
}
