use of org.seasar.doma.it.entity.Employee in project doma by domaframework.
the class AutoFunctionTest method testResultSetAndUpdate2.
@Test
@Run(unless = { Dbms.MYSQL, Dbms.SQLSERVER })
public void testResultSetAndUpdate2(Config config) throws Exception {
FunctionDao dao = new FunctionDaoImpl(config);
List<Employee> result = dao.func_resultset_update2(Integer.valueOf(1));
assertEquals(13, result.size());
DepartmentDao departmentDao = new DepartmentDaoImpl(config);
Department department = departmentDao.selectById(Integer.valueOf(1));
assertEquals("HOGE", department.getDepartmentName());
}
use of org.seasar.doma.it.entity.Employee in project doma by domaframework.
the class PrimitiveTypeTest method map_null_to_reference_type.
@Test
void map_null_to_reference_type(Config config) {
EmployeeDao dao = new EmployeeDaoImpl(config);
Employee e = dao.selectById(9);
Integer managerId = e.getManagerId();
assertNull(managerId);
}
use of org.seasar.doma.it.entity.Employee in project doma by domaframework.
the class AutoProcedureTest method testResultSet_check.
@Test
public void testResultSet_check(Config config) throws Exception {
ProcedureDao dao = new ProcedureDaoImpl(config);
List<Employee> employees = new ArrayList<>();
try {
dao.proc_resultset_check(employees, 1);
fail();
} catch (ResultMappingException ignored) {
System.err.println(ignored);
}
}
use of org.seasar.doma.it.entity.Employee in project doma by domaframework.
the class AutoProcedureTest method testResultSetAndUpdate.
@Test
public void testResultSetAndUpdate(Config config) throws Exception {
ProcedureDao dao = new ProcedureDaoImpl(config);
List<Employee> employees = new ArrayList<>();
dao.proc_resultset_update(employees, 1);
assertEquals(13, employees.size());
DepartmentDao departmentDao = new DepartmentDaoImpl(config);
Department department = departmentDao.selectById(1);
assertEquals("HOGE", department.getDepartmentName());
}
use of org.seasar.doma.it.entity.Employee in project doma by domaframework.
the class AutoProcedureTest method testResultSets.
@Test
public void testResultSets(Config config) throws Exception {
ProcedureDao dao = new ProcedureDaoImpl(config);
List<Employee> employees = new ArrayList<>();
List<Department> departments = new ArrayList<>();
dao.proc_resultsets(employees, departments, 1, 1);
assertEquals(13, employees.size());
assertEquals(3, departments.size());
}
Aggregations