How to mock NamedParameterJdbcTemplate query with ResultSet lambda in unit test using Mockito and Junit5 in Spring Boot

后端 未结 0 1734
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-26 05:39

In Junit4, I would do something like this:

jdbcTemplate.query(sql, new MapSqlParameterSource("id", id),new MyMapper());
->
Mockito.when(jdbcTemplate.         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题