public void Should_return_false_when_payment_is_pending() { // Arrange var service = new DomainServices.PaymentService(); // Act var result = service.HasAlreadyBeenProcessed(_payment); // Assert result.Should().BeFalse(); }
public void Should_throw_when_payment_is_null() { // Arrange var service = new DomainServices.PaymentService(); // Act Action action = () => service.HasAlreadyBeenProcessed(null); // Assert action.Should().Throw <ArgumentNullException>(); }
public void Should_return_true_when_payment_has_been_rejected() { // Arrange var service = new DomainServices.PaymentService(); _payment.Reject(BankTransactionId.Create()); // Act var result = service.HasAlreadyBeenProcessed(_payment); // Assert result.Should().BeTrue(); }