@Test public void testSetFatigue() { final GiantModel model = mock(GiantModel.class); final GiantView view = mock(GiantView.class); final GiantController controller = new GiantController(model, view); verifyZeroInteractions(model, view); for (final Fatigue fatigue : Fatigue.values()) { controller.setFatigue(fatigue); verify(model).setFatigue(fatigue); verifyZeroInteractions(view); } controller.getFatigue(); verify(model).getFatigue(); verifyNoMoreInteractions(model, view); }
public void setFatigue(Fatigue fatigue) { this.giant.setFatigue(fatigue); }
GiantController { public void setFatigue(Fatigue fatigue) { this.giant.setFatigue(fatigue); } }
GiantController { public void setFatigue(Fatigue fatigue) { this.giant.setFatigue(fatigue); } GiantController(GiantModel giant, GiantView view); }
GiantController { public void setFatigue(Fatigue fatigue) { this.giant.setFatigue(fatigue); } GiantController(GiantModel giant, GiantView view); Health getHealth(); void setHealth(Health health); Fatigue getFatigue(); void setFatigue(Fatigue fatigue); Nourishment getNourishment(); void setNourishment(Nourishment nourishment); void updateView(); }
GiantController { public void setFatigue(Fatigue fatigue) { this.giant.setFatigue(fatigue); } GiantController(GiantModel giant, GiantView view); Health getHealth(); void setHealth(Health health); Fatigue getFatigue(); void setFatigue(Fatigue fatigue); Nourishment getNourishment(); void setNourishment(Nourishment nourishment); void updateView();  }