示例#1
0
        private void Be_A_Leap_Year_When_Year_Is_Divisible_By_400()
        {
            // Giwen
            var sut = new Year(4000);

            // When
            var actual = sut.IsLeap();

            // Then
            Assert.True(actual);
        }
示例#2
0
        private void Be_Not_A_Leap_Year_When_Year_Is_Not_Divisible_By_4()
        {
            // Giwen
            var sut = new Year(2015);

            // When
            var actual = sut.IsLeap();

            // Then
            Assert.False(actual);
        }
示例#3
0
        public void is_an_atypical_leap_year()
        {
            var year = new Year();

            year.IsLeap(2000).Should().Be(true);
        }
示例#4
0
        public void is_a_typical_leap_year()
        {
            var year = new Year();

            year.IsLeap(1996).Should().Be(true);
        }
示例#5
0
        public void is_an_atypical_common_year()
        {
            var year = new Year();

            year.IsLeap(2100).Should().Be(false);
        }