yeg
2026-08-30 20b346ef9d4fcbbbe05abfe08e4f4f0303b0812e
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,15 @@
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))