Exemple #1
0
        public void Then_An_InvalidOperationException_Is_Thrown_When_The_Ids_Do_Not_Match()
        {
            var payment = new EmployerPayment(new PaymentModel {
                EmployerAccountId = EmployerAccountId, ExternalPaymentId = "DDDD"
            });

            Assert.Throws <InvalidOperationException>(() =>
            {
                payment.RegisterPayment(new PaymentModel
                {
                    ExternalPaymentId = Id,
                    EmployerAccountId = EmployerAccountId,
                    Amount            = Amount,
                    ApprenticeshipId  = ApprenticeshipId,
                    LearnerId         = LearnerId,
                    ProviderId        = Ukprn
                });
            });
        }
Exemple #2
0
        public void Stores_Payment_Info()
        {
            var payment = new EmployerPayment(new PaymentModel {
                EmployerAccountId = EmployerAccountId, ExternalPaymentId = "TESTID"
            });

            payment.RegisterPayment(new PaymentModel
            {
                ExternalPaymentId = Id,
                EmployerAccountId = EmployerAccountId,
                Amount            = Amount,
                ApprenticeshipId  = ApprenticeshipId,
                LearnerId         = LearnerId,
                ProviderId        = Ukprn
            });

            Assert.IsTrue(Id.Equals(payment.ExternalPaymentId, StringComparison.CurrentCultureIgnoreCase));
            Assert.AreEqual(EmployerAccountId, payment.EmployerAccountId);
            Assert.AreEqual(Ukprn, payment.ProviderId);
            Assert.AreEqual(ApprenticeshipId, payment.ApprenticeshipId);
            Assert.AreEqual(Amount, payment.Amount);
        }