public StubHttpClient Stub(StubRequestBuilder builder) { var request = builder.Build(); var key = GetRequestKey(request.Method, request.Url, request.RequestHeaders, request.RequestBody); if (this.stubbedRequests.ContainsKey(key)) { this.stubbedRequests[key] = request; } else { this.stubbedRequests.Add(key, request); } return this; }
public StubHttpClient Stub(StubRequestBuilder builder) { var request = builder.Build(); var key = GetRequestKey(request.Method, request.Url, request.RequestHeaders, request.RequestBody); if (this.stubbedRequests.ContainsKey(key)) { this.stubbedRequests[key] = request; } else { this.stubbedRequests.Add(key, request); } return(this); }