public static PreviousMonth ( this startMonth ) : YearAndMonth | ||
startMonth | this | |
Результат | YearAndMonth |
public void PreviousMonthTest() { for (var i = 1; i <= TimeSpec.MonthsPerYear; i++) { TimeTool.PreviousMonth(i).Month.Should().Be((i - 1) <= 0 ? (TimeSpec.MonthsPerYear + i - 1) : i - 1); } }