public void PaymentIsAmount(eMoney money) { var payment = new Payment(0); var paymentController = new PaymentController(_repository, _ccProcessor); var response = paymentController.CreditCash(money); Assert.Equal(PaymentAmount.Money[money], _repository.Payment.Amount); }
public void DebitIsSuccessful() { var paymentController = new PaymentController(_repository, _ccProcessor); var payment = new Payment(0); var response = paymentController.CreditCash(eMoney.eOneDollar); Assert.Equal(PaymentAmount.Money[eMoney.eOneDollar], _repository.Payment.Amount); response = paymentController.DebitCash(eMoney.eOneDollar); Assert.Equal(0, _repository.Payment.Amount); }
public void PaymentAllIsCorrect() { var payment = new Payment(0); var paymentController = new PaymentController(_repository, _ccProcessor); decimal amount = 0; IHttpActionResult response = null; foreach (var money in PaymentAmount.Money) { amount += money.Value; response = paymentController.CreditCash(money.Key); } Assert.Equal(amount, _repository.Payment.Amount); }