| File was renamed from ruoyi-admin/src/test/java/com/ruoyi/system/service/impl/TestWarningExceptionServiceTest.java |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | package com.battery.business.service.impl; |
| | | |
| | | import static org.mockito.ArgumentMatchers.*; |
| | | import static org.mockito.Mockito.*; |
| | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import org.junit.jupiter.api.Test; |
| | | import com.ruoyi.system.domain.TTest; |
| | | import com.ruoyi.system.domain.TTestWarningException; |
| | | import com.ruoyi.system.domain.TTestWarningThreshold; |
| | | import com.ruoyi.system.mapper.TTestMapper; |
| | | import com.battery.business.domain.TTest; |
| | | import com.battery.business.domain.TTestWarningException; |
| | | import com.battery.business.domain.TTestWarningThreshold; |
| | | import com.battery.business.mapper.TTestMapper; |
| | | |
| | | /** 测试预警仅由成功接收测量值触发,并通过持久层原子聚合。 */ |
| | | class TestWarningExceptionServiceTest { |
| | |
| | | int rows = service.close(7L, 22L, "负责人", "已核实"); |
| | | |
| | | assertEquals(1, rows); |
| | | verify(mapper).insertTestAudit(eq(1L), eq("WARNING_EXCEPTION_CLOSED"), eq(22L), eq("负责人"), isNull(), contains("已核实")); |
| | | } |
| | | |
| | | private static TTest testWithThreshold(String metric, BigDecimal min, BigDecimal max) { |