Ejemplo n.º 1
0
        public void test_03_second_movement_is_error_so_transaction_rollbacks()
        {
            var operationId = Transaction.Movements[1].OperationId;
            var response    = PaymentResponseFactory.GetFailedResponse(operationId);

            CheckResponseIs(response, 200);
            Transaction.Movements.Select(x => x.InProcess).Should().AllBeEquivalentTo(false);
            Transaction.Movements.Select(x => x.IsRollback).Should().AllBeEquivalentTo(true);
        }
Ejemplo n.º 2
0
        public void test_01_first_movement_is_succesfull_so_nothing_happens()
        {
            var operationId = Transaction.Movements[0].OperationId;
            var response    = PaymentResponseFactory.GetSuccesfullResponse(operationId);

            CheckResponseIs(response, 200);
            Transaction.Movements[0].IsSuccesfull.Should().BeTrue();
            Transaction.Movements[0].InProcess.Should().BeFalse();
            Transaction.Movements[0].IsRollback.Should().BeFalse();
        }
 public PaymentResponseConverter(PaymentResponseFactory paymentResponseFactory)
 {
     this._paymentResponseFactory = paymentResponseFactory;
 }