package com.rj.qiwei; import com.rj.service.IQweiUserService; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.ActiveProfiles; import java.util.Map; import static org.junit.jupiter.api.Assertions.assertTrue; @SpringBootTest @ActiveProfiles("test") public class QweiUserSyncIntegrationTest { @Autowired private IQweiUserService qweiUserService; @Test void syncUsersToDb() { Map result = qweiUserService.syncFromQiWei(); Object success = result.get("success"); assertTrue(Boolean.TRUE.equals(success), "同步失败: " + result); System.out.println("qwei user sync result: " + result); } }