@Test(expected = IllegalArgumentException.class) public void testSetBackgroundItemsNotSet() { List<BackgroundItem> items = new ArrayList<BackgroundItem>(); items.add(new BackgroundItem("JUG", BackgroundItemType.NOT_SET)); sut.setBackgroundItems(items, BackgroundItemType.NOT_SET); }
public void setBackgroundItems(final List<BackgroundItem> inBackgroundItems, final BackgroundItemType inBackgroundType) { switch (inBackgroundType) { case SKILL: skills = inBackgroundItems; break; case INTEREST: interests = inBackgroundItems; break; case AFFILIATION: affiliations = inBackgroundItems; break; case HONOR: honors = inBackgroundItems; break; default: String msg = inBackgroundType + " is not handled"; throw new IllegalArgumentException(msg); } }
Background extends DomainEntity implements Serializable { public void setBackgroundItems(final List<BackgroundItem> inBackgroundItems, final BackgroundItemType inBackgroundType) { switch (inBackgroundType) { case SKILL: skills = inBackgroundItems; break; case INTEREST: interests = inBackgroundItems; break; case AFFILIATION: affiliations = inBackgroundItems; break; case HONOR: honors = inBackgroundItems; break; default: String msg = inBackgroundType + " is not handled"; throw new IllegalArgumentException(msg); } } }
Background extends DomainEntity implements Serializable { public void setBackgroundItems(final List<BackgroundItem> inBackgroundItems, final BackgroundItemType inBackgroundType) { switch (inBackgroundType) { case SKILL: skills = inBackgroundItems; break; case INTEREST: interests = inBackgroundItems; break; case AFFILIATION: affiliations = inBackgroundItems; break; case HONOR: honors = inBackgroundItems; break; default: String msg = inBackgroundType + " is not handled"; throw new IllegalArgumentException(msg); } } @SuppressWarnings("unused") private  Background();  Background(final Person inPerson); }
Background extends DomainEntity implements Serializable { public void setBackgroundItems(final List<BackgroundItem> inBackgroundItems, final BackgroundItemType inBackgroundType) { switch (inBackgroundType) { case SKILL: skills = inBackgroundItems; break; case INTEREST: interests = inBackgroundItems; break; case AFFILIATION: affiliations = inBackgroundItems; break; case HONOR: honors = inBackgroundItems; break; default: String msg = inBackgroundType + " is not handled"; throw new IllegalArgumentException(msg); } } @SuppressWarnings("unused") private  Background();  Background(final Person inPerson); List<BackgroundItem> getBackgroundItems(final BackgroundItemType inBackgroundType); void setBackgroundItems(final List<BackgroundItem> inBackgroundItems,
            final BackgroundItemType inBackgroundType); }
Background extends DomainEntity implements Serializable { public void setBackgroundItems(final List<BackgroundItem> inBackgroundItems, final BackgroundItemType inBackgroundType) { switch (inBackgroundType) { case SKILL: skills = inBackgroundItems; break; case INTEREST: interests = inBackgroundItems; break; case AFFILIATION: affiliations = inBackgroundItems; break; case HONOR: honors = inBackgroundItems; break; default: String msg = inBackgroundType + " is not handled"; throw new IllegalArgumentException(msg); } } @SuppressWarnings("unused") private  Background();  Background(final Person inPerson); List<BackgroundItem> getBackgroundItems(final BackgroundItemType inBackgroundType); void setBackgroundItems(final List<BackgroundItem> inBackgroundItems,
            final BackgroundItemType inBackgroundType);  }