use of org.simpleflatmapper.map.MapperBuilderErrorHandler in project SimpleFlatMapper by arnaudroger.
the class JdbcMapperErrorTest method testHandleMapperErrorGetterNotFound.
@Test
public void testHandleMapperErrorGetterNotFound() throws NoSuchMethodException, SecurityException, IOException {
MapperBuilderErrorHandler errorHandler = mock(MapperBuilderErrorHandler.class);
JdbcMapperBuilder<MyClass> builder = JdbcMapperFactoryHelper.asm().mapperBuilderErrorHandler(errorHandler).newBuilder(MyClass.class);
builder.addMapping("prop", 1);
builder.mapper();
verify(errorHandler).accessorNotFound("Could not find getter for ColumnKey [columnName=prop, columnIndex=1, sqlType=-99999] type class org.simpleflatmapper.test.beans.Foo path prop See https://github.com/arnaudroger/SimpleFlatMapper/wiki/Errors_CSFM_GETTER_NOT_FOUND");
}
Aggregations