<?php

declare(strict_types=1);

namespace App\Tests\Unit\Administration\Domain\Model\Invitation;

use App\Administration\Domain\Model\Invitation\InvitationStatus;
use PHPUnit\Framework\Attributes\Test;
use PHPUnit\Framework\TestCase;

final class InvitationStatusTest extends TestCase
{
    #[Test]
    public function pendingPeutEnvoyer(): void
    {
        self::assertTrue(InvitationStatus::PENDING->peutEnvoyer());
    }

    #[Test]
    public function sentNePeutPasEnvoyer(): void
    {
        self::assertFalse(InvitationStatus::SENT->peutEnvoyer());
    }

    #[Test]
    public function expiredPeutEnvoyer(): void
    {
        self::assertTrue(InvitationStatus::EXPIRED->peutEnvoyer());
    }

    #[Test]
    public function activatedNePeutPasEnvoyer(): void
    {
        self::assertFalse(InvitationStatus::ACTIVATED->peutEnvoyer());
    }

    #[Test]
    public function sentPeutActiver(): void
    {
        self::assertTrue(InvitationStatus::SENT->peutActiver());
    }

    #[Test]
    public function pendingNePeutPasActiver(): void
    {
        self::assertFalse(InvitationStatus::PENDING->peutActiver());
    }

    #[Test]
    public function expiredNePeutPasActiver(): void
    {
        self::assertFalse(InvitationStatus::EXPIRED->peutActiver());
    }

    #[Test]
    public function activatedNePeutPasActiver(): void
    {
        self::assertFalse(InvitationStatus::ACTIVATED->peutActiver());
    }

    #[Test]
    public function sentPeutExpirer(): void
    {
        self::assertTrue(InvitationStatus::SENT->peutExpirer());
    }

    #[Test]
    public function pendingNePeutPasExpirer(): void
    {
        self::assertFalse(InvitationStatus::PENDING->peutExpirer());
    }

    #[Test]
    public function sentPeutRenvoyer(): void
    {
        self::assertTrue(InvitationStatus::SENT->peutRenvoyer());
    }

    #[Test]
    public function expiredPeutRenvoyer(): void
    {
        self::assertTrue(InvitationStatus::EXPIRED->peutRenvoyer());
    }

    #[Test]
    public function pendingNePeutPasRenvoyer(): void
    {
        self::assertFalse(InvitationStatus::PENDING->peutRenvoyer());
    }

    #[Test]
    public function activatedNePeutPasRenvoyer(): void
    {
        self::assertFalse(InvitationStatus::ACTIVATED->peutRenvoyer());
    }

    #[Test]
    public function backingValuesAreCorrect(): void
    {
        self::assertSame('pending', InvitationStatus::PENDING->value);
        self::assertSame('sent', InvitationStatus::SENT->value);
        self::assertSame('expired', InvitationStatus::EXPIRED->value);
        self::assertSame('activated', InvitationStatus::ACTIVATED->value);
    }
}
