Esempio n. 1
0
        public void ApplyPercentageDiscount(string dateString, string merchantName, decimal paymentAmount, decimal expectedFeeAmount)
        {
            var sut     = new PaymentProcessor(new TextRepository());
            var ruleSet = new RuleSet("CIRCLE_K", 20, 0, 1);

            var paymentDate      = Convert.ToDateTime(dateString);
            var payment          = new Payment(paymentDate, merchantName, paymentAmount);
            var processedPayment = sut.CalculateFeeFromPayment(payment, ruleSet, false);

            AssertFeeFields(dateString, merchantName, paymentAmount, expectedFeeAmount, processedPayment);
        }