public void Regulate_TempBelowThreshold_HeaterTurnedOn(int curTemp, int thres, int reg) { _fakeTempSensor.GetTemp().Returns(curTemp); _uut.SetThreshold(thres); _uut.Regulate(); _fakeHeater.Received(reg).TurnOn(); }
public void SetAndGetThreshold_ChangeThreshold_ThresholdChanged(int threshold) { //Arrange //Act _ecsSystem.SetThreshold(threshold); //Assert Assert.AreEqual(_ecsSystem.GetThreshold(), threshold); }
public void SetThreshold_initiateWithXChangeToY_ThresholdIsY(int Y) { //Arrange //Act uut.SetThreshold(Y); //Act Assert.That(uut.GetThreshold(), Is.EqualTo(Y)); }
public void Regulate_TemperatureOverThreshold_ECSTurnOffHeater(int temp, int threshold) { //Arrange _tempSensor.GetTemp().Returns(temp); _ecsSystem.SetThreshold(threshold); //Act _ecsSystem.Regulate(); //Assert _heater.Received(1).TurnOff(); }
public void SetThreshold_ThresholdIsSetCorrect() { // Act _uut.SetThreshold(20); Assert.That(_uut.GetThreshold(), Is.EqualTo(20)); }
public void SetThreshold_initiateWithXChangeToY_ThresholdIsY(int X, int Y) { uut = new ECS(new dummyTemoSensor(), new dummyHeater(), X); uut.SetThreshold(Y); Assert.That(uut.GetThreshold(), Is.EqualTo(Y)); }
public void SetThreshold_Test(int thr) { var uut = new ECS(35, new TestTempSensor(), new TestHeater()); uut.SetThreshold(thr); Assert.That(uut.GetThreshold(), Is.EqualTo(thr)); }
public void ECS_SetAndGetThreshold_Simplecases(int a, int expected) { var uut = new ECS(0, new FakeTempSensor(), new FakeHeater(), new FakeWindow()); uut.SetThreshold(a); Assert.That(uut.GetThreshold(), Is.EqualTo(expected)); }
public void Regulate_CorrectLogRes(int thresh, int temp, string logRes) { uut.SetThreshold(thresh); _fakeTempSensor.Temp = temp; uut.Regulate(); Assert.That(_fakeHeater.Log.Log, Is.EqualTo(logRes)); }
public void Regulate_TempOverThreshold_HeaterOff(int thr) { //Arrange //Tester metoden regulate at heateren turner off, når tærskelværdien ligger under den retunerede Fake-temperaturværdi på 24 //Ønsker at der skal være koldere //Act uut.SetThreshold(thr); uut.Regulate(); string state = "Heater Off"; //Assert Assert.That(_fakeHeater.state, Is.EqualTo(state)); }
public void Regulate_SetThresholdAboveMaxTempRange_HeaterTurnsOn() { // Arrange uut.SetThreshold(21); // Act uut.Regulate(); }
public static void Main() { var ecs = new ECS(28, new TempSensor(), new Heater(), new Window(10)); ecs.Regulate(); ecs.SetThreshold(20); ecs.Regulate(); }
public static void Main(string[] args) { var ecs = new ECS(28); ecs.Regulate(); ecs.SetThreshold(20); ecs.Regulate(); }
public static void Main(string[] args) { var ecs = new ECS(28, new TempSensor(), new Heater()); ecs.Regulate(); ecs.SetThreshold(20); ecs.Regulate(); }
public static void Main(string[] args) { var ecs = new ECS(25, new TempSensor(), new Heater()); ecs.Regulate(); ecs.SetThreshold(20); ecs.Regulate(); }
public static void Main(string[] args) { var ecs = new ECS(28, new TempSensor.TempSensor(), new Heater.Heater()); ecs.Regulate(); ecs.SetThreshold(20); ecs.Regulate(); System.Console.ReadKey(); }
public void TestWith(int th, int result)//State based test { //setup UUT.SetThreshold(th); //Act int threshold = UUT.GetThreshold(); //Assert Assert.That(threshold, Is.EqualTo(result)); }
public static void Main(string[] args) { var ecs = new ECS(28, new TempSensor()); ecs.Regulate(); ecs.SetThreshold(20); ecs.Regulate(); // init commit test }
public static void Main(string[] args) { var sensor = new TempSensor(); var heater = new Heater(); var ecs = new ECS(28, sensor, heater); ecs.Regulate(); ecs.SetThreshold(20); ecs.Regulate(); }
public static void Main(string[] args) { // Because of constructor injection, allocation is done in the constructor. // Ability to chose which derivatives one wants to work with var ecs = new ECS(28, new TempSensor(), new Heater()); ecs.Regulate(); ecs.SetThreshold(20); ecs.Regulate(); }
public static void Main(string[] args) { ITempSensor _tempSensor = new TempSensor(); IHeater _heater = new Heater(); var ecs = new ECS(28, _heater, _tempSensor); ecs.Regulate(); ecs.SetThreshold(20); ecs.Regulate(); }
public static void Main(string[] args) { //Create dependencies ITempSensor _tempSensor = new TempSensor(); IHeater _heater = new Heater(); //Create ECS sytem class var ecs = new ECS(28, _tempSensor, _heater); ecs.Regulate(); ecs.SetThreshold(20); }
public void TestSetTresHold_ResultOK() { uut.SetThreshold(4); Assert.That(uut.GetThreshold(), Is.EqualTo(4)); }
public void SetThreshold_Set20_ResultTrue(int a) { uut.SetThreshold(a); Assert.That(uut.GetThreshold(), Is.EqualTo(a)); }
public void SetThreshold_ReturnsCorrectThreshold(int thr, int result) { uut.SetThreshold(thr); Assert.That(uut.GetThreshold(), Is.EqualTo(result)); }
public void SetGetThresholdTest_ThresholdIs30() { UUT.SetThreshold(30); Assert.That(UUT.GetThreshold(), Is.EqualTo(30)); }
public void GetThreshold_ThresholdSetTo20_Returns20() { _uutEcs.SetThreshold(20); Assert.AreEqual(_uutEcs.GetThreshold(), 20); }
public void SetThreshold_GetThreshold_TestCase(int a) { uut.SetThreshold(a); Assert.That(uut.GetThreshold(), Is.EqualTo(a)); }
public void SetThreshold_Test(int a) { _uut.SetThreshold(a); Assert.That(_uut.GetThreshold(), Is.EqualTo(a)); }
public void SetThreshold_initiateWithXChangeToY_ThresholdIsY(int X, int Y) { uut = new ECS(tempSensor, heater, X); uut.SetThreshold(Y); Assert.That(uut.GetThreshold(), Is.EqualTo(Y)); }