public void HeaterTurnOffTestWritesToConsoleCorrect(string expected) { using var consoleOutput = new ConsoleOutput(); _heater.TurnOff(); Assert.AreEqual(expected, consoleOutput.GetOuput()); }
public void Regulate() { var t = _tempSensor.GetTemp(); if (t < _threshold) { _heater.TurnOn(); } else { _heater.TurnOff(); } if (t > _maxTemp) { _window.Open(); } else { _window.Close(); } if (_window.IsOpen()) { _heater.TurnOff(); } }
public void ChangeState(IDoor door, ILight light, IHeater heater, IStartButton startButton, ITimer timer) { door.OpenDoor(); light.TurnOnLight(); heater.TurnOff(); startButton.ButtonIsNotPressed(); timer.Stop(); }
public void TurnOff(int værdi) { heater.logger = fake; heater.TurnOff(); int resultat = fake.value; Assert.That(resultat, Is.EqualTo(værdi)); }
public void TurnOff_TurnOff_HeaterHasBeenTurnedOff() { //Arrange //Act _heater.TurnOff(); //Assert Assert.AreEqual(_fakeConsole.ConsoleLine, "Heater is off"); }
public void Regulate() { // Determine which action to take according to the temperature if (CurrentTemperature < LowerTemperatureThreshold) { _heater.TurnOn(); _window.Close(); } else if (CurrentTemperature >= LowerTemperatureThreshold && CurrentTemperature <= UpperTemperatureThreshold) { _heater.TurnOff(); _window.Close(); } else { _heater.TurnOff(); _window.Open(); } }
public void HeaterOffNTimes(int n) { heat = new FakeHeater(); for (int i = 0; i < n; i++) { heat.TurnOff(); } Assert.That(heat.TurnOffCalledTimes, Is.EqualTo(n)); }
public void Regulate() { var t = _tempSensor.GetTemp(); if (t < _thresholdLower) { _heater.TurnOn(); _window.Close(); } else if (t > _thresholdUpper) { _heater.TurnOff(); _window.Open(); } else { _heater.TurnOff(); _window.Close(); } }
public void Regulate() { var t = _tempSensor.GetTemp(); if (t < _threshold && t < _upperthreshold) { _heater.TurnOn(); _window.CloseWindow(); } else if (t > _threshold && t > _upperthreshold) { _heater.TurnOff(); _window.OpenWindow(); } else if (t > _threshold && t < _upperthreshold) { _heater.TurnOff(); _window.CloseWindow(); } }
private void Regulate() { if (CurrentTemperature < _threshold) { _heater.TurnOn(); } else { _heater.TurnOff(); } }
public void Regulate() { var t = GetCurTemp(); if (t < _threshold) { _heater.TurnOn(); _window.Close(); } else if (t > _threshold) { _heater.TurnOff(); _window.Open(); } else { _heater.TurnOff(); _window.Close(); } }
private void AdjustHeater(int temp) { if (temp < _heaterThreshold) { _heater.TurnOn(); } else { _heater.TurnOff(); } }
public void Regulate() { if (GetCurTemp() < GetThreshold()) { _heater.TurnOn(); } else { _heater.TurnOff(); } }
//public void Regulate() //{ // var t = _tempSensor.GetTemp(); // if (t < _threshold) // _heater.TurnOn(); // else // _heater.TurnOff(); //} public void Regulate() { Console.WriteLine("Im in regulate"); if (CurrentTemperature < _threshold) { _heater.TurnOn(); } else { _heater.TurnOff(); } }
public void Regulate() { var curTemp = _tempSensor.GetTemp(); // Determine which action to take according to the temperature if (curTemp < LowerTemperatureThreshold) { _heater.TurnOn(); _window.Close(); } else if (curTemp >= LowerTemperatureThreshold && curTemp <= UpperTemperatureThreshold) { _heater.TurnOff(); _window.Close(); } else { _heater.TurnOff(); _window.Open(); } }
public void Regulate() { var t = _temp.getTemp(); // Determine which action to take according to the temperature if (t < LowerTemperatureThreshold) { _heater.TurnOn(); _window.Close(); } else if (t >= LowerTemperatureThreshold && t <= UpperTemperatureThreshold) { _heater.TurnOff(); _window.Close(); } else { _heater.TurnOff(); _window.Open(); } }
public void Regulate() { int temperature = _temperatureSensor.GetTemperature(); if (temperature < Threshold) { _heater.TurnOn(); } else { _heater.TurnOff(); } }
public void Regulate() { var t = _tempSensor.GetTemp(); if (t < _threshold) { _heater.TurnOn(); } else { _heater.TurnOff(); } }
public void Regulate() { var curTemp = _tempSensor.GetTemp(); if (curTemp < TemperatureThreshold) { _heater.TurnOn(); } else { _heater.TurnOff(); } }
public void Regulate() { var currentTemperature = _tempSensor.GetTemp(); //Determining what action the heater should take if (currentTemperature < 20) { _heater.TurnOn(); } else if (currentTemperature >= 25) { _heater.TurnOff(); } }
public void Regulate() { var t = _tempSensor.GetTemp(); if (t < _thresholdHeater && !_window.WindowOpen) { _heater.TurnOn(); } else { _heater.TurnOff(); } if (t > _thresholdWindow) { _heater.TurnOff(); _window.Open(); } else { _window.Close(); } }
public void Regulate() { _currentTemp = _tempSensor.GetTemp(); if (_currentTemp < _threshold) { _heater.TurnOn(); _window.Open(); } if (_currentTemp > _threshold) { _heater.TurnOff(); _window.Close(); } }
public void Regulate() { var t = _tempSensor.GetTemp(); if (t < Threshold) { _heater.TurnOn(); } else { _heater.TurnOff(); } _window.WindowCtrl(GetCurTemp()); }
private bool RegulateHeater() { var t = _tempSensor.GetTemp(); if (t < _heaterTempThreshold) { _heater.TurnOn(); return(true); } else { _heater.TurnOff(); return(false); } }
public void Regulate() { var t = _tempSensor.GetTemp(); if (t < 0) { throw new ArgumentException("Det kan ikke passe"); } if (t < _threshold) { _heater.TurnOn(); } else { _heater.TurnOff(); } }
public void Regulate() { var currentTemperature = _tempSensor.GetTemp(); //Determining what action the heater should take if (currentTemperature < 20) { _heater.TurnOn(); } else if (currentTemperature >= 25) { _heater.TurnOff(); } //This below part was unable to being tested according to Jenkins Coverage //else //{ // _heater.TurnOff(); //} }
public void Regulate() { var t = _tempSensor.GetTemp(); if (t < _threshold) { _heater.TurnOn(); } else { _heater.TurnOff(); } if (t > _WindowThreshold) { _Window.open(); //Window extension } else { _Window.close(); //Window extension } }
public void Regulate() { var t = _tempSensor.GetTemp(); if (t < _minThreshold) { _heater.TurnOn(); } else { _heater.TurnOff(); } if (t >= MaxThreshold) { WindowOpen = true; Console.WriteLine("Window opened"); } else { WindowOpen = false; Console.WriteLine("Window closed"); } }
public void Regulate_HighTemp_HeaterTurnOff_WindowOpen() { _tempSensor.GetTemp().Returns(30); _uut.Regulate(); _heater.TurnOff(); }
public void TurnOff_CallMethodTurnOff_ResultIsTrue() { uut.TurnOff(); Assert.That(fakeLogger.PrintBool, Is.True); }