package dev.lions.unionflow.client.api.dto;

import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;

import java.time.LocalDateTime;
import java.util.UUID;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;

class RapportTrimestrielDtoTest {

  private RapportTrimestrielDto build(String statut) {
    return new RapportTrimestrielDto(
        UUID.randomUUID(), UUID.randomUUID(), 2026, 1,
        LocalDateTime.now(), statut, 75, null, null, null);
  }

  @Test
  @DisplayName("estDraft / estSigne / estArchive — DRAFT")
  void draft() {
    var r = build("DRAFT");
    assertTrue(r.estDraft());
    assertFalse(r.estSigne());
    assertFalse(r.estArchive());
  }

  @Test
  @DisplayName("estDraft / estSigne / estArchive — SIGNE")
  void signe() {
    var r = build("SIGNE");
    assertFalse(r.estDraft());
    assertTrue(r.estSigne());
    assertFalse(r.estArchive());
  }

  @Test
  @DisplayName("estDraft / estSigne / estArchive — ARCHIVE")
  void archive() {
    var r = build("ARCHIVE");
    assertFalse(r.estDraft());
    assertFalse(r.estSigne());
    assertTrue(r.estArchive());
  }

  @Test
  @DisplayName("Statut inconnu → tous false")
  void inconnu() {
    var r = build("AUTRE");
    assertFalse(r.estDraft());
    assertFalse(r.estSigne());
    assertFalse(r.estArchive());
  }
}
