コード例 #1
0
  @Before
  public void setUp() throws Exception {
    doctor = new Doctor();
    doctor.setId(id);
    doctor.setUserId(userid);
    doctor.setDepartmentId(departmentid);
    doctor.setFirstname(firstname);
    doctor.setLastname(lastname);
    doctor.setSecondname(secondname);
    doctor.setQualification(qualification);
    doctor.setSpeciality(speciality);
    doctor.setPhoneNumber(phonenumber);
    doctor.setEmail(email);

    role = new Role();
    role.setId(id);
    role.setName(roleName);
    RoleDao.addOrUpdateRole(role);

    user = new User();
    user.setId(id);
    user.setRoleId(roleid);
    user.setNickname(login);
    user.setPassword(password);
    UserDao.addOrUpdateUser(user);

    department = new Department();
    department.setId(id);
    department.setName(departmentName);
    department.setAddress(address);
    DepartmentDao.addOrUpdateDepartment(department);
  }
コード例 #2
0
 @After
 public void tearDown() throws Exception {
   UserDao.deleteUser(id);
   RoleDao.deleteRole(id);
   DepartmentDao.deleteDepartment(id);
 }