38 lines
942 B
Java
38 lines
942 B
Java
package cn.hezhaohui.fund.util;
|
|
|
|
import cn.hutool.core.lang.Assert;
|
|
import jakarta.annotation.Resource;
|
|
import org.junit.jupiter.api.Test;
|
|
import org.springframework.boot.test.context.SpringBootTest;
|
|
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
|
|
import static org.junit.jupiter.api.Assertions.*;
|
|
|
|
@SpringBootTest
|
|
class FundUtilTest {
|
|
@Resource
|
|
private FundUtil fundUtil;
|
|
|
|
@Test
|
|
void getUrlByFundId() {
|
|
String url = FundUtil.getUrlByFundId("001068");
|
|
System.out.println(url);
|
|
assertNotNull(url);
|
|
}
|
|
|
|
@Test
|
|
void getWorthByFundId() {
|
|
List<Map<String, String>> worth = fundUtil.getWorthByFundId("001068");
|
|
Assert.notNull(worth);
|
|
System.out.println(worth);
|
|
}
|
|
|
|
@Test
|
|
void getHoldingsByFundId() {
|
|
List<Map<String, String>> holdings = fundUtil.getHoldingsByFundId("001068");
|
|
Assert.notNull(holdings);
|
|
System.out.println(holdings);
|
|
}
|
|
} |