public void TestValidNotCreditReturnsFalse()
        {
            Settings.GetSection("payments")["IsCreditAllowed"] = "false";
            bool IsCredit = PaymentCheck.CheckIfCreditIsAllowed(Settings);

            Assert.IsFalse(IsCredit);
        }
        public void TestPaymentDateAcceptsNonISODates()
        {
            Settings.GetSection("directDebitProcessingDays")["OngoingProcessingDays"] = "5";
            string PaymentAmount = PaymentCheck.CheckPaymentDate("15/08/2020", Settings);

            Assert.IsTrue(PaymentAmount == "2020-08-15");
        }
        public void TestValidPaymentDateAfterBankHoliday()
        {
            Settings.GetSection("directDebitProcessingDays")["OngoingProcessingDays"] = "29";
            string PaymentAmount = PaymentCheck.CheckPaymentDate("2020-09-01", Settings);

            Assert.IsTrue(PaymentAmount == "2020-09-01");
        }
        public void TestValidPaymentDate()
        {
            Settings.GetSection("directDebitProcessingDays")["OngoingProcessingDays"] = "5";
            string PaymentAmount = PaymentCheck.CheckPaymentDate("2020-08-15", Settings);

            Assert.IsTrue(PaymentAmount == "2020-08-15");
        }
 public void TestInvalidIsCreditThrowsError()
 {
     Settings.GetSection("payments")["IsCreditAllowed"] = "is not credit";
     PaymentCheck.CheckIfCreditIsAllowed(Settings);
 }
 public void TestPaymentDateInvalidDateThrowsError()
 {
     PaymentCheck.CheckPaymentDate("2019-13-13", Settings);
 }
 public void TestInvalidOngoingProcessingDaysThrowsError()
 {
     Settings.GetSection("directDebitProcessingDays")["OngoingProcessingDays"] = "five";
     PaymentCheck.CheckPaymentDate("15/07/2019", Settings);
 }