Example #1
0
 public TaxStrategyFactory(
     TaxJarService taxJarService,
     OtherTaxService otherTaxService)
 {
     _taxJarService   = taxJarService;
     _otherTaxService = otherTaxService;
 }
Example #2
0
        public TaxServiceTests()
        {
            var config = new ConfigurationBuilder()
                         .SetBasePath(Directory.GetCurrentDirectory())
                         .AddJsonFile("appsettings.json")
                         .Build();

            var mockLogger = new Mock <ILogger <TaxJarService> >();
            ILogger <TaxJarService> logger = mockLogger.Object;


            _taxService = new TaxJarService(logger, config);
        }
Example #3
0
        static void Main(string[] args)
        {
            try
            {
                ITaxJarService service = new TaxJarService(new TaxJarRepository());



                HttpClient httpClient = new HttpClient();

                httpClient = setHttpClient(httpClient);
                GettotalTax(service, httpClient);
                GetCalculateTa(service, httpClient);
                GetLocalTaxRate(service, httpClient);
            }
            catch (Exception ex)
            {
                Console.ReadLine();
            }
        }