@Test public void testSetFatigue() { final GiantModel model = new GiantModel(Health.HEALTHY, Fatigue.ALERT, Nourishment.SATURATED); assertEquals(Fatigue.ALERT, model.getFatigue()); for (final Fatigue fatigue : Fatigue.values()) { model.setFatigue(fatigue); assertEquals(fatigue, model.getFatigue()); assertEquals("The giant looks healthy, " + fatigue.toString() + " and saturated.", model.toString()); } }
public void setFatigue(Fatigue fatigue) { this.fatigue = fatigue; }
GiantModel { public void setFatigue(Fatigue fatigue) { this.fatigue = fatigue; } }
GiantModel { public void setFatigue(Fatigue fatigue) { this.fatigue = fatigue; } GiantModel(Health health, Fatigue fatigue, Nourishment nourishment); }
GiantModel { public void setFatigue(Fatigue fatigue) { this.fatigue = fatigue; } GiantModel(Health health, Fatigue fatigue, Nourishment nourishment); Health getHealth(); void setHealth(Health health); Fatigue getFatigue(); void setFatigue(Fatigue fatigue); Nourishment getNourishment(); void setNourishment(Nourishment nourishment); @Override String toString(); }
GiantModel { public void setFatigue(Fatigue fatigue) { this.fatigue = fatigue; } GiantModel(Health health, Fatigue fatigue, Nourishment nourishment); Health getHealth(); void setHealth(Health health); Fatigue getFatigue(); void setFatigue(Fatigue fatigue); Nourishment getNourishment(); void setNourishment(Nourishment nourishment); @Override String toString();  }