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 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 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 temperature_cannot_rise_if_kettle_is_Off() { Kettle kettle = new Kettle(); kettle.Liquid = new LiquidButton(87); WarningLED warning = new WarningLED(); kettle.Liquid.IncresedLiquidTemperature(kettle, warning); Assert.AreEqual(false, kettle.KettelOn); Assert.AreEqual(87, kettle.Liquid.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 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 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 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); }
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); }