public ServiceRate GetServiceRateAtDate(DateTime refDate, Services.Service service) { return(ServiceRates .Where(x => x.EffectiveDate <= refDate && x.ServiceID == service.ID) .OrderByDescending(x => x.EffectiveDate) .FirstOrDefault()); }
public void GetAllTest() { var moqDaoRates = new Mock <IDaoRates>(); moqDaoRates.Setup(r => r.GetAll()).Returns(new Collection <Rates>()); ServiceRates serviceRates = new ServiceRates(moqDaoRates.Object); Assert.AreNotEqual(serviceRates.GetAll(), null); }