public static Month Next(this Month month)
        {
            if (month == Month.December)
            {
                return(Month.January);
            }

            return(EnumNavigator <Month> .Next(month));
        }
Ejemplo n.º 2
0
        public void Next_NotAnEnumType_ThrowsTypeInitializationException()
        {
            TestDelegate executeNextMethod = () => EnumNavigator <DateTime> .Next(DateTime.Now);

            Assert.That(executeNextMethod, Throws.InstanceOf <TypeInitializationException>());
        }
Ejemplo n.º 3
0
        public void Next_DayOfWeek_ReturnsCorrectNextDay(DayOfWeek current, DayOfWeek expected)
        {
            DayOfWeek nextDayOfWeek = EnumNavigator <DayOfWeek> .Next(current);

            Assert.That(nextDayOfWeek, Is.EqualTo(expected));
        }
Ejemplo n.º 4
0
 public static DayOfWeek Next(this DayOfWeek dayOfWeek) => EnumNavigator <DayOfWeek> .Next(dayOfWeek);