use of org.seasar.doma.it.dao.EmployeeDaoImpl in project doma by domaframework.
the class SqlFileSelectStreamTest method testEntity.
@Test
public void testEntity(Config config) throws Exception {
EmployeeDao dao = new EmployeeDaoImpl(config);
long count = dao.streamAll(s -> s.count());
assertEquals(14L, count);
}
use of org.seasar.doma.it.dao.EmployeeDaoImpl in project doma by domaframework.
the class SqlFileSelectTest method testEnsureResultMappping_false.
@Test
public void testEnsureResultMappping_false(Config config) throws Exception {
EmployeeDao dao = new EmployeeDaoImpl(config);
List<Employee> employees = dao.selectOnlyNameWithoutMappingCheck();
assertEquals(14, employees.size());
}
use of org.seasar.doma.it.dao.EmployeeDaoImpl in project doma by domaframework.
the class SqlFileSelectTest method testNull.
@Test
public void testNull(Config config) throws Exception {
EmployeeDao dao = new EmployeeDaoImpl(config);
Employee employee = dao.selectById(9);
assertNull(employee.getManagerId());
}
use of org.seasar.doma.it.dao.EmployeeDaoImpl in project doma by domaframework.
the class SqlFileSelectTest method testMapList.
@Test
public void testMapList(Config config) throws Exception {
EmployeeDao dao = new EmployeeDaoImpl(config);
List<Map<String, Object>> employees = dao.selectAllAsMapList();
assertEquals(14, employees.size());
}
use of org.seasar.doma.it.dao.EmployeeDaoImpl in project doma by domaframework.
the class SqlFileSelectTest method testEnsureResultMappping_true.
@Test
public void testEnsureResultMappping_true(Config config) throws Exception {
EmployeeDao dao = new EmployeeDaoImpl(config);
try {
dao.selectOnlyNameWithMappingCheck();
fail();
} catch (ResultMappingException expected) {
System.err.print(expected);
}
}
Aggregations