| | |
| | | assertEquals(new BigDecimal("2.500"), snapshot.get("capacityAh")); |
| | | } |
| | | |
| | | @Test |
| | | void pausedShouldNotExposeUnavailableSourceAsAlarm() |
| | | { |
| | | Instant now = Instant.parse("2026-09-02T06:00:00Z"); |
| | | TTest test = test("PAUSED"); |
| | | TTestLiveServiceImpl service = liveService(test, now, false); |
| | | |
| | | LiveState state = service.current(10L); |
| | | |
| | | assertTrue(state.exceptions().isEmpty()); |
| | | } |
| | | |
| | | private static TTest test(String receptionStatus) |
| | | { |
| | | TTest test = new TTest(); |
| | |
| | | |
| | | private static TTestLiveServiceImpl liveService(TTest test, Instant now) |
| | | { |
| | | return liveService(test, now, true); |
| | | } |
| | | |
| | | private static TTestLiveServiceImpl liveService(TTest test, Instant now, boolean online) |
| | | { |
| | | DeviceDiscoveryCandidateStore candidates = mock(DeviceDiscoveryCandidateStore.class); |
| | | BtsDevelopmentSimulator simulator = mock(BtsDevelopmentSimulator.class); |
| | | ITTestService tests = mock(ITTestService.class); |
| | |
| | | new BigDecimal("9.250"), 12L, 12L, "0", now, |
| | | java.util.Map.of()); |
| | | DeviceDiscoveryCandidateStore.ChannelCandidate channel = new DeviceDiscoveryCandidateStore.ChannelCandidate( |
| | | identity, true, DeviceWorkStatus.WORKING, now, snapshot); |
| | | identity, online, DeviceWorkStatus.WORKING, now, snapshot); |
| | | DeviceDiscoveryCandidateStore.CabinetCandidate cabinet = new DeviceDiscoveryCandidateStore.CabinetCandidate( |
| | | "dev-sim", 1L, "dev-sim", 1, 1, "127.0.0.2", "mac", "cabinet", "vendor", "model", |
| | | List.of(channel), now, now.plusSeconds(60)); |