예제 #1
0
        public void IsLeap_WhenYearBC_ShouldThrowException()
        {
            // Arrange
            var randomizer = new Random();
            var year       = randomizer.Next(int.MinValue, default);

            // Act
            Action action = () => YearExtension.IsLeap(year);

            // Assert
            action.Should()
            .Throw <ArgumentException>()
            .WithMessage("We started our chronology from the year 0.");
        }
예제 #2
0
 public bool IsLeap_ValidYear_ReturnsTrueOrFalse(int year)
 {
     return(YearExtension.IsLeap(year));
 }