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 GuiModelSource}.
 */
class GuiModelSourceTest {

    @Test
    void allValuesPresent() {
        assertThat(GuiModelSource.values()).containsExactlyInAnyOrder(
                GuiModelSource.LIST_REMOTE_SUCCESS,
                GuiModelSource.LIST_UNAVAILABLE_MANUAL_INPUT,
                GuiModelSource.LIST_FAILED_MANUAL_INPUT,
                GuiModelSource.NOT_YET_LOADED);
    }

    @Test
    void enumLookupByName() {
        assertThat(GuiModelSource.valueOf("LIST_REMOTE_SUCCESS")).isEqualTo(GuiModelSource.LIST_REMOTE_SUCCESS);
        assertThat(GuiModelSource.valueOf("LIST_UNAVAILABLE_MANUAL_INPUT")).isEqualTo(GuiModelSource.LIST_UNAVAILABLE_MANUAL_INPUT);
        assertThat(GuiModelSource.valueOf("LIST_FAILED_MANUAL_INPUT")).isEqualTo(GuiModelSource.LIST_FAILED_MANUAL_INPUT);
        assertThat(GuiModelSource.valueOf("NOT_YET_LOADED")).isEqualTo(GuiModelSource.NOT_YET_LOADED);
    }
}
