public HttpTestingMessageHandler(HttpClientTestingFactorySettings settings)
        {
            this.settings = settings ?? throw new ArgumentNullException(nameof(settings));

            var comparer = new RequestExpectationEqualityComparer(this.settings);

            this.outstandingRequests     = new Dictionary <RequestExpectation, Queue <TestRequest> >(comparer);
            this.outstandingExpectations = new Dictionary <RequestExpectation, Queue <AutoResetEvent> >(comparer);
        }
 public RequestExpectationEqualityComparer(HttpClientTestingFactorySettings settings)
 {
     this.settings = settings ?? throw new ArgumentNullException(nameof(settings));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="HttpClientTestingFactory"/> class.
 /// </summary>
 /// <param name="settings">Settings to control the behavior of this object</param>
 public HttpClientTestingFactory(HttpClientTestingFactorySettings settings = null)
 {
     this.httpMessageHandler = new HttpTestingMessageHandler(settings ?? new HttpClientTestingFactorySettings());
     this.HttpClient         = new HttpClient(this.httpMessageHandler);
 }