| File was renamed from ruoyi-admin/src/test/java/com/ruoyi/config/TestDeviceBindingMapperContractTest.java |
| | |
| | | package com.ruoyi.config; |
| | | package com.battery.business.runtime; |
| | | |
| | | import static org.junit.jupiter.api.Assertions.assertTrue; |
| | | import static org.junit.jupiter.api.Assertions.assertFalse; |
| | |
| | | import java.nio.charset.StandardCharsets; |
| | | import org.junit.jupiter.api.Test; |
| | | |
| | | /** 测试双设备绑定、字段快照和接收状态的 Mapper 契约。 */ |
| | | /** 测试双设备绑定、电池组当前字段和接收状态的 Mapper 契约。 */ |
| | | class TestDeviceBindingMapperContractTest |
| | | { |
| | | @Test |
| | | void persistsAndReadsCollectorMappingsAndFieldSnapshots() |
| | | { |
| | | String mapper = resource("mapper/system/TTestMapper.xml"); |
| | | String snapshotMapper = resource("mapper/system/TSharedFieldSnapshotMapper.xml"); |
| | | String mapper = resource("mapper/battery/TTestMapper.xml"); |
| | | |
| | | assertTrue(mapper.contains("id=\"insertTestCollectorChannel\"")); |
| | | assertTrue(mapper.contains("id=\"selectTestCollectorChannels\"")); |
| | | assertTrue(snapshotMapper.contains("id=\"insert\"")); |
| | | assertTrue(snapshotMapper.contains("id=\"selectByTestId\"")); |
| | | assertTrue(mapper.contains("reception_status = 'NOT_STARTED'")); |
| | | assertTrue(mapper.contains("channel_count channelCount")); |
| | | assertTrue(mapper.contains("id=\"selectBatteryNosByTestIds\"")); |