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); }