package dev.lions.user.manager.enums.role;

import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.*;

/**
 * Tests unitaires pour TypeRole
 */
class TypeRoleTest {

    @Test
    void testValues() {
        TypeRole[] values = TypeRole.values();

        assertNotNull(values);
        assertTrue(values.length > 0);
    }

    @Test
    void testValueOf() {
        TypeRole realmRole = TypeRole.valueOf("REALM_ROLE");
        TypeRole clientRole = TypeRole.valueOf("CLIENT_ROLE");

        assertEquals(TypeRole.REALM_ROLE, realmRole);
        assertEquals(TypeRole.CLIENT_ROLE, clientRole);
    }

    @Test
    void testValueOf_Invalid() {
        assertThrows(IllegalArgumentException.class, () -> {
            TypeRole.valueOf("INVALID");
        });
    }

    @Test
    void testEnumValues() {
        assertNotNull(TypeRole.REALM_ROLE);
        assertNotNull(TypeRole.CLIENT_ROLE);
    }
}
