yeg
2026-09-05 92f32acd847ea1700590bc669750f23ef499840e
ruoyi-admin/src/test/java/com/battery/business/service/impl/TDetectionCabinetServiceImplTest.java
File was renamed from ruoyi-admin/src/test/java/com/ruoyi/system/service/impl/TDetectionCabinetServiceImplTest.java
@@ -1,4 +1,4 @@
package com.ruoyi.system.service.impl;
package com.battery.business.service.impl;
import java.io.IOException;
import java.io.InputStream;
@@ -25,14 +25,14 @@
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.system.domain.TDetectionCabinet;
import com.ruoyi.system.domain.vo.DiscoveredCabinetVo;
import com.ruoyi.system.mapper.TDetectionCabinetMapper;
import com.battery.device.discovery.InMemoryDeviceDiscoveryCandidateStore;
import com.battery.device.discovery.DeviceDiscoveryCandidateStore.CabinetCandidate;
import com.battery.device.discovery.DeviceDiscoveryCandidateStore.ChannelCandidate;
import com.battery.device.model.ChannelIdentity;
import com.battery.device.model.DeviceWorkStatus;
import com.battery.business.domain.TDetectionCabinet;
import com.battery.business.domain.vo.DiscoveredCabinetVo;
import com.battery.business.mapper.TDetectionCabinetMapper;
import com.battery.device.api.discovery.InMemoryDeviceDiscoveryCandidateStore;
import com.battery.device.api.discovery.DeviceDiscoveryCandidateStore.CabinetCandidate;
import com.battery.device.api.discovery.DeviceDiscoveryCandidateStore.ChannelCandidate;
import com.battery.device.api.model.ChannelIdentity;
import com.battery.device.api.model.DeviceWorkStatus;
/**
 * 检测柜业务层单元测试,验证字段规范化、状态限制及唯一性校验等关键规则。
@@ -104,7 +104,7 @@
    void discoveredCabinetSqlShouldNotReadLegacyTestColumns() throws IOException
    {
        try (InputStream input = getClass().getResourceAsStream(
                "/mapper/system/TDetectionCabinetMapper.xml"))
                "/mapper/battery/TDetectionCabinetMapper.xml"))
        {
            assertNotNull(input);
            String mapperXml = new String(input.readAllBytes(), StandardCharsets.UTF_8);
@@ -120,7 +120,7 @@
    void deleteDetectionCabinetSqlShouldReturnOnlineDeviceToDiscoveryPool() throws IOException
    {
        try (InputStream input = getClass().getResourceAsStream(
                "/mapper/system/TDetectionCabinetMapper.xml"))
                "/mapper/battery/TDetectionCabinetMapper.xml"))
        {
            assertNotNull(input);
            String mapperXml = new String(input.readAllBytes(), StandardCharsets.UTF_8);
@@ -140,7 +140,7 @@
    void detectionCabinetListSqlShouldDeriveLegacyPresentationFields() throws IOException
    {
        try (InputStream input = getClass().getResourceAsStream(
                "/mapper/system/TDetectionCabinetMapper.xml"))
                "/mapper/battery/TDetectionCabinetMapper.xml"))
        {
            assertNotNull(input);
            String mapperXml = new String(input.readAllBytes(), StandardCharsets.UTF_8);
@@ -173,7 +173,7 @@
    void registeredObservationSqlShouldRepairLegacyVendorIdentity() throws IOException
    {
        try (InputStream input = getClass().getResourceAsStream(
                "/mapper/system/TDetectionCabinetMapper.xml"))
                "/mapper/battery/TDetectionCabinetMapper.xml"))
        {
            assertNotNull(input);
            String mapperXml = new String(input.readAllBytes(), StandardCharsets.UTF_8);