package com.ruoyi.web.modules.diagnosis.support;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;

import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;

@DisplayName("MedicalResourceRules")
class MedicalResourceRulesTest
{

    @Test
    @DisplayName("分配账号角色权限字符")
    void roleKeyForAssign()
    {
        assertEquals(MedicalResourceRules.ROLE_KEY_VET,
                MedicalResourceRules.roleKeyForAssign(MedicalResourceRules.RESOURCE_TYPE_VET));
        assertEquals(MedicalResourceRules.ROLE_KEY_INS,
                MedicalResourceRules.roleKeyForAssign(MedicalResourceRules.RESOURCE_TYPE_ORG));
        assertThrows(IllegalArgumentException.class,
                () -> MedicalResourceRules.roleKeyForAssign(MedicalResourceRules.RESOURCE_TYPE_TEAM));
    }
}
