Пример #1
0
  public Employee createEmployee(String name, String idNumber, String sn, Date date) {
    Person person = new Person(name);
    person.setIdNumber(idNumber);

    Employee result = new Employee(person, sn, date);
    result.setCreateDate(date);
    result.save();
    return result;
  }
 @Test
 public void testTerminate() {
   assertFalse(post.getEmployees(now).isEmpty());
   employee.terminate(now);
   assertTrue(post.getEmployees(now).isEmpty());
 }
 @Test
 public void testIsActive() {
   assertTrue(employee.isActive(now));
   employee.terminate(now);
   assertFalse(employee.isActive(now));
 }