Esempio n. 1
0
  @Test
  public void testRemoveOtherStaffMember() throws Exception {
    Responsible toRemove = entity.getOtherStaffMembers().iterator().next();
    otherStaffMembers.remove(toRemove);
    entity.removeOtherStaffMember(toRemove);

    assertEquals(otherStaffMembers, entity.getOtherStaffMembers());
  }
Esempio n. 2
0
 @Test
 public void testAddOtherStaffMember() throws Exception {
   Responsible toAdd = RESPONSIBLE_FACTORY.getNext();
   otherStaffMembers.add(toAdd);
   entity.addOtherStaffMember(toAdd);
   assertEquals(otherStaffMembers, entity.getOtherStaffMembers());
 }
Esempio n. 3
0
 @Before
 public void setUp() throws Exception {
   entity = FACTORY.getNext();
   actors = entity.getActors();
   producers = entity.getProducers();
   directors = entity.getDirectors();
   composers = entity.getComposers();
   scenarists = entity.getScenarists();
   otherStaffMembers = entity.getOtherStaffMembers();
 }
Esempio n. 4
0
  @Test
  public void testAddAllOtherStaffMembers() throws Exception {
    Collection<Responsible> toAdd = new HashSet<>();
    toAdd.add(RESPONSIBLE_FACTORY.getNext());
    toAdd.add(RESPONSIBLE_FACTORY.getNext());
    toAdd.add(RESPONSIBLE_FACTORY.getNext());

    otherStaffMembers.addAll(toAdd);
    entity.addAllOtherStaffMembers(toAdd);
    assertEquals(otherStaffMembers, entity.getOtherStaffMembers());
  }
Esempio n. 5
0
  @Test
  public void testRemoveAllOtherStaffMembers() throws Exception {
    Responsible base = RESPONSIBLE_FACTORY.getNext();
    Responsible second = RESPONSIBLE_FACTORY.getNext();
    Responsible third = RESPONSIBLE_FACTORY.getNext();

    Collection<Responsible> toAdd = new HashSet<>();
    toAdd.add(base);
    toAdd.add(second);
    toAdd.add(third);

    Collection<Responsible> toRemove = new HashSet<>();
    toRemove.add(second);
    toRemove.add(third);

    otherStaffMembers.addAll(toAdd);
    entity.addAllOtherStaffMembers(toAdd);

    otherStaffMembers.removeAll(toRemove);
    entity.removeAllOtherStaffMembers(toRemove);

    assertEquals(otherStaffMembers, entity.getOtherStaffMembers());
  }