| | |
| | | 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() |
| | | { |
| | | var constructors = DevelopmentCollectorStatusSynchronizer.class.getDeclaredConstructors(); |
| | | assertEquals(2, constructors.length); |
| | | var production = java.util.Arrays.stream(constructors) |
| | | .filter(item -> item.isAnnotationPresent(Autowired.class)).findFirst().orElseThrow(); |
| | | assertEquals(4, production.getParameterCount()); |
| | | } |
| | | @Test |
| | | void synchronizesOnlyConfiguredCollectorsWithoutRegisteringThem() throws Exception |
| | | { |
| | | try (BtsDevelopmentSimulator simulator = new BtsDevelopmentSimulator(0)) |