Provides a fake, in-memory, stateless simulated payment provider for testing code that uses a IPurchase.
Inheritance: IPurchase
Exemplo n.º 1
0
 public void FakeBank_Declines_Payments_Over_Ten_Pounds()
 {
     var gw = new PaymentGateway();
     var response = gw.Purchase("pay001", new Money(10.01m, new Currency("GBP")), new PaymentCard());
     Assert.Equal(PaymentStatus.Declined, response.Status);
 }
Exemplo n.º 2
0
 public void FakeBank_Approves_Payments_Under_Ten_Pounds()
 {
     var gw = new PaymentGateway();
     var response = gw.Purchase("pay001", new Money(9.99m, new Currency("GBP")), new PaymentCard());
     Assert.Equal(PaymentStatus.Ok, response.Status);
 }