【发布时间】:2019-05-13 02:32:19
【问题描述】:
我正在尝试编写一个 JUnit 测试用例。我变得不知道如何为以下方法编写测试用例。 什么都需要嘲笑。
@Autowired
private DoseService doseService;
public Message<List<Dose>> getAllDoses() {
log.info("GET method");
List<Dose> doseLst = doseService.getAllDoses();
return MessageBuilder.withPayload(doseLst).setHeader("http_statusCode",
HttpStatus.OK).build();
}
提前感谢您的帮助。
【问题讨论】:
标签: java spring unit-testing junit spring-integration