コード例 #1
0
        [TestCase(14)] // .4
        public void Create_WhenSunny_DayLessThan3IsNormal(int seed)
        {
            Rnd.Reset(seed);
            var evt = RandomEventFactory.Create(2, Weather.Sunny);

            Assert.IsInstanceOf <NormalDay>(evt);
        }
コード例 #2
0
        private static void AssertWeatherEvent <TRandomEvent>(Weather weather)
            where TRandomEvent : RandomEvent
        {
            var evt = RandomEventFactory.Create(3, weather);

            Assert.IsInstanceOf <TRandomEvent>(evt);
        }
コード例 #3
0
        public static Day Create(int dayNumber)
        {
            var weather     = Weather.Create(dayNumber);
            var randomEvent = RandomEventFactory.Create(dayNumber, weather);

            return(new Day(dayNumber, weather, randomEvent));
        }