yeg
6 天以前 a04222c873e5e55f48c8d33b5c0bc46fa524ac8d
ruoyi-admin/src/test/java/com/battery/business/service/impl/DeviceAdapterServiceImplTest.java
@@ -6,6 +6,7 @@
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.ArgumentMatchers.isNull;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
@@ -211,7 +212,7 @@
        var channel = candidateStore.snapshot(Instant.now()).cabinets().get(0).channels().get(0);
        assertEquals(DeviceWorkStatus.WORKING, channel.workStatus());
        verify(detectionCabinetMapper).updateRegisteredChannelObservation(eq("lab-bts"), eq(22), eq(1), eq(2),
                eq(3), eq("ONLINE"), eq("WORKING"), any(), eq(true));
                eq(3), isNull(), eq("ONLINE"), eq("WORKING"), any(), eq(true));
        verify(detectionCabinetMapper).updateRegisteredCabinetObservation(eq("lab-bts"), eq(22), eq(1),
                eq("ONLINE"), any(), eq(true));
    }
@@ -232,7 +233,7 @@
        assertEquals(false, cabinet.online());
        assertTrue(cabinet.channels().stream().noneMatch(channel -> channel.online()));
        verify(detectionCabinetMapper).updateRegisteredChannelObservation(eq("lab-bts"), eq(22), eq(1), eq(1),
                eq(1), eq("OFFLINE"), eq("UNKNOWN"), any(), eq(false));
                eq(1), isNull(), eq("OFFLINE"), eq("UNKNOWN"), any(), eq(false));
        verify(detectionCabinetMapper).updateRegisteredCabinetObservation(eq("lab-bts"), eq(22), eq(1),
                eq("OFFLINE"), any(), eq(false));
    }
@@ -249,7 +250,7 @@
        service.discover(7L);
        verify(detectionCabinetMapper).updateRegisteredChannelObservation(eq("lab-bts"), eq(22), eq(1), eq(1),
                eq(1), eq("ONLINE"), eq("UNKNOWN"), any(), eq(false));
                eq(1), isNull(), eq("ONLINE"), eq("UNKNOWN"), any(), eq(false));
        verify(detectionCabinetMapper).updateRegisteredCabinetObservation(eq("lab-bts"), eq(22), eq(1),
                eq("ONLINE"), any(), eq(false));
    }