public async Task WithoutCultureCode() { var paymentId = Guid.NewGuid(); var payment = TestPaymentBuilder.Create(paymentId); await Runner.RunScenarioAsync( _ => I_call_api_put_without_culture_code(payment), _ => I_get_status_code(400), _ => I_can_see_a_message_containing("X-CultureCode header missing.") ); }
public async Task PaymentDoesExistTest() { var paymentId = Guid.NewGuid(); var payment = TestPaymentBuilder.Create(paymentId); await Runner.RunScenarioAsync( _ => I_populate_db_with_payment(payment), _ => I_call_api_get_with(paymentId), _ => I_get_status_code(200), _ => I_get_payment_data_in_the_content(payment) ); }
public async Task WithValidPaymentAndCultureCode() { var paymentId = Guid.NewGuid(); var payment = TestPaymentBuilder.Create(paymentId); await Runner.RunScenarioAsync( _ => I_call_api_put_with_culture_code(payment, "en-GB"), _ => I_get_status_code(200), _ => I_call_api_get_with(paymentId), _ => I_get_status_code(200) ); }
public async Task WithMissingPaymentType() { var paymentId = Guid.NewGuid(); var payment = TestPaymentBuilder.Create(paymentId); payment.Type = string.Empty; await Runner.RunScenarioAsync( _ => I_call_api_put_with_culture_code(payment, "en-GB"), _ => I_get_status_code(400), _ => I_can_see_a_message_containing("Payment Type missing.") ); }
public async Task WithNegativeAmount() { var paymentId = Guid.NewGuid(); var payment = TestPaymentBuilder.Create(paymentId); payment.Attributes.Amount = -1; await Runner.RunScenarioAsync( _ => I_call_api_put_with_culture_code(payment, "en-GB"), _ => I_get_status_code(400), _ => I_can_see_a_message_containing("Amount should be greater than 0.") ); }