コード例 #1
0
 public void GetPaymentShouldSucceed(CreatePaymentFixture fixture)
 {
     "Given a payment exists".x(fixture.GivenAPaymentExists);
     "When we get the Payments API".x(fixture.WhenThePaymentIsRetrieved);
     "Then a successful response is returned".x(fixture.ThenASuccessfulResponseIsReturned);
     "And the returned transaction was a success".x(fixture.AndTheTransactionWasASuccess);
 }
コード例 #2
0
 public void GetPaymentShouldFail(CreatePaymentFixture fixture)
 {
     "Given a payment does not exist".x(fixture.GivenAPaymentDoesNotExist);
     "When we get the Payments API".x(fixture.WhenThePaymentIsRetrieved);
     "Then a not found response is returned".x(fixture.ThenANotFoundResponseIsReturned);
 }
コード例 #3
0
 public void CreatePaymentShouldSucceed(string card, CreatePaymentFixture fixture)
 {
     "Given a payment with card number {card}".x(() => fixture.GivenAPaymentWithCard(card));
     "When a new payment is submitted".x(fixture.WhenThePaymentIsSubmitted);
     "Then a successful response is returned".x(fixture.ThenASuccessfulResponseIsReturned);
 }
コード例 #4
0
 public void CreatePaymentShouldFail(string card, CreatePaymentFixture fixture)
 {
     "Given a payment with card number {card}".x(() => fixture.GivenAPaymentWithCard(card));
     "When a new payment is submitted".x(fixture.WhenThePaymentIsSubmitted);
     "Then a bad request response is returned".x(fixture.ThenABadRequestResponseIsReturned);
 }