package com.ruoyi.loanpricing.service;

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

import org.junit.jupiter.api.Test;

class LoanPricingSensitiveDisplayServiceTest
{
    private final LoanPricingSensitiveDisplayService displayService = new LoanPricingSensitiveDisplayService();

    @Test
    void shouldMaskPersonalNameAndIdNum()
    {
        assertEquals("张*", displayService.maskCustName("张三"));
        assertEquals("1101********1234", displayService.maskIdNum("110101199001011234"));
    }

    @Test
    void shouldMaskCorporateNameAndCreditCode()
    {
        assertEquals("测试****公司", displayService.maskCustName("测试科技有限公司"));
        assertEquals("91*************00X", displayService.maskIdNum("91110000100000000X"));
    }
}
