public void temperature_rise_when_kettle_is_On() { Kettle kettle = new Kettle(); PowerButton powerButton = new PowerButton(); LiquidButton liquidButton = new LiquidButton(); WarningLED warning = new WarningLED(); powerButton.PressedPowerButton(warning, kettle); liquidButton.IncresedLiquidTemperature(warning, kettle); Assert.AreEqual(true, kettle.KettelOn); Assert.AreEqual(25, kettle.Temperature); liquidButton.IncresedLiquidTemperature(warning, kettle); Assert.AreEqual(35, kettle.Temperature); }
public void temperature_cannot_rise_if_kettle_is_Off() { Kettle kettle = new Kettle(); Assert.AreEqual(15, kettle.Temperature); LiquidButton liquidButton = new LiquidButton(); WarningLED warning = new WarningLED(); liquidButton.IncresedLiquidTemperature(warning, kettle); Assert.AreEqual(15, kettle.Temperature); }
public void Green_LED_when_temperature_is_over_100() { Kettle kettle = new Kettle(); PowerButton powerButton = new PowerButton(); LiquidButton liquidButton = new LiquidButton(); WarningLED warning = new WarningLED(); powerButton.PressedPowerButton(warning, kettle); for (int i = 0; i < 9; i++) { liquidButton.IncresedLiquidTemperature(warning, kettle); } Assert.AreEqual(Color.Green, kettle.LED); }
public void reset_values_when_turn_off() { Kettle kettle = new Kettle(); PowerButton powerButton = new PowerButton(); LiquidButton liquidButton = new LiquidButton(); WarningLED warning = new WarningLED(); powerButton.PressedPowerButton(warning, kettle); for (int i = 0; i < 9; i++) { liquidButton.IncresedLiquidTemperature(warning, kettle); } powerButton.PressedPowerButton(warning, kettle); Assert.AreEqual(false, kettle.KettelOn); Assert.AreEqual(Color.Off, kettle.LED); Assert.AreEqual(15, kettle.Temperature); }