public void Setup() { heater = NSubstitute.Substitute.For <IHeater>(); //tempSensor = NSubstitute.Substitute.For<ITempSensor>(); fakeTempSensor = new FakeTempSensor(); uut = new ECS.Legacy.ECS(_threshold, fakeTempSensor, heater); }
public void Setup() { FakeHeater = new FakeHeater(); FakeTempSensor = new FakeTempSensor(); //heater = Substitute.For<IHeater>(); //uut = new ECS.Legacy.ECS(_threshold, FakeTempSensor, heater); uut = new ECS.Legacy.ECS(_threshold, FakeTempSensor, FakeHeater); }
public static void Main(string[] args) { var ecs = new ECS(28); ecs.Regulate(); ecs.SetThreshold(20); ecs.Regulate(); Console.ReadKey(); }
static void Main(string[] args) { Console.WriteLine("Testing ECS.Legacy"); // Make an ECS with a threshold of 23 var control = new ECS(23); for (int i = 1; i <= 15; i++) { Console.WriteLine($"Running regulation number {i}"); control.Regulate(); } }
public static void Main(string[] args) { var TempSensor = new TempSensor(); var ecs = new ECS(20, TempSensor, new Heater()); TempSensor.setTemp(19); ecs.Regulate(); TempSensor.setTemp(25); Console.ReadLine(); //ecs.Handle; // ecs.Regulate(); }
public static void Main(string[] args) { var fakeecs = new ECS(25, 28, new FakeTempSensor(), new FakeHeater()); System.Console.WriteLine(fakeecs.RunSelfTest()); fakeecs.Regulate(); fakeecs.SetThreshold(0, 0); fakeecs.Regulate(); System.Console.WriteLine(fakeecs.RunSelfTest()); System.Console.ReadKey(); }
public void Setup() { uut = new ECS.Legacy.ECS(45, heater, temp); }
public void Setup() { heater = NSubstitute.Substitute.For <IHeater>(); temp = NSubstitute.Substitute.For <ITempSensor>(); uut = new ECS.Legacy.ECS(45, heater, temp); }