Search in sources :

Example 1 with ImmutableAuthor

use of org.apache.ibatis.domain.blog.ImmutableAuthor in project mybatis-3 by mybatis.

the class SqlSessionTest method shouldSelectOneImmutableAuthor.

@Test
void shouldSelectOneImmutableAuthor() {
    try (SqlSession session = sqlMapper.openSession()) {
        ImmutableAuthor author = session.selectOne("org.apache.ibatis.domain.blog.mappers.AuthorMapper.selectImmutableAuthor", new Author(101));
        assertEquals(101, author.getId());
        assertEquals(Section.NEWS, author.getFavouriteSection());
    }
}
Also used : ImmutableAuthor(org.apache.ibatis.domain.blog.ImmutableAuthor) ImmutableAuthor(org.apache.ibatis.domain.blog.ImmutableAuthor) Author(org.apache.ibatis.domain.blog.Author) BaseDataTest(org.apache.ibatis.BaseDataTest) Test(org.junit.jupiter.api.Test)

Aggregations

BaseDataTest (org.apache.ibatis.BaseDataTest)1 Author (org.apache.ibatis.domain.blog.Author)1 ImmutableAuthor (org.apache.ibatis.domain.blog.ImmutableAuthor)1 Test (org.junit.jupiter.api.Test)1