init
This commit is contained in:
@@ -1,13 +1,40 @@
|
||||
package com.ruoyi.test;
|
||||
|
||||
import com.ruoyi.cai.rank.RankManager;
|
||||
import com.ruoyi.cai.rank.RankNode;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 带参数单元测试案例
|
||||
*
|
||||
* @author Lion Li
|
||||
*/
|
||||
@SpringBootTest
|
||||
@Slf4j
|
||||
public class CaiUnitTest {
|
||||
|
||||
@Autowired
|
||||
private RankManager rankManager;
|
||||
|
||||
@Test
|
||||
public void rank(){
|
||||
List<RankNode> nodes = rankManager.getLoveRankDayToday(9);
|
||||
for (RankNode node : nodes) {
|
||||
log.info("userId={}, score={}", node.getUserId(),node.getScore());
|
||||
}
|
||||
nodes = rankManager.getLoveRankDayLastDay(9);
|
||||
for (RankNode node : nodes) {
|
||||
log.info("userId={}, score={}", node.getUserId(),node.getScore());
|
||||
}
|
||||
nodes = rankManager.getInviteRankDayToday(9);
|
||||
for (RankNode node : nodes) {
|
||||
log.info("userId={}, score={}", node.getUserId(),node.getScore());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user