package dev.lions.unionflow.server.client;

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

import java.util.List;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;

/**
 * Tests pour le client rôles et la classe interne RoleNamesRequest.
 */
class RoleServiceClientTest {

    @Test
    @DisplayName("RoleNamesRequest no-arg constructor et getters/setters")
    void roleNamesRequest_gettersSetters() {
        RoleServiceClient.RoleNamesRequest req = new RoleServiceClient.RoleNamesRequest();
        assertThat(req.getRoleNames()).isNull();
        req.setRoleNames(List.of("ADMIN", "USER"));
        assertThat(req.getRoleNames()).containsExactly("ADMIN", "USER");
    }

    @Test
    @DisplayName("RoleNamesRequest constructor avec liste")
    void roleNamesRequest_constructorWithList() {
        RoleServiceClient.RoleNamesRequest req = new RoleServiceClient.RoleNamesRequest(List.of("ROLE_A"));
        assertThat(req.getRoleNames()).containsExactly("ROLE_A");
    }
}
