需要的maven 包
xml
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
java 注解
java
package com.basehuman.manager.service;
import com.basehuman.BaseHumanApplication;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest(classes = BaseHumanApplication.class)
public class MiniTest {
// @Autowired
// private FollowRecordService followRecordService;
//
// @Test
// public void miniAccountFollowRecordList() {
//
// MiniRecordVo vo = new MiniRecordVo();
// vo.setAccountId(220L);
// List<MiniFollowRecordPo> list = followRecordService.miniAccountFollowRecordList(vo);
// System.out.println(list.size());
// }
}