public void ChargesTestAboveFiftyThousand()
        {
            var actual   = ApplyCharges.AmountToPay(_actualFunc, 49980);
            var expected = 50030;

            Assert.Equal(expected, actual);
        }
        public void ChargesTestBelowFiftyThousand()
        {
            var actual   = ApplyCharges.AmountToPay(_actualFunc, 44975);
            var expected = 45000;

            Assert.Equal(expected, actual);
        }
Exemple #3
0
        public void InputPage()
        {
            bool isValidInput = false;
            int  input;

            do
            {
                Console.WriteLine();
                Console.WriteLine("                           please provide the amount to  transfer");
                isValidInput = int.TryParse(Console.ReadLine(), out input);


                Console.WriteLine();
                Console.WriteLine("=================================================================");
            } while (!isValidInput);

            var amount = ApplyCharges.AmountToPay(Configuration.GetFeeSection, input);

            Console.WriteLine("================================================");
            Console.WriteLine("Amount  TransferAmount  Charges   Amount to be Debited  ");
            Console.WriteLine($"{amount.Amount}       {amount.AdvisedAmount}        {amount.AmountCharge}          {amount.AmountDebited} ");
            Console.WriteLine($"the transaction amount of {amount.AdvisedAmount} will be model");
            Console.WriteLine("press any key to continue");
            Console.WriteLine("===============================================");
            Console.Read();
        }
Exemple #4
0
        public void TestForChargesBelowFiveThousand(double value)
        {
            var result   = ApplyCharges.AmountToPay(_configuration, value);
            var expected = 10;

            Assert.Equal(expected, result);
        }
Exemple #5
0
 private static void DisplayCharge(double amount)
 {
     Console.Clear();
     Console.WriteLine($"the charge fee for this transfer is {ApplyCharges.AmountToPay(  Configuration.GetFeeSection(),amount)}");
 }