【发布时间】:2018-07-06 12:21:10
【问题描述】:
我尝试模拟 JdbcTemplate jdbcTemplate ,但这并没有涵盖里面的任何内容
新员工(.......);
请告诉我有没有办法覆盖 new Employee(...) 中的这些行?
public List<Employee> findByCustIdAndType(long Id, String type)
{
return jdbcTemplate.query(SQL.getEmployee(Id, type),
(rs, rowNum) -> new Employee(rs.getLong("CUSTOMER_ID"),
rs.getLong("ANCHOR_CUSTOMER_ID") ,
rs.getString("SEGMENT"),
rs.getDate("END_TS")));
}
【问题讨论】:
标签: java spring-boot mockito code-coverage junit4