public void SetUp()
 {
     _repoMock = new Mock <IMunicipalityTaxScheduleRepository>();
     _repoMock.Setup(_ => _.GetByDay(It.IsAny <string>(), It.IsAny <DateTime>())).Returns(async() =>
     {
         return(await Task.Factory.StartNew(() =>
                                            MunicipalityTaxSchedulesMockData.Get().FirstOrDefault(_ => _.Id == 1)
                                            ));
     });
     _repoMock.Setup(_ => _.GetByWeek(It.IsAny <string>(), It.IsAny <DateTime>())).Returns(async() =>
     {
         return(await Task.Factory.StartNew(() =>
                                            MunicipalityTaxSchedulesMockData.Get().FirstOrDefault(_ => _.Id == 2)
                                            ));
     });
     _repoMock.Setup(_ => _.GetByMonth(It.IsAny <string>(), It.IsAny <DateTime>())).Returns(async() =>
     {
         return(await Task.Factory.StartNew(() =>
                                            MunicipalityTaxSchedulesMockData.Get().FirstOrDefault(_ => _.Id == 3)
                                            ));
     });
     _repoMock.Setup(_ => _.GetByYear(It.IsAny <string>(), It.IsAny <DateTime>())).Returns(async() =>
     {
         return(await Task.Factory.StartNew(() =>
                                            MunicipalityTaxSchedulesMockData.Get().FirstOrDefault(_ => _.Id == 4)
                                            ));
     });
     _service = new MunicipalityTaxScheduleService(_repoMock.Object);
 }
 public void SetUp()
 {
     _repoMock = new Mock<IMunicipalityTaxScheduleRepository>();
     _repoMock.Setup(_ => _.GetAll()).Returns(async () =>
     {
         return await Task.Factory.StartNew(() => MunicipalityTaxSchedulesMockData.Get());
     });
     _service = new MunicipalityTaxScheduleService(_repoMock.Object);
 }
 public void SetUp()
 {
     _repoMock = new Mock <IMunicipalityTaxScheduleRepository>();
     _repoMock.Setup(_ => _.AddTaxSchedule(It.IsAny <MunicipalityTaxSchedules>())).Returns(async() =>
     {
         return(await Task.Factory.StartNew(() => MunicipalityTaxSchedulesMockData.Get().First()));
     });
     requestObject = new MunicipalityTaxScheduleDto()
     {
         MunicipalityName = "Municipality-3",
         TaxAmount        = 10.2M,
         TaxSheduleTypeId = (int)eTaxScheduleTypes.Daily,
         FromDate         = DateTime.Now,
         Todate           = null
     };
     _service = new MunicipalityTaxScheduleService(_repoMock.Object);
 }