コード例 #1
0
        public void CurrentLastDayOfWeekInMonthShouldReturnExpectedResult()
        {
            using ( ShimsContext.Create() )
            {
                ShimDateTime.TodayGet = () => new DateTime( 2013, 6, 1 );

                var expected = new DateTime( 2013, 6, 28 );
                var target = new GregorianCalendar();
                var actual = target.CurrentLastDayOfWeekInMonth( DayOfWeek.Friday );

                Assert.Equal( expected.Date, actual.Date );
            }
        }