Search in sources :

Example 1 with UserCode

use of com.github.pagehelper.model.UserCode in project Mybatis-PageHelper by pagehelper.

the class EnumTest method testCloseable.

@Test
public void testCloseable() {
    SqlSession sqlSession = MybatisHelper.getSqlSession();
    UserMapper userMapper = sqlSession.getMapper(UserMapper.class);
    PageHelper.startPage(1, 2);
    List<UserCode> userCodes = userMapper.selectByCode(Code.LR);
    Assert.assertEquals(1, userCodes.size());
    sqlSession.close();
}
Also used : UserMapper(com.github.pagehelper.mapper.UserMapper) SqlSession(org.apache.ibatis.session.SqlSession) UserCode(com.github.pagehelper.model.UserCode) Test(org.junit.Test)

Aggregations

UserMapper (com.github.pagehelper.mapper.UserMapper)1 UserCode (com.github.pagehelper.model.UserCode)1 SqlSession (org.apache.ibatis.session.SqlSession)1 Test (org.junit.Test)1