use of org.springframework.data.repository.query.RepositoryQuery in project spring-data-jdbc by spring-projects.
the class JdbcQueryLookupStrategyUnitTests method typeBasedRowMapperGetsUsedForQuery.
// DATAJDBC-166
@Test
public void typeBasedRowMapperGetsUsedForQuery() {
RowMapper numberFormatMapper = mock(RowMapper.class);
RowMapperMap rowMapperMap = new ConfigurableRowMapperMap().register(NumberFormat.class, numberFormatMapper);
RepositoryQuery repositoryQuery = getRepositoryQuery("returningNumberFormat", rowMapperMap);
repositoryQuery.execute(new Object[] {});
verify(mappingContext.getTemplate()).queryForObject(anyString(), any(SqlParameterSource.class), eq(numberFormatMapper));
}
Aggregations