@Test public void turnAllLightsOff() { model.turnNextLightOn(); model.turnNextLightOn(); model.turnNextLightOn(); model.turnAllLightsOff(); List<Light> lights = model.lights(); assertFalse("Light should be off", lights.get(0).isOn()); assertFalse("Light should be off", lights.get(1).isOn()); assertFalse("Light should be off", lights.get(2).isOn()); }
public void turnAllLightsOff() { for(Light light : lights) light.turnOff(); }
GaugeButtonModel extends DefaultButtonModel { public void turnAllLightsOff() { for(Light light : lights) light.turnOff(); } }
GaugeButtonModel extends DefaultButtonModel { public void turnAllLightsOff() { for(Light light : lights) light.turnOff(); } GaugeButtonModel(int numberOfLights); }
GaugeButtonModel extends DefaultButtonModel { public void turnAllLightsOff() { for(Light light : lights) light.turnOff(); } GaugeButtonModel(int numberOfLights); List<Light> lights(); void turnNextLightOn(); boolean areAllLightsOn(); void turnAllLightsOff(); }
GaugeButtonModel extends DefaultButtonModel { public void turnAllLightsOff() { for(Light light : lights) light.turnOff(); } GaugeButtonModel(int numberOfLights); List<Light> lights(); void turnNextLightOn(); boolean areAllLightsOn(); void turnAllLightsOff();  }