use of org.apache.ibatis.domain.blog.mappers.AuthorMapperWithRowBounds in project mybatis-3 by mybatis.
the class SqlSessionTest method shouldFailSelectOneAuthorUsingMapperClassWithTwoRowBounds.
@Test(expected = BindingException.class)
public void shouldFailSelectOneAuthorUsingMapperClassWithTwoRowBounds() {
Configuration configuration = new Configuration(sqlMapper.getConfiguration().getEnvironment());
configuration.addMapper(AuthorMapperWithRowBounds.class);
SqlSessionFactory sqlMapperWithMultipleHandlers = new DefaultSqlSessionFactory(configuration);
SqlSession sqlSession = sqlMapperWithMultipleHandlers.openSession();
try {
RowBounds bounds1 = new RowBounds(0, 1);
RowBounds bounds2 = new RowBounds(0, 1);
AuthorMapperWithRowBounds mapper = sqlSession.getMapper(AuthorMapperWithRowBounds.class);
mapper.selectAuthor(101, bounds1, bounds2);
} finally {
sqlSession.close();
}
}
Aggregations