Summary

Class:WireMock.ResponseProviders.ProxyAsyncResponseProvider
Assembly:WireMock.Net
File(s):C:\Users\StefHeyenrath\Documents\GitHub\WireMock.Net\src\WireMock.Net\ResponseProviders\ProxyAsyncResponseProvider.cs
Covered lines:7
Uncovered lines:3
Coverable lines:10
Total lines:28
Line coverage:70%

Metrics

MethodCyclomatic complexity NPath complexity Sequence coverage Branch coverage
ProvideResponseAsync(...)0000
.ctor(...)0010

File(s)

C:\Users\StefHeyenrath\Documents\GitHub\WireMock.Net\src\WireMock.Net\ResponseProviders\ProxyAsyncResponseProvider.cs

#LineLine coverage
 1using System;
 2using System.Threading.Tasks;
 3using JetBrains.Annotations;
 4using WireMock.Settings;
 5using WireMock.Validation;
 6
 7namespace WireMock.ResponseProviders
 8{
 9    internal class ProxyAsyncResponseProvider : IResponseProvider
 10    {
 11        private readonly Func<RequestMessage, IProxyAndRecordSettings, Task<ResponseMessage>> _responseMessageFunc;
 12        private readonly IProxyAndRecordSettings _settings;
 13
 214        public ProxyAsyncResponseProvider([NotNull] Func<RequestMessage, IProxyAndRecordSettings, Task<ResponseMessage>>
 215        {
 216            Check.NotNull(responseMessageFunc, nameof(responseMessageFunc));
 217            Check.NotNull(settings, nameof(settings));
 18
 219            _responseMessageFunc = responseMessageFunc;
 220            _settings = settings;
 221        }
 22
 23        public Task<ResponseMessage> ProvideResponseAsync(RequestMessage requestMessage)
 024        {
 025            return _responseMessageFunc(requestMessage, _settings);
 026        }
 27    }
 28}