use of org.jdbi.v3.sqlobject.subpackage.SomethingDao in project jdbi by jdbi.
the class TestSqlObject method testPassThroughMethodWithDaoInAnotherPackage.
@Test
public void testPassThroughMethodWithDaoInAnotherPackage() throws Exception {
SomethingDao dao = handle.attach(SomethingDao.class);
dao.insert(3, "Cora");
Something c = dao.findByIdHeeHee(3);
assertThat(c).isEqualTo(new Something(3, "Cora"));
}
use of org.jdbi.v3.sqlobject.subpackage.SomethingDao in project jdbi by jdbi.
the class TestSqlObject method testSimpleTransactionsSucceed.
@Test
public void testSimpleTransactionsSucceed() throws Exception {
SomethingDao dao = dbRule.getJdbi().onDemand(SomethingDao.class);
dao.insertInSingleTransaction(10, "Linda");
}
use of org.jdbi.v3.sqlobject.subpackage.SomethingDao in project jdbi by jdbi.
the class TestUseCustomHandlerFactory method shouldUseConfiguredDefaultHandler.
@Test
public void shouldUseConfiguredDefaultHandler() throws Exception {
SomethingDao h = handle.attach(SomethingDao.class);
Something s = h.insertAndFind(new Something(1, "Joy"));
assertThat(s.getName()).isEqualTo("Joy");
}
Aggregations