public virtual void GetAddressById()
        {
            CreateAddress();
            var id = AddressInstance.Id;

            var result = AddressServiceAdapter.Execute(s => s.GetById(id));

            Assert.AreEqual(AddressInstance.CustomerId, result.CustomerId, "incorrect customer id was found");
            Assert.AreEqual(AddressInstance.Id, result.Id, "incorrect address id was found");
            Assert.AreEqual("London", result.City, "incorrect city was returned");
        }
        public virtual void UpdateAddress()
        {
            CreateAddress();
            var dto = new AddressDto
            {
                Id         = AddressInstance.Id,
                CustomerId = AddressInstance.CustomerId,
                Street     = "55 River Road",
                City       = "Denver",
                PostCode   = "6099",
                Country    = "USA"
            };

            var result = AddressServiceAdapter.Execute(s => s.UpdateAddress(dto));

            Assert.AreEqual(AddressInstance.CustomerId, result.CustomerId, "incorrect customer id was found");
            Assert.AreEqual(AddressInstance.Id, result.Id, "incorrect address id was found");
            Assert.AreEqual("USA", result.Country, "incorrect country was returned");
        }
        public virtual void CreateAddress()
        {
            CreateCustomer();
            AddressInstance = AddressServiceAdapter.Execute(s => s.CreateNewAddress(new AddressDto
            {
                CustomerId = CustomerInstance.Id,
                Street     = "23 Thames Street",
                City       = "London",
                PostCode   = "16A",
                Country    = "England"
            }));

            Assert.AreEqual(CustomerInstance.Id, AddressInstance.CustomerId, "incorrect customer id was found");
            Assert.AreNotEqual(0, AddressInstance.Id, "incorrect address id was returned");

            var customer = CustomerServiceAdapter.Execute(s => s.GetById(CustomerInstance.Id));

            Assert.AreEqual(1, customer.Addresses.Count, "One address was expected");
        }