@Test public void testSetHealth() { final GiantModel model = mock(GiantModel.class); final GiantView view = mock(GiantView.class); final GiantController controller = new GiantController(model, view); verifyZeroInteractions(model, view); for (final Health health : Health.values()) { controller.setHealth(health); verify(model).setHealth(health); verifyZeroInteractions(view); } controller.getHealth(); verify(model).getHealth(); verifyNoMoreInteractions(model, view); }
public void setHealth(Health health) { this.giant.setHealth(health); }
GiantController { public void setHealth(Health health) { this.giant.setHealth(health); } }
GiantController { public void setHealth(Health health) { this.giant.setHealth(health); } GiantController(GiantModel giant, GiantView view); }
GiantController { public void setHealth(Health health) { this.giant.setHealth(health); } 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 setHealth(Health health) { this.giant.setHealth(health); } 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();  }