public void WeatherManager_ChangeWeatherNonExistentRegion_ReturnFalse() { var weatherMgr = new WeatherManager(new SimpleScheduler()); Assert.IsFalse(weatherMgr.ChangeWeather(1, weather => weather.Clear())); }
public void WeatherManager_ChangeWeatherRegionException_WeatherEqual() { var weatherMgr = new WeatherManager(new SimpleScheduler()); var region = FakeRegion(); weatherMgr.RegisterRegion(region); weatherMgr.ChangeWeather(1, weather => { weather.CreateWeather(65000, 300, 100, 16000, 0); throw new Exception(); }); Assert.AreEqual((65535 + 65000) / 300, weatherMgr[1].Duration / 1000); Assert.AreEqual(65000, weatherMgr[1].Width); }