@Test public void areAllLightsOn() { assertFalse("Not all lights should be on", model.areAllLightsOn()); model.turnNextLightOn(); assertFalse("Not all lights should be on", model.areAllLightsOn()); model.turnNextLightOn(); assertFalse("Not all lights should be on", model.areAllLightsOn()); model.turnNextLightOn(); assertTrue("All lights should be on", model.areAllLightsOn()); }
public boolean areAllLightsOn() { return numberOfLightsOn() == lights.size(); }
GaugeButtonModel extends DefaultButtonModel { public boolean areAllLightsOn() { return numberOfLightsOn() == lights.size(); } }
GaugeButtonModel extends DefaultButtonModel { public boolean areAllLightsOn() { return numberOfLightsOn() == lights.size(); } GaugeButtonModel(int numberOfLights); }
GaugeButtonModel extends DefaultButtonModel { public boolean areAllLightsOn() { return numberOfLightsOn() == lights.size(); } GaugeButtonModel(int numberOfLights); List<Light> lights(); void turnNextLightOn(); boolean areAllLightsOn(); void turnAllLightsOff(); }
GaugeButtonModel extends DefaultButtonModel { public boolean areAllLightsOn() { return numberOfLightsOn() == lights.size(); } GaugeButtonModel(int numberOfLights); List<Light> lights(); void turnNextLightOn(); boolean areAllLightsOn(); void turnAllLightsOff();  }