public void YearlyControl_TwoTax_OneRatio() //Yearly Control Test vol 2 { var taxesServiceMock = new Mock <ITaxesService>(); var service = new TaxesRatioService(taxesServiceMock.Object); var taxesList = new List <TaxesItem>(); taxesList.Add(new TaxesItem { Municipality = "istanbul", Date = DateTime.UtcNow, TaxesSchedule = "yearly", TaxesRatio = 1.8 }); taxesList.Add(new TaxesItem { Municipality = "istanbul", Date = DateTime.UtcNow.AddDays(-365), TaxesSchedule = "yearly", TaxesRatio = 1.1 }); var result = service.YearlyControl(taxesList, DateTime.UtcNow.AddDays(-365)); Assert.Equal(1.1, result); }
public void MonthlyControl_OneTax_OneRatio() //Montly Control Test { var taxesServiceMock = new Mock <ITaxesService>(); var service = new TaxesRatioService(taxesServiceMock.Object); var taxesList = new List <TaxesItem>(); taxesList.Add(new TaxesItem { Municipality = "istanbul", Date = DateTime.UtcNow, TaxesSchedule = "monthly", TaxesRatio = 1.6 }); var result = service.MonthlyControl(taxesList, DateTime.UtcNow.AddDays(-1)); Assert.Equal(1.6, result); }