This commit is contained in:
2025-12-29 23:26:06 +08:00
parent 76d498b9a3
commit e323aa38ac
10 changed files with 150 additions and 35 deletions

View File

@@ -0,0 +1,33 @@
package quant.rich.emoney;
import java.util.List;
import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import lombok.extern.slf4j.Slf4j;
import quant.rich.emoney.tushare.StockInfo;
import quant.rich.emoney.tushare.TushareDataServiceClient;
@SpringBootTest
@ContextConfiguration(classes = EmoneyAutoApplication.class)
@RunWith(SpringJUnit4ClassRunner.class)
@Slf4j
public class TushareDataServiceClientTest {
@Autowired
TushareDataServiceClient tushareDataServiceClient;
@Test
void test() {
List<StockInfo> stockInfos = tushareDataServiceClient.list("LIST", new String[] {"SZ", "SH"}, null);
for(StockInfo stockInfo : stockInfos) {
log.info("{} {}", stockInfo.getGoodsId(), stockInfo);
}
}
}