public void SetTaxCalculator(int customerId) { // TODO: SetCustomerTaxCalculator would reach out to a service which grabs the appropriate TaxCalculator to be used var taxCalculator = new TaxCalculator(); // replace new TaxCalculator() with the one from the above TODO service _taxCalculatorService = new TaxCalculatorService(taxCalculator, _logger); }
public Engine(ITaxCalculatorService taxCalculatorService, IReader reader, IWriter writer, IInputValidator inputValidator) { this.taxCalculatorService = taxCalculatorService; this.reader = reader; this.writer = writer; this.inputValidator = inputValidator; }
public MonthlyReporterService() { this.domesticCalculator = IoCWrapper.Get<ITaxCalculatorService>("Domestic"); this.internationalTaxCalculator = IoCWrapper.Get<ITaxCalculatorService>("International"); this.Header = "Month | Total Invoice Amount | ST | EC | FRT"; this.rolledUpInvoices = new Dictionary<string, Taxes>(); }
public OrderTaxController(ILogger <TaxRateController> logger, IMapper mapper, ITaxCalculatorService service, IOptions <AppSettings> appSettings) { _logger = logger; _mapper = mapper; _taxCalculatorService = service; _appSettings = appSettings.Value; }
public void Initialize() { _mockRepository = new MockRepository(MockBehavior.Strict); _mockIncomeTaxRepository = _mockRepository.Create <IIncomeTaxRepository>(); _mockIncomeTaxRepository.Setup(x => x.CreateIncomeTax(It.IsAny <IncomeTax>())).Returns(new IncomeTax()); _taxCalculatorService = new TaxCalculatorService(_mockIncomeTaxRepository.Object); _controller = new IncomeTaxController(_taxCalculatorService); }
public void TestInitialize() { _mockTaxableType = new Mock <ITaxableType>(MockBehavior.Strict); _mockTaxSpecification = new Mock <ISpecification <Product> >(MockBehavior.Strict); _mockTaxSpecification.As <ITaxableType>(); _mockCountryDefinitionService = new Mock <ICountryDefinitionDataAccess>(MockBehavior.Strict); _mockSpecifications = new Mock <IEnumerable <ISpecification <Product> > >(MockBehavior.Strict); _mockSpecifications.Setup(c => c.GetEnumerator()).Returns(new List <ISpecification <Product> > { _mockTaxSpecification.Object }.Select(x => x).GetEnumerator()); _taxCalculatorService = new TaxCalculatorService(_mockCountryDefinitionService.Object, _mockSpecifications.Object); }
public static ITaxCalculatorService GetTaxCalculatorService(TaxType taxType) { ITaxCalculatorService taxCalculatorService = null; switch (taxType) { case TaxType.FlatTaxRate: taxCalculatorService = new FlatRateTaxCalculatorService(); break; case TaxType.FlatValue: taxCalculatorService = new FlatValueTaxCalculatorService(); break; case TaxType.Progressive: taxCalculatorService = new ProgressiveTaxCalculatorService(); break; default: throw new ApplicationException(string.Format("The tax type '{0}' supplied is not supported.", taxType.ToString())); } return(taxCalculatorService); }
public PayrollService(ITaxCalculatorService taxCalculatorService) { _taxCalculatorService = taxCalculatorService; }
public RatesController( ITaxCalculatorService taxRateService ) { _taxRateService = taxRateService; }
public PaySlipService(IRoundingService roundingService, ITaxCalculatorService taxCalculatorService) { _roundingService = roundingService; _taxCalculatorService = taxCalculatorService; }
/// <summary> /// Constructor to create a new <see cref="TaxController"/>. /// </summary> /// <param name="taxService">The <see cref="ITaxService"/> used to retrieve the tax regions.</param> /// <param name="taxCalculatorService">The <see cref="ITaxCalculatorService"/> used to calculate taxes.</param> /// <param name="taxInputUtility">The <see cref="ITaxInputUtility"/> used to validate inputs.</param> public TaxController(ITaxService taxService, ITaxCalculatorService taxCalculatorService, ITaxInputUtility taxInputUtility) { _taxService = taxService; _taxCalculatorService = taxCalculatorService; _taxInputUtility = taxInputUtility; }
/// <summary> /// Constructor method /// </summary> /// <param name="employeeService">instance of employee service</param> /// <param name="taxCalculatorService">instance of tax calculator service</param> public EmployeeViewModel(IEmployeeService employeeService, ITaxCalculatorService taxCalculatorService) { this._employeeService = employeeService; this._taxCalculatorService = taxCalculatorService; }
public PaySlipService(ITaxCalculatorService taxCalculatorService) { _taxCalculatorService = taxCalculatorService; }
public TaxController(ITaxTypeService taxTypeService, ITaxCalculatorService taxCalculatorService, IMediator mediator) { _taxTypeService = taxTypeService; _taxCalculatorService = taxCalculatorService; Mediator = mediator; }
public TaxCalculatorController(ITaxCalculatorService taxCalculatorService) { _taxCalculatorService = taxCalculatorService; }
public void TestInitialize() { _taxCalculator = new TaxCalculatorService(); _settings = TaxBracketConfigSection.LoadSettings(); }
public TaxCalculatorService(ITaxCalculatorService taxCalculatorClient) { clientClass = taxCalculatorClient; }
public TaxController(ITaxCalculatorService taxCalculatorService, ITaxBracketService taxBracketService) { _taxCalculatorService = taxCalculatorService; _taxBracketService = taxBracketService; }
public App(ITaxCalculatorService taxCalculatorService, ILogger logger) { _taxCalculatorService = taxCalculatorService; this.Logger = logger; }
public PayrollFileService(IOptions <AppSettings> appSettingsOptions, ITaxCalculatorService taxCalculatorService) { _appSettingsOptions = appSettingsOptions; _taxCalculatorService = taxCalculatorService; }
public IncomeTaxController(ITaxCalculatorService taxCalculatorService) { _taxCalculatorService = taxCalculatorService; }
public CartService(ITaxCalculatorService taxCalculatorDataAccess, ICountryDefinitionDataAccess countryDefinitionDataAccess, ICartItemDataAccess cartItemDataAccess) { _taxCalculatorDataAccess = taxCalculatorDataAccess; _countryDefinitionDataAccess = countryDefinitionDataAccess; _cartItemDataAccess = cartItemDataAccess; }
public PayslipService(ITaxCalculatorService taxCalculator) { _taxCalculator = taxCalculator; }