Acid.PuntoPagos.Sdk.Test.Dto.CreateTransactionResponseDtoFixture.given_json_response_with_error_from_punto_pago_when_call_json_serializer_then_return_transaction_response_dto_with_error C# (CSharp) Метод

given_json_response_with_error_from_punto_pago_when_call_json_serializer_then_return_transaction_response_dto_with_error() приватный Метод

        public void given_json_response_with_error_from_punto_pago_when_call_json_serializer_then_return_transaction_response_dto_with_error()
        {
            const string json = "{\"respuesta\":\"99\",\"token\":\"9XJ08401WN0071839\",\"trx_id\":\"9787415132\"}";
            _configuration.Setup(x => x.GetProcessTransactionUrl()).Returns("/url");
            var transactionResponseDto = new CreateTransactionResponseDto(JsonSerializerService.DeserializeFromString(json), _configuration.Object);

            Assert.AreEqual("9XJ08401WN0071839", transactionResponseDto.Token);
            Assert.AreEqual(9787415132, transactionResponseDto.TransactionId);
            Assert.IsTrue(transactionResponseDto.WithError);
            Assert.IsNull(transactionResponseDto.PaymentMethod);
            Assert.IsNull(transactionResponseDto.Currency);
            Assert.IsNullOrEmpty(transactionResponseDto.ErrorMessage);
            Assert.AreEqual("/url/9XJ08401WN0071839", transactionResponseDto.ProcessUrl);
        }