public void turn_off_a_turned_on_kettle() { Kettle kettle = new Kettle(); PowerButton powerButton = new PowerButton(); WarningLED warning = new WarningLED(); powerButton.PressedPowerButton(warning, kettle); powerButton.PressedPowerButton(warning, kettle); Assert.AreEqual(false, kettle.KettelOn); }
public void cannot_turn_on_a_turned_on_kettle() { Kettle kettle = new Kettle(); PowerButton powerButton = new PowerButton(); WarningLED warning = new WarningLED(); powerButton.PressedPowerButton(warning, kettle); powerButton.PressedPowerButton(warning, kettle); Assert.AreNotEqual(true, kettle.KettelOn); }
public void reset_values_when_turn_off() { Kettle kettle = new Kettle(); PowerButton power = new PowerButton(); WarningLED warning = new WarningLED(); power.PressedPowerButton(kettle, warning); power.PressedPowerButton(kettle, warning); Assert.AreEqual(false, kettle.KettelOn); Assert.AreEqual(Color.Off, kettle.LED); Assert.AreEqual(null, kettle.Liquid); }
public void Red_LED_kettle_On() { Kettle kettle = new Kettle(); PowerButton power = new PowerButton(); WarningLED warning = new WarningLED(); power.PressedPowerButton(kettle, warning); Assert.AreEqual(Color.Red, kettle.LED); }
public void kettle_turned_on() { Kettle kettle = new Kettle(); PowerButton power = new PowerButton(); WarningLED warning = new WarningLED(); power.PressedPowerButton(kettle, warning); Assert.AreEqual(true, kettle.KettelOn); }
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); }
public void temperature_cannot_rise_if_there_is_no_liquid_in_the_kettle() { Kettle kettle = new Kettle(); PowerButton power = new PowerButton(); kettle.Liquid = null; LiquidButton liquid = new LiquidButton(85); WarningLED warning = new WarningLED(); power.PressedPowerButton(kettle, warning); kettle.Liquid.IncresedLiquidTemperature(kettle, warning); }
public void temperature_rise_when_kettle_is_On() { Kettle kettle = new Kettle(); PowerButton power = new PowerButton(); kettle.Liquid = new LiquidButton(87); WarningLED warning = new WarningLED(); power.PressedPowerButton(kettle, warning); kettle.Liquid.IncresedLiquidTemperature(kettle, warning); Assert.AreEqual(true, kettle.KettelOn); Assert.AreEqual(97, kettle.Liquid.Temperature); }
public void Green_LED_when_temperature_is_over_100() { Kettle kettle = new Kettle(); PowerButton power = new PowerButton(); kettle.Liquid = new LiquidButton(87); WarningLED warning = new WarningLED(); power.PressedPowerButton(kettle, warning); kettle.Liquid.IncresedLiquidTemperature(kettle, warning); kettle.Liquid.IncresedLiquidTemperature(kettle, warning); Assert.AreEqual(true, kettle.KettelOn); Assert.AreEqual(107, kettle.Liquid.Temperature); Assert.AreEqual(Color.Green, kettle.LED); }
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 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); }