Braintree.Tests.Integration.SubscriptionIntegrationTest.Search_OnMerchantAccountIdWithBogusMerchantId C# (CSharp) Метод

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

private Search_OnMerchantAccountIdWithBogusMerchantId ( ) : void
Результат void
        public void Search_OnMerchantAccountIdWithBogusMerchantId()
        {
            Random random = new Random();
            string subscriptionId = random.Next(0, 100000).ToString();
            var subscriptionRequest = new SubscriptionRequest
            {
                MerchantAccountId = MerchantAccountIDs.NON_DEFAULT_MERCHANT_ACCOUNT_ID,
                PaymentMethodToken = creditCard.Token,
                PlanId = PlanFixture.PLAN_WITH_TRIAL.Id,
                Price = 2M,
                Id = subscriptionId
            };

            gateway.Subscription.Create(subscriptionRequest);

            var searchRequest = new SubscriptionSearchRequest().
                MerchantAccountId.Is(MerchantAccountIDs.NON_DEFAULT_MERCHANT_ACCOUNT_ID).
                Id.Is(subscriptionId).
                Price.Is(2M);

            var collection = gateway.Subscription.Search(searchRequest);

            Assert.AreEqual(1, collection.MaximumCount);

            searchRequest = new SubscriptionSearchRequest().
                MerchantAccountId.IncludedIn(MerchantAccountIDs.NON_DEFAULT_MERCHANT_ACCOUNT_ID, "bogus_merchant_account_id").
                Id.Is(subscriptionId).
                Price.Is(2M);

            collection = gateway.Subscription.Search(searchRequest);

            Assert.AreEqual(1, collection.MaximumCount);

            searchRequest = new SubscriptionSearchRequest().
                MerchantAccountId.Is("bogus_merchant_account_id").
                Id.Is(subscriptionId).
                Price.Is(2M);

            collection = gateway.Subscription.Search(searchRequest);

            Assert.AreEqual(0, collection.MaximumCount);
        }
SubscriptionIntegrationTest