package de.gecheckt.pdf.umbenenner.application.validation.technicaltest;

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

import org.junit.jupiter.api.Test;

/**
 * Tests für den {@link CheckpointId}-Enum.
 */
class CheckpointIdTest {

    @Test
    void allMandatoryCheckpointIdsArePresent() {
        var ids = CheckpointId.values();
        assertThat(ids).contains(
                CheckpointId.CONFIGURATION_BASIC_VALIDATION,
                CheckpointId.PROVIDER_CONFIGURATION,
                CheckpointId.BASE_URL_REACHABLE,
                CheckpointId.API_KEY_PRESENT,
                CheckpointId.API_KEY_ACCEPTED,
                CheckpointId.MODEL_LIST_AVAILABLE,
                CheckpointId.SELECTED_MODEL_PLAUSIBLE,
                CheckpointId.PROMPT_FILE_PRESENT,
                CheckpointId.SOURCE_FOLDER_PRESENT,
                CheckpointId.TARGET_FOLDER_USABLE,
                CheckpointId.SQLITE_PATH_USABLE,
                CheckpointId.LOG_DIRECTORY_USABLE
        );
    }

    @Test
    void enumHasTwelveValues() {
        assertThat(CheckpointId.values()).hasSize(12);
    }

    @Test
    void valueOfRoundtrip() {
        for (CheckpointId id : CheckpointId.values()) {
            assertThat(CheckpointId.valueOf(id.name())).isSameAs(id);
        }
    }
}
