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(); }
public TollFeeCalculator(IHolidayLookup holidayLookup) { this.holidayLookup = holidayLookup ?? throw new ArgumentNullException(nameof(holidayLookup)); }