Acid.PuntoPagos.Sdk.Test.NotificationTransactionFixture.when_call_notification_whit_correct_variable_and_incorrect_transaction_return_notification_dto_with_error C# (CSharp) Method

when_call_notification_whit_correct_variable_and_incorrect_transaction_return_notification_dto_with_error() private method

        public void when_call_notification_whit_correct_variable_and_incorrect_transaction_return_notification_dto_with_error()
        {
            var httpRequest = WebRequest.Create("http://localhost/url");
            httpRequest.Headers.Add("fecha", "Thu, 14 Jun 2012 16:56:25 GMT");
            httpRequest.Headers.Add("Autorizacion", "PP 0PN5J17HBGZHT7ZZ3X82:fU6+JLYWzOSGuo76XJzT/Z596Qg=");
            _authorization.Setup(x => x.GetAuthorizationHeader(It.IsAny<string>())).Returns(
                "PP 0PN5J17HBGZHT7ZZ3X82:AVrD3e9idIqAxRSH+15Yqz7qQkc=");
            _webExecute.Setup(x => x.GetDataFromRequest(It.IsAny<WebRequest>())).Returns(new Dictionary<string, string>
                                                             {
                                                                 {"respuesta", "00"},
                                                                 {"medio_pago", "999"},
                                                                 {"monto", "1000000.00"},
                                                                 {"fecha_aprobacion", "2009-06-15T20:49:00"},
                                                                 {"numero_operacion", "7897851487"},
                                                                 {"codigo_autorizacion", "34581"},
                                                                 {"token", "9XJ08401WN0071839"},
                                                                 {"trx_id", "9787415132"}
                                                             });
            var notificationTransactionDto = CreateTransaction().NotificationTransaction(httpRequest);

            Assert.IsTrue(notificationTransactionDto.WithError);
            Assert.IsFalse(notificationTransactionDto.IsTransactionSuccessful());
            Assert.AreEqual("{\"respuesta\":\"99\",\"token\":\"9XJ08401WN0071839\"}", notificationTransactionDto.GenerateResponse());
        }