コード例 #1
0
        public void IsTollFreeDate_PublicHoliday_ReturnsTrue()
        {
            IHolidayLookup holidayLookup = Substitute.For <IHolidayLookup>();
            var            date          = new DateTime(2017, 11, 27);

            holidayLookup.IsPublicHoliday(date).Returns(true);
            var tollFeeCalculator = new TollFeeCalculator(holidayLookup);

            tollFeeCalculator.IsTollFreeDate(date).ShouldBeTrue();
        }
コード例 #2
0
 public TollFeeCalculator(IHolidayLookup holidayLookup)
 {
     this.holidayLookup = holidayLookup ?? throw new ArgumentNullException(nameof(holidayLookup));
 }