public void Setup()
 {
     // Create the fake stubs and mocks
     _fakeHeater     = new FakeHeater();
     _fakeTempSensor = new FakeTempSensor();
     _fakeWindow     = new FakeWindow();
     // Inject them into the uut via the constructor
     _uut = new ECS(_fakeTempSensor, _fakeHeater, _fakeWindow, 25, 28);
 }
        public void Expection_TempUnder0()
        {
            var fh = new FakeHeater();
            var ts = new FakeTempSensor();

            var uut = new ECS(25, ts, fh);

            ts.Temp = -2;

            Assert.Throws(Is.TypeOf <ArgumentException>(), () => uut.Regulate());
        }
        public void Regulate_HighTemp_HeaterIsTurnedOn()
        {
            var fh = new FakeHeater();
            var ts = new FakeTempSensor();

            var uut = new ECS(25, ts, fh);

            ts.Temp = 27;

            uut.Regulate();

            Assert.That(fh.WasTurnOffCalled, Is.EqualTo(true));
        }