commit
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user