public void Setup() { this.runner = new RpcRequestRunner( new FakeSender(), new RpcOptions() .UseExactRequestTypeNameMatchingConvention() .ScanRequests(this.requestFactory.TakeRequestTypes(RegistratedRequestsCount).ToList())); }
public void Setup() { var requests = this.requestFactory.TakeRequestTypes(RegistratedRequestsCount).ToList(); var requestToProcess = requests[RegistratedRequestsCount / 2]; this.requestName = requestToProcess.Name; var runner = new RpcRequestRunner( // As MediatR-RPC only use the non-generic MediatR api, we can just return any type. // Doesn't have to match the corresponding in request and it will not effect the benchmarking. new FakeSender(new RpcBenchmarkResponse()), new RpcOptions() .UseExactRequestTypeNameMatchingConvention() .ScanRequests(requests)); this.httpCaller = new RpcHttpFunction( new RpcHttpFunctionOptions() .UseNewtonsoftJsonForDeserializeBody() .UseOkorNotFoundActionResults(), runner); this.httpRequest = new FakeHttpRequest(); }