Braintree.Tests.Integration.CustomerIntegrationTest.Search_OnAllTextFields C# (CSharp) Метод

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

private Search_OnAllTextFields ( ) : void
Результат void
        public void Search_OnAllTextFields()
        {
            string creditCardToken = string.Format("cc{0}", new Random().Next(1000000).ToString());

            CustomerRequest request = new CustomerRequest
            {
                Company = "Braintree",
                Email = "[email protected]",
                Fax = "5551231234",
                FirstName = "Tom",
                LastName = "Smith",
                Phone = "5551231235",
                Website = "http://example.com",
                CreditCard = new CreditCardRequest
                {
                    CardholderName = "Tim Toole",
                    Number = "4111111111111111",
                    ExpirationDate = "05/2012",
                    Token = creditCardToken,
                    BillingAddress = new CreditCardAddressRequest
                    {
                        Company = "Braintree",
                        CountryName = "United States of America",
                        ExtendedAddress = "Suite 123",
                        FirstName = "Drew",
                        LastName = "Michaelson",
                        Locality = "Chicago",
                        PostalCode = "12345",
                        Region = "IL",
                        StreetAddress = "123 Main St"
                    }
                }
            };

            Customer customer = gateway.Customer.Create(request).Target;
            customer = gateway.Customer.Find(customer.Id);

            CustomerSearchRequest searchRequest = new CustomerSearchRequest().
                Id.Is(customer.Id).
                FirstName.Is("Tom").
                LastName.Is("Smith").
                Company.Is("Braintree").
                Email.Is("[email protected]").
                Website.Is("http://example.com").
                Fax.Is("5551231234").
                Phone.Is("5551231235").
                AddressFirstName.Is("Drew").
                AddressLastName.Is("Michaelson").
                AddressLocality.Is("Chicago").
                AddressPostalCode.Is("12345").
                AddressRegion.Is("IL").
                AddressCountryName.Is("United States of America").
                AddressStreetAddress.Is("123 Main St").
                AddressExtendedAddress.Is("Suite 123").
                PaymentMethodToken.Is(creditCardToken).
                CardholderName.Is("Tim Toole").
                CreditCardNumber.Is("4111111111111111").
                CreditCardExpirationDate.Is("05/2012");

            ResourceCollection<Customer> collection = gateway.Customer.Search(searchRequest);

            Assert.AreEqual(1, collection.MaximumCount);
            Assert.AreEqual(customer.Id, collection.FirstItem.Id);
        }
CustomerIntegrationTest