use of org.jdbi.v3.core.mapper.JoinRowMapperTest.Article in project jdbi by jdbi.
the class TestRegisterJoinRowMapper method testSqlObjectJoinRow.
@Test
public void testSqlObjectJoinRow() {
Handle handle = dbRule.getSharedHandle();
// tag::joinrowusage[]
Multimap<User, Article> joined = HashMultimap.create();
handle.attach(UserArticleDao.class).getAuthorship().forEach(jr -> joined.put(jr.get(User.class), jr.get(Article.class)));
assertThat(joined).isEqualTo(JoinRowMapperTest.getExpected());
// end::joinrowusage[]
}
Aggregations