[TestCase(14)] // .4 public void Create_WhenSunny_DayLessThan3IsNormal(int seed) { Rnd.Reset(seed); var evt = RandomEventFactory.Create(2, Weather.Sunny); Assert.IsInstanceOf <NormalDay>(evt); }
private static void AssertWeatherEvent <TRandomEvent>(Weather weather) where TRandomEvent : RandomEvent { var evt = RandomEventFactory.Create(3, weather); Assert.IsInstanceOf <TRandomEvent>(evt); }
public static Day Create(int dayNumber) { var weather = Weather.Create(dayNumber); var randomEvent = RandomEventFactory.Create(dayNumber, weather); return(new Day(dayNumber, weather, randomEvent)); }