我是单元测试的新手,我不了解如何为Jdbc RowMapper编写测试用例,能否有人指导我,我该怎么写...
public class BaaisnRowMapper implements RowMapper<RowMapperServerResponse>{
@Override
public RowMapperServerResponse mapRow(ResultSet rs, int rowNum) throws SQLException {
RowMapperServerResponse rowMapperServerResponse = new RowMapperServerResponse();
rowMapperServerResponse.setMaster_kit_id(rs.getInt("master_ckt_id"));
rowMapperServerResponse.setId_type(rs.getString("id_type"));
rowMapperServerResponse.setProduct(rs.getString("product"));
rowMapperServerResponse.setSeq_no(rs.getInt("seq_no"));
rowMapperServerResponse.setName(rs.getString("name"));
rowMapperServerResponse.setDependent_count(rs.getInt("dependent_count"));
rowMapperServerResponse.setCreate_time(rs.getString("create_time"));
return rowMapperServerResponse;
}
}
public class RowMapperServerResponse {
private int master_kit_id;
private String id_type;
private String product;
private int seq_no;
private String name;
private int dependent_count;
private String create_time;
}