public async Task Should_return_a_response_with_an_id_and_a_status() { // Arrange var command = SubmitCommandFactory.CreateValidCommand(); // Act var response = await _client.Payment_SubmitAsync(command); // Assert response.Id.Should().NotBeNullOrEmpty(); response.Status.Should().BeOneOf(PaymentStatus.Rejected.ToString(), PaymentStatus.Approved.ToString()); }
public async Task Should_return_a_response_with_a_payment_view() { // Arrange var command = SubmitCommandFactory.CreateValidCommand(); // Act var response = await _client.Payment_SubmitAsync(command); var paymentView = await _client.Payment_GetAsync(Guid.Parse(response.Id)); // Assert paymentView.Should().NotBeNull(); paymentView.Id.Should().Be(response.Id); paymentView.Status.Should().Be(response.Status); paymentView.CardNumber.Should().EndWith("1111"); paymentView.Amount.Should().Be(command.Money.Amount); paymentView.Currency.Should().Be(command.Money.Currency.ToString()); }