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

import static org.junit.jupiter.api.Assertions.assertTrue;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;

@DisplayName("AppOnlineConsultMapper XML")
class AppOnlineConsultMapperXmlTest
{
    @Test
    @DisplayName("兽医列表 SQL 条件")
    void vetListSql() throws Exception
    {
        Path path = Paths.get("src/main/resources/mapper/diagnosis/AppOnlineConsultMapper.xml");
        String xml = new String(Files.readAllBytes(path), StandardCharsets.UTF_8);
        assertTrue(xml.contains("resource_type = '004001'"));
        assertTrue(xml.contains("publish_status = 1"));
        assertTrue(xml.contains("FIND_IN_SET('3', consult_modes)"));
        assertTrue(xml.contains("resource_name like"));
    }
}
