Esempio n. 1
0
        public void TestEvents()
        {
            float?     changedTo = null;
            Thermostat t         = new Thermostat(32.0F);

            t.OnTemperatureChanged += (s, e) => {
                changedTo = e.NewTemperature;
            };
            t.AdjustTemp(10.0F);
            Assert.Equal(42.0F, t.CurrentTemp, 1);
        }