Beispiel #1
0
        static void Main(string[] args)
        {
            _discountService       = new DiscountService();
            _feeCalculationService = new FeeCalculationService(_discountService);

            _discountService.AddOrUpdateDiscount("TELIA", 10);
            _discountService.AddOrUpdateDiscount("CIRCLE_K", 20);

            var transactionsInput = File.ReadLines("transactions.txt");
            var transactions      = transactionsInput.Where(x => !string.IsNullOrWhiteSpace(x)).Select(ParseTransaction).ToList();

            var transactionFees = _feeCalculationService.CalculateFees(transactions);

            foreach (var transactionFee in transactionFees)
            {
                Console.WriteLine(transactionFee.ToString());
            }

            Console.ReadKey();
        }
 public void Setup()
 {
     _discountService = new DiscountService();
     _discountService.AddOrUpdateDiscount("TELIA", 10);
     _discountService.AddOrUpdateDiscount("CIRCLE_K", 20);
 }