| | |
| | | package com.ruoyi.config; |
| | | |
| | | import static org.junit.jupiter.api.Assertions.assertEquals; |
| | | import static org.junit.jupiter.api.Assertions.assertTrue; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.junit.jupiter.api.Test; |
| | | import com.ruoyi.device.bts.BtsDevelopmentSimulator; |
| | | import com.ruoyi.device.discovery.InMemoryDeviceDiscoveryCandidateStore; |
| | |
| | | class DevelopmentCollectorStatusSynchronizerTest |
| | | { |
| | | @Test |
| | | void productionConstructorIsExplicitlyAutowired() |
| | | { |
| | | assertTrue(java.util.Arrays.stream(DevelopmentCollectorStatusSynchronizer.class.getDeclaredConstructors()) |
| | | .filter(constructor -> constructor.getParameterCount() == 3) |
| | | .anyMatch(constructor -> constructor.isAnnotationPresent(Autowired.class))); |
| | | } |
| | | @Test |
| | | void synchronizesOnlyConfiguredCollectorsWithoutRegisteringThem() throws Exception |
| | | { |
| | | try (BtsDevelopmentSimulator simulator = new BtsDevelopmentSimulator(0)) |