Braintree.Tests.WebhookNotificationTest.SampleNotification_ReturnsANotificationForADisbursementWebhook C# (CSharp) Метод

SampleNotification_ReturnsANotificationForADisbursementWebhook() публичный Метод

public SampleNotification_ReturnsANotificationForADisbursementWebhook ( ) : void
Результат void
        public void SampleNotification_ReturnsANotificationForADisbursementWebhook()
        {
          Dictionary<string, string> sampleNotification = gateway.WebhookTesting.SampleNotification(WebhookKind.DISBURSEMENT, "my_id");

          WebhookNotification notification = gateway.WebhookNotification.Parse(sampleNotification["bt_signature"], sampleNotification["bt_payload"]);

          Assert.AreEqual(WebhookKind.DISBURSEMENT, notification.Kind);
          Assert.AreEqual("my_id", notification.Disbursement.Id);
          Assert.AreEqual(100.00, notification.Disbursement.Amount);
          Assert.AreEqual("bank_rejected", notification.Disbursement.ExceptionMessage);
          Assert.AreEqual(DateTime.Parse("2014-02-10"), notification.Disbursement.DisbursementDate);
          Assert.AreEqual("update_funding_information", notification.Disbursement.FollowUpAction);
          Assert.AreEqual("merchant_account_id", notification.Disbursement.MerchantAccount.Id);
          Assert.AreEqual(new string[] {"asdf", "qwer"}, notification.Disbursement.TransactionIds);
          Assert.AreEqual(true, notification.Disbursement.Success);
          Assert.AreEqual(false, notification.Disbursement.Retry);
        }