/// <summary>
        /// Arrange web response result mocks on client
        /// </summary>
        /// <param name="client">Client</param>
        /// <param name="mockResultsConfig">Mock results config</param>
        /// <returns>Result mocks</returns>
        public static ClientAPIMultipleWebQueryMocks ArrangeWebResponseResultMocks(this IMapsAPIClient client,
                                                                                   IEnumerable <MockResultWebResponseConfig> mockResultsConfig)
        {
            // Web request
            var webRequest = MockRepository.GenerateMock <HttpWebRequest>();

            // Web responses
            var webResponses = new List <HttpWebResponse>();

            // Loop results config
            foreach (var mockConfig in mockResultsConfig)
            {
                // Web response provided only once
                var webResponse = ClientAPIMockUtils.MockResultWebResponse(mockConfig);
                webRequest.Expect(x => x.GetResponse()).Return(webResponse).Repeat.Once();

                // Add it to responses list
                webResponses.Add(webResponse);
            }

            // Web request util
            var webRequestUtil = MockRepository.GeneratePartialMock <WebRequestUtility>(client);

            webRequestUtil.Stub(x => x.CreateWebRequest(null)).IgnoreArguments().Return(webRequest);

            // Client
            client.Stub(x => x.WebRequestUtility).Return(webRequestUtil);

            // Return result
            return(new ClientAPIMultipleWebQueryMocks(webRequestUtil, webRequest, webResponses));
        }
        /// <summary>
        /// Arrange web response result mocks on client
        /// </summary>
        /// <param name="client">Client</param>
        /// <param name="mockResultConfig">Mock result config</param>
        /// <returns>Result mocks</returns>
        public static ClientAPIWebQueryMocks ArrangeWebResponseResultMocks(this IMapsAPIClient client,
                                                                           MockResultWebResponseConfig mockResultConfig)
        {
            // Web response
            var webResponse = ClientAPIMockUtils.MockResultWebResponse(mockResultConfig);

            // Web request
            var webRequest = MockRepository.GenerateMock <HttpWebRequest>();

            webRequest.Stub(x => x.GetResponse()).Return(webResponse);

            // Web request util
            var webRequestUtil = MockRepository.GeneratePartialMock <WebRequestUtility>(client);

            webRequestUtil.Stub(x => x.CreateWebRequest(null)).IgnoreArguments().Return(webRequest);

            // Client
            client.Stub(x => x.WebRequestUtility).Return(webRequestUtil);

            // Return result
            return(new ClientAPIWebQueryMocks(webRequestUtil, webRequest, webResponse));
        }