yeg
2026-08-29 11f021ac4d02436c82472b6bf39f9092ef88d9fb
ruoyi-admin/src/test/java/com/ruoyi/config/DevelopmentCollectorStatusSynchronizerTest.java
@@ -1,6 +1,8 @@
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;
@@ -11,6 +13,13 @@
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))