From 87441f3ed628ec7c39c226e9f7627503c004cd7d Mon Sep 17 00:00:00 2001 From: Stef Heyenrath Date: Sun, 23 Sep 2018 13:05:26 +0200 Subject: [PATCH 01/12] tests --- src/WireMock.Net/Owin/OwinResponseMapper.cs | 74 +++++++-------- .../FluentMockServerTests.cs | 93 +++---------------- .../OwinResponseMapperTests.cs | 53 +++++++++++ .../RequestBuilderUsingMethodTests.cs | 15 ++- .../ResponseBuilders/ResponseCreateTests.cs | 3 +- .../ResponseBuilders/ResponseWithBodyTests.cs | 22 +++++ 6 files changed, 133 insertions(+), 127 deletions(-) create mode 100644 test/WireMock.Net.Tests/OwinResponseMapperTests.cs diff --git a/src/WireMock.Net/Owin/OwinResponseMapper.cs b/src/WireMock.Net/Owin/OwinResponseMapper.cs index 5d27a5b0c..f985ee2b4 100644 --- a/src/WireMock.Net/Owin/OwinResponseMapper.cs +++ b/src/WireMock.Net/Owin/OwinResponseMapper.cs @@ -9,9 +9,11 @@ using WireMock.Http; using WireMock.Util; #if !USE_ASPNETCORE +using IResponse = Microsoft.Owin.IOwinResponse; using Microsoft.Owin; #else using Microsoft.AspNetCore.Http; +using IResponse = Microsoft.AspNetCore.Http.HttpResponse; #endif namespace WireMock.Owin @@ -25,56 +27,19 @@ public class OwinResponseMapper // https://msdn.microsoft.com/en-us/library/78h415ay(v=vs.110).aspx #if !USE_ASPNETCORE - private static readonly IDictionary>> ResponseHeadersToFix = new Dictionary>>(StringComparer.OrdinalIgnoreCase) { + private static readonly IDictionary>> ResponseHeadersToFix = new Dictionary>>(StringComparer.OrdinalIgnoreCase) { #else - private static readonly IDictionary>> ResponseHeadersToFix = new Dictionary>>(StringComparer.OrdinalIgnoreCase) { + private static readonly IDictionary>> ResponseHeadersToFix = new Dictionary>>(StringComparer.OrdinalIgnoreCase) { #endif { HttpKnownHeaderNames.ContentType, (r, v) => r.ContentType = v.FirstOrDefault() } }; - private void SetResponseHeaders(ResponseMessage responseMessage -#if !USE_ASPNETCORE - , IOwinResponse response -#else - , HttpResponse response -#endif - ) - { - // Set headers - foreach (var pair in responseMessage.Headers) - { - if (ResponseHeadersToFix.ContainsKey(pair.Key)) - { - ResponseHeadersToFix[pair.Key]?.Invoke(response, pair.Value); - } - else - { -#if !USE_ASPNETCORE - // For non-NETSTANDARD, check if this response header can be added (#148) - if (!WebHeaderCollection.IsRestricted(pair.Key, true)) - { - response.Headers.AppendValues(pair.Key, pair.Value.ToArray()); - } -#else - // NETSTANDARD can add any header (or so it seems) - response.Headers.Append(pair.Key, pair.Value.ToArray()); -#endif - } - } - } - /// /// Map ResponseMessage to OwinResponse/HttpResponse /// - /// - /// - public async Task MapAsync(ResponseMessage responseMessage -#if !USE_ASPNETCORE - , IOwinResponse response -#else - , HttpResponse response -#endif - ) + /// The ResponseMessage + /// The OwinResponse/HttpResponse + public async Task MapAsync(ResponseMessage responseMessage, IResponse response) { if (responseMessage == null) { @@ -110,5 +75,30 @@ public async Task MapAsync(ResponseMessage responseMessage await response.Body.WriteAsync(bytes, 0, bytes.Length); } } + + private void SetResponseHeaders(ResponseMessage responseMessage, IResponse response) + { + // Set headers + foreach (var pair in responseMessage.Headers) + { + if (ResponseHeadersToFix.ContainsKey(pair.Key)) + { + ResponseHeadersToFix[pair.Key]?.Invoke(response, pair.Value); + } + else + { +#if !USE_ASPNETCORE + // For non-NETSTANDARD, check if this response header can be added (#148) + if (!WebHeaderCollection.IsRestricted(pair.Key, true)) + { + response.Headers.AppendValues(pair.Key, pair.Value.ToArray()); + } +#else + // NETSTANDARD can add any header (or so it seems) + response.Headers.Append(pair.Key, pair.Value.ToArray()); +#endif + } + } + } } } \ No newline at end of file diff --git a/test/WireMock.Net.Tests/FluentMockServerTests.cs b/test/WireMock.Net.Tests/FluentMockServerTests.cs index 959417bdd..279eb3dd7 100644 --- a/test/WireMock.Net.Tests/FluentMockServerTests.cs +++ b/test/WireMock.Net.Tests/FluentMockServerTests.cs @@ -19,89 +19,22 @@ public class FluentMockServerTests { private static string jsonRequestMessage = @"{ ""message"" : ""Hello server"" }"; - [Fact] - public async Task FluentMockServer_Should_respond_to_request_methodPatch() - { - // given - string path = $"/foo_{Guid.NewGuid()}"; - var _server = FluentMockServer.Start(); - - _server.Given(Request.Create().WithPath(path).UsingMethod("patch")) - .RespondWith(Response.Create().WithBody("hello patch")); - - // when - var msg = new HttpRequestMessage(new HttpMethod("PATCH"), new Uri("http://localhost:" + _server.Ports[0] + path)) - { - Content = new StringContent("{\"data\": {\"attr\":\"value\"}}") - }; - var response = await new HttpClient().SendAsync(msg); - - // then - Check.That(response.StatusCode).IsEqualTo(HttpStatusCode.OK); - var responseBody = await response.Content.ReadAsStringAsync(); - Check.That(responseBody).IsEqualTo("hello patch"); - - Check.That(_server.LogEntries).HasSize(1); - var requestLogged = _server.LogEntries.First(); - Check.That(requestLogged.RequestMessage.Method).IsEqualTo("PATCH"); - Check.That(requestLogged.RequestMessage.Body).IsNotNull(); - Check.That(requestLogged.RequestMessage.Body).IsEqualTo("{\"data\": {\"attr\":\"value\"}}"); - } - - [Fact] - public async Task FluentMockServer_Should_respond_to_request_bodyAsString() - { - // given - var _server = FluentMockServer.Start(); - - _server - .Given(Request.Create() - .WithPath("/foo") - .UsingGet()) - .RespondWith(Response.Create() - .WithStatusCode(200) - .WithBody("Hello world!")); - - // when - var response = await new HttpClient().GetStringAsync("http://localhost:" + _server.Ports[0] + "/foo"); - - // then - Check.That(response).IsEqualTo("Hello world!"); - } - - [Fact] - public async Task FluentMockServer_Should_respond_to_request_BodyAsJson() - { - // Assign - var _server = FluentMockServer.Start(); - - _server - .Given(Request.Create().UsingAnyMethod()) - .RespondWith(Response.Create().WithBodyAsJson(new { message = "Hello" })); - - // Act - var response = await new HttpClient().GetStringAsync("http://localhost:" + _server.Ports[0]); - - // Assert - Check.That(response).IsEqualTo("{\"message\":\"Hello\"}"); - } - - [Fact] - public async Task FluentMockServer_Should_respond_to_request_BodyAsJson_Indented() - { - // Assign - var _server = FluentMockServer.Start(); + //[Fact] + //public async Task FluentMockServer_Should_respond_to_request_BodyAsJson_Indented() + //{ + // // Assign + // var _server = FluentMockServer.Start(); - _server - .Given(Request.Create().UsingAnyMethod()) - .RespondWith(Response.Create().WithBodyAsJson(new { message = "Hello" }, true)); + // _server + // .Given(Request.Create().UsingAnyMethod()) + // .RespondWith(Response.Create().WithBodyAsJson(new { message = "Hello" }, true)); - // Act - var response = await new HttpClient().GetStringAsync("http://localhost:" + _server.Ports[0]); + // // Act + // var response = await new HttpClient().GetStringAsync("http://localhost:" + _server.Ports[0]); - // Assert - Check.That(response).IsEqualTo($"{{{Environment.NewLine} \"message\": \"Hello\"{Environment.NewLine}}}"); - } + // // Assert + // Check.That(response).IsEqualTo($"{{{Environment.NewLine} \"message\": \"Hello\"{Environment.NewLine}}}"); + //} [Fact] public async Task FluentMockServer_Should_respond_to_request_bodyAsCallback() diff --git a/test/WireMock.Net.Tests/OwinResponseMapperTests.cs b/test/WireMock.Net.Tests/OwinResponseMapperTests.cs new file mode 100644 index 000000000..d4fd306e7 --- /dev/null +++ b/test/WireMock.Net.Tests/OwinResponseMapperTests.cs @@ -0,0 +1,53 @@ +using NFluent; +using WireMock.Owin; +using Xunit; +using Moq; +#if NET452 +using Microsoft.Owin; +using IResponse = Microsoft.Owin.IOwinResponse; +using Response = Microsoft.Owin.OwinResponse; +#else +using Microsoft.AspNetCore.Http; +using IResponse = Microsoft.AspNetCore.Http.HttpResponse; +using Response = Microsoft.AspNetCore.Http.HttpResponse; +#endif + +namespace WireMock.Net.Tests +{ + public class OwinResponseMapperTests + { + private OwinResponseMapper _sut; + private Mock _responseMock; + + public OwinResponseMapperTests() + { + _responseMock = new Mock(); + _responseMock.SetupAllProperties(); + + _sut = new OwinResponseMapper(); + } + + [Fact] + public async void OwinResponseMapper_MapAsync_Null() + { + // Act + await _sut.MapAsync(null, _responseMock.Object); + } + + [Fact] + public async void OwinResponseMapper_MapAsync_StatusCode() + { + // Assign + var responseMessage = new ResponseMessage + { + StatusCode = 302 + }; + + // Act + await _sut.MapAsync(responseMessage, _responseMock.Object); + + // Assert + _responseMock.VerifySet(r => r.StatusCode = 302, Times.Once); + } + } +} \ No newline at end of file diff --git a/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderUsingMethodTests.cs b/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderUsingMethodTests.cs index 183e9b8d5..f6898e825 100644 --- a/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderUsingMethodTests.cs +++ b/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderUsingMethodTests.cs @@ -1,16 +1,25 @@ using System.Collections.Generic; using NFluent; -using WireMock.Matchers; using WireMock.Matchers.Request; -using WireMock.Models; using WireMock.RequestBuilders; -using WireMock.Util; using Xunit; namespace WireMock.Net.Tests { public class RequestBuilderUsingMethodTests { + [Fact] + public void RequestBuilder_UsingPatch() + { + // Act + var requestBuilder = (Request)Request.Create().UsingPatch(); + + // Assert 1 + var matchers = requestBuilder.GetPrivateFieldValue>("_requestMatchers"); + Check.That(matchers.Count()).IsEqualTo(1); + Check.That((matchers[0] as RequestMessageMethodMatcher).Methods).ContainsExactly("PATCH"); + } + [Fact] public void RequestBuilder_UsingAnyMethod_ClearsAllOtherMatches() { diff --git a/test/WireMock.Net.Tests/ResponseBuilders/ResponseCreateTests.cs b/test/WireMock.Net.Tests/ResponseBuilders/ResponseCreateTests.cs index 2842662ba..aa85906b2 100644 --- a/test/WireMock.Net.Tests/ResponseBuilders/ResponseCreateTests.cs +++ b/test/WireMock.Net.Tests/ResponseBuilders/ResponseCreateTests.cs @@ -1,5 +1,4 @@ -using System; -using System.Threading.Tasks; +using System.Threading.Tasks; using NFluent; using WireMock.Models; using WireMock.ResponseBuilders; diff --git a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithBodyTests.cs b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithBodyTests.cs index a13e26c17..91b0517a1 100644 --- a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithBodyTests.cs +++ b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithBodyTests.cs @@ -96,6 +96,28 @@ public async Task Response_ProvideResponse_WithBody_Object_Encoding() Check.That(responseMessage.BodyEncoding).Equals(Encoding.ASCII); } + [Fact] + public async Task Response_ProvideResponse_WithBody_Object_Indented() + { + // given + var body = new BodyData + { + BodyAsString = "abc" + }; + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "POST", ClientIp, body); + + object x = new { message = "Hello" }; + var response = Response.Create().WithBodyAsJson(x, true); + + // act + var responseMessage = await response.ProvideResponseAsync(request); + + // then + Check.That(responseMessage.BodyAsJson).IsNotNull(); + Check.That(responseMessage.BodyAsJson).Equals(x); + Check.That(responseMessage.BodyAsJsonIndented).IsEqualTo(true); + } + [Fact] public async Task Response_ProvideResponse_WithBody_String_SameAsSource_Encoding() { From a773fe16ec5835780fef31a808ca941ae635cf98 Mon Sep 17 00:00:00 2001 From: Stef Heyenrath Date: Mon, 24 Sep 2018 11:38:19 +0200 Subject: [PATCH 02/12] OwinResponseMapperTests --- src/WireMock.Net/Owin/OwinResponseMapper.cs | 8 +- .../OwinResponseMapperTests.cs | 115 +++++++++++++++++- .../ResponseWithHeadersTests.cs | 3 +- 3 files changed, 119 insertions(+), 7 deletions(-) diff --git a/src/WireMock.Net/Owin/OwinResponseMapper.cs b/src/WireMock.Net/Owin/OwinResponseMapper.cs index f985ee2b4..fdd1a3e83 100644 --- a/src/WireMock.Net/Owin/OwinResponseMapper.cs +++ b/src/WireMock.Net/Owin/OwinResponseMapper.cs @@ -2,15 +2,15 @@ using System.Collections.Generic; using System.IO; using System.Linq; -using System.Net; using System.Text; using System.Threading.Tasks; using Newtonsoft.Json; using WireMock.Http; using WireMock.Util; #if !USE_ASPNETCORE -using IResponse = Microsoft.Owin.IOwinResponse; +using System.Net; using Microsoft.Owin; +using IResponse = Microsoft.Owin.IOwinResponse; #else using Microsoft.AspNetCore.Http; using IResponse = Microsoft.AspNetCore.Http.HttpResponse; @@ -27,9 +27,9 @@ public class OwinResponseMapper // https://msdn.microsoft.com/en-us/library/78h415ay(v=vs.110).aspx #if !USE_ASPNETCORE - private static readonly IDictionary>> ResponseHeadersToFix = new Dictionary>>(StringComparer.OrdinalIgnoreCase) { + private static readonly IDictionary>> ResponseHeadersToFix = new Dictionary>>(StringComparer.OrdinalIgnoreCase) { #else - private static readonly IDictionary>> ResponseHeadersToFix = new Dictionary>>(StringComparer.OrdinalIgnoreCase) { + private static readonly IDictionary>> ResponseHeadersToFix = new Dictionary>>(StringComparer.OrdinalIgnoreCase) { #endif { HttpKnownHeaderNames.ContentType, (r, v) => r.ContentType = v.FirstOrDefault() } }; diff --git a/test/WireMock.Net.Tests/OwinResponseMapperTests.cs b/test/WireMock.Net.Tests/OwinResponseMapperTests.cs index d4fd306e7..2419533d3 100644 --- a/test/WireMock.Net.Tests/OwinResponseMapperTests.cs +++ b/test/WireMock.Net.Tests/OwinResponseMapperTests.cs @@ -1,7 +1,11 @@ -using NFluent; +using System.Collections.Generic; +using System.IO; using WireMock.Owin; using Xunit; using Moq; +using System.Threading.Tasks; +using System.Threading; +using WireMock.Util; #if NET452 using Microsoft.Owin; using IResponse = Microsoft.Owin.IOwinResponse; @@ -10,19 +14,37 @@ using Microsoft.AspNetCore.Http; using IResponse = Microsoft.AspNetCore.Http.HttpResponse; using Response = Microsoft.AspNetCore.Http.HttpResponse; +using Microsoft.Extensions.Primitives; #endif namespace WireMock.Net.Tests { public class OwinResponseMapperTests { + private static Task completedTask = Task.FromResult(true); private OwinResponseMapper _sut; private Mock _responseMock; + private Mock _stream; + private Mock _headers; public OwinResponseMapperTests() { + _stream = new Mock(); + _stream.SetupAllProperties(); + _stream.Setup(s => s.WriteAsync(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())).Returns(completedTask); + + _headers = new Mock(); + _headers.SetupAllProperties(); +#if NET452 + _headers.Setup(h => h.AppendValues(It.IsAny(), It.IsAny())); +#else + _headers.Setup(h => h.Add(It.IsAny(), It.IsAny())); +#endif + _responseMock = new Mock(); _responseMock.SetupAllProperties(); + _responseMock.SetupGet(r => r.Body).Returns(_stream.Object); + _responseMock.SetupGet(r => r.Headers).Returns(_headers.Object); _sut = new OwinResponseMapper(); } @@ -49,5 +71,96 @@ public async void OwinResponseMapper_MapAsync_StatusCode() // Assert _responseMock.VerifySet(r => r.StatusCode = 302, Times.Once); } + + [Fact] + public async void OwinResponseMapper_MapAsync_NoBody() + { + // Assign + var responseMessage = new ResponseMessage + { + Headers = new Dictionary>() + }; + + // Act + await _sut.MapAsync(responseMessage, _responseMock.Object); + + // Assert + _stream.Verify(s => s.WriteAsync(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny()), Times.Never); + } + + [Fact] + public async void OwinResponseMapper_MapAsync_Body() + { + // Assign + string body = "abc"; + var responseMessage = new ResponseMessage + { + Headers = new Dictionary>(), + Body = body + }; + + // Act + await _sut.MapAsync(responseMessage, _responseMock.Object); + + // Assert + _stream.Verify(s => s.WriteAsync(new byte[] { 97, 98, 99 }, 0, 3, It.IsAny()), Times.Once); + } + + [Fact] + public async void OwinResponseMapper_MapAsync_BodyAsBytes() + { + // Assign + var bytes = new byte[] { 48, 49 }; + var responseMessage = new ResponseMessage + { + Headers = new Dictionary>(), + BodyAsBytes = bytes + }; + + // Act + await _sut.MapAsync(responseMessage, _responseMock.Object); + + // Assert + _stream.Verify(s => s.WriteAsync(bytes, 0, bytes.Length, It.IsAny()), Times.Once); + } + + [Fact] + public async void OwinResponseMapper_MapAsync_BodyAsJson() + { + // Assign + var responseMessage = new ResponseMessage + { + Headers = new Dictionary>(), + BodyAsJson = new { t = "x", i = (string)null }, + BodyAsJsonIndented = false + }; + + // Act + await _sut.MapAsync(responseMessage, _responseMock.Object); + + // Assert + _stream.Verify(s => s.WriteAsync(new byte[] { 123, 34, 116, 34, 58, 34, 120, 34, 125 }, 0, 9, It.IsAny()), Times.Once); + } + + [Fact] + public async void OwinResponseMapper_MapAsync_SetResponseHeaders() + { + // Assign + var responseMessage = new ResponseMessage + { + Headers = new Dictionary> { { "h", new WireMockList("x", "y") } } + }; + + // Act + await _sut.MapAsync(responseMessage, _responseMock.Object); + + // Assert +#if NET452 + _headers.Verify(h => h.AppendValues("h", new string[] { "x", "y" } ), Times.Once); +#else + var v = new StringValues(); + _headers.Verify(h => h.TryGetValue("h", out v), Times.Once); +#endif + } } } \ No newline at end of file diff --git a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHeadersTests.cs b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHeadersTests.cs index 1d13d9000..78e6f98f4 100644 --- a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHeadersTests.cs +++ b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHeadersTests.cs @@ -1,5 +1,4 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Threading.Tasks; using NFluent; using WireMock.Models; From d8c183139f1ccd32002617aa6bd2ccec9b8d8ed4 Mon Sep 17 00:00:00 2001 From: Stef Heyenrath Date: Mon, 24 Sep 2018 12:48:48 +0200 Subject: [PATCH 03/12] RequestBuilder_WithBody_IMatcher --- .../FluentMockServerTests.cs | 79 +------------------ .../RequestBuilderWithBodyTests.cs | 27 +++++++ .../RequestBuilderWithCookieTests.cs | 4 +- .../RequestBuilderWithHeaderTests.cs | 2 +- 4 files changed, 30 insertions(+), 82 deletions(-) create mode 100644 test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithBodyTests.cs diff --git a/test/WireMock.Net.Tests/FluentMockServerTests.cs b/test/WireMock.Net.Tests/FluentMockServerTests.cs index 279eb3dd7..e4af9d167 100644 --- a/test/WireMock.Net.Tests/FluentMockServerTests.cs +++ b/test/WireMock.Net.Tests/FluentMockServerTests.cs @@ -1,11 +1,9 @@ using NFluent; using System; -using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Net; using System.Net.Http; -using System.Text; using System.Threading.Tasks; using WireMock.Matchers; using WireMock.RequestBuilders; @@ -17,25 +15,6 @@ namespace WireMock.Net.Tests { public class FluentMockServerTests { - private static string jsonRequestMessage = @"{ ""message"" : ""Hello server"" }"; - - //[Fact] - //public async Task FluentMockServer_Should_respond_to_request_BodyAsJson_Indented() - //{ - // // Assign - // var _server = FluentMockServer.Start(); - - // _server - // .Given(Request.Create().UsingAnyMethod()) - // .RespondWith(Response.Create().WithBodyAsJson(new { message = "Hello" }, true)); - - // // Act - // var response = await new HttpClient().GetStringAsync("http://localhost:" + _server.Ports[0]); - - // // Assert - // Check.That(response).IsEqualTo($"{{{Environment.NewLine} \"message\": \"Hello\"{Environment.NewLine}}}"); - //} - [Fact] public async Task FluentMockServer_Should_respond_to_request_bodyAsCallback() { @@ -57,7 +36,7 @@ public async Task FluentMockServer_Should_respond_to_request_bodyAsCallback() // Assert string content = await response.Content.ReadAsStringAsync(); Check.That(content).IsEqualTo("path: /foo"); - Check.That((int) response.StatusCode).IsEqualTo(500); + Check.That((int)response.StatusCode).IsEqualTo(500); Check.That(response.Headers.GetValues("H1")).ContainsExactly("X1"); } @@ -76,62 +55,6 @@ public async Task FluentMockServer_Should_respond_to_request_bodyAsBase64() Check.That(response).IsEqualTo("Hello World?"); } - [Fact] - public async Task FluentMockServer_Should_respond_to_request_bodyAsBytes() - { - // given - string path = $"/foo_{Guid.NewGuid()}"; - var _server = FluentMockServer.Start(); - - _server.Given(Request.Create().WithPath(path).UsingGet()).RespondWith(Response.Create().WithBody(new byte[] { 48, 49 })); - - // when - var responseAsString = await new HttpClient().GetStringAsync("http://localhost:" + _server.Ports[0] + path); - var responseAsBytes = await new HttpClient().GetByteArrayAsync("http://localhost:" + _server.Ports[0] + path); - - // then - Check.That(responseAsString).IsEqualTo("01"); - Check.That(responseAsBytes).ContainsExactly(new byte[] { 48, 49 }); - } - - [Fact] - public async Task FluentMockServer_Should_respond_to_valid_matchers_when_sent_json() - { - // Assign - var validMatchersForHelloServerJsonMessage = new List - { - new object[] { new WildcardMatcher("*Hello server*"), "application/json" }, - new object[] { new WildcardMatcher("*Hello server*"), "text/plain" }, - new object[] { new ExactMatcher(jsonRequestMessage), "application/json" }, - new object[] { new ExactMatcher(jsonRequestMessage), "text/plain" }, - new object[] { new RegexMatcher("Hello server"), "application/json" }, - new object[] { new RegexMatcher("Hello server"), "text/plain" }, - new object[] { new JsonPathMatcher("$..[?(@.message == 'Hello server')]"), "application/json" }, - new object[] { new JsonPathMatcher("$..[?(@.message == 'Hello server')]"), "text/plain" } - }; - - var _server = FluentMockServer.Start(); - - foreach (var item in validMatchersForHelloServerJsonMessage) - { - string path = $"/foo_{Guid.NewGuid()}"; - _server - .Given(Request.Create().WithPath(path).WithBody((IMatcher)item[0])) - .RespondWith(Response.Create().WithBody("Hello client")); - - // Act - var content = new StringContent(jsonRequestMessage, Encoding.UTF8, (string)item[1]); - var response = await new HttpClient().PostAsync("http://localhost:" + _server.Ports[0] + path, content); - - // Assert - var responseString = await response.Content.ReadAsStringAsync(); - Check.That(responseString).Equals("Hello client"); - - _server.ResetMappings(); - _server.ResetLogEntries(); - } - } - [Fact] public async Task FluentMockServer_Should_respond_404_for_unexpected_request() { diff --git a/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithBodyTests.cs b/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithBodyTests.cs new file mode 100644 index 000000000..d75662cfb --- /dev/null +++ b/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithBodyTests.cs @@ -0,0 +1,27 @@ +using System.Collections.Generic; +using NFluent; +using WireMock.Matchers; +using WireMock.Matchers.Request; +using WireMock.RequestBuilders; +using Xunit; + +namespace WireMock.Net.Tests +{ + public class RequestBuilderWithBodyTests + { + [Fact] + public void RequestBuilder_WithBody_IMatcher() + { + // Assign + var matcher = new WildcardMatcher("x"); + + // Act + var requestBuilder = (Request)Request.Create().WithBody(matcher); + + // Assert + var matchers = requestBuilder.GetPrivateFieldValue>("_requestMatchers"); + Check.That(matchers.Count()).IsEqualTo(1); + Check.That(((RequestMessageBodyMatcher) matchers[0]).Matcher).IsEqualTo(matcher); + } + } +} \ No newline at end of file diff --git a/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithCookieTests.cs b/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithCookieTests.cs index ada5eb53d..3957f1184 100644 --- a/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithCookieTests.cs +++ b/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithCookieTests.cs @@ -2,9 +2,7 @@ using NFluent; using WireMock.Matchers; using WireMock.Matchers.Request; -using WireMock.Models; using WireMock.RequestBuilders; -using WireMock.Util; using Xunit; namespace WireMock.Net.Tests @@ -24,7 +22,7 @@ public void RequestBuilder_WithCookie_String_String_Bool_MatchBehaviour() } [Fact] - public void RequestBuilder_WithCookie_String_IExactMatcher() + public void RequestBuilder_WithCookie_String_IStringMatcher() { // Act var requestBuilder = (Request)Request.Create().WithCookie("c", new ExactMatcher("v")); diff --git a/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithHeaderTests.cs b/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithHeaderTests.cs index 2725218da..da3c34108 100644 --- a/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithHeaderTests.cs +++ b/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithHeaderTests.cs @@ -60,7 +60,7 @@ public void RequestBuilder_WithHeader_String_Strings_Bool_MatchBehaviour() } [Fact] - public void RequestBuilder_WithHeader_String_IExactMatcher() + public void RequestBuilder_WithHeader_String_IStringMatcher() { // Act var requestBuilder = (Request)Request.Create().WithHeader("h", new ExactMatcher("v")); From d898707d2582ee975cd9c27df8d0c560aaa88490 Mon Sep 17 00:00:00 2001 From: Stef Heyenrath Date: Mon, 24 Sep 2018 14:56:58 +0200 Subject: [PATCH 04/12] OwinRequestMapper --- src/WireMock.Net/Owin/OwinRequestMapper.cs | 48 ++++++------ src/WireMock.Net/Owin/OwinResponseMapper.cs | 2 +- src/WireMock.Net/Owin/WireMockMiddleware.cs | 24 +++--- .../WireMockMiddlewareTests.cs | 75 +++++++++---------- 4 files changed, 77 insertions(+), 72 deletions(-) diff --git a/src/WireMock.Net/Owin/OwinRequestMapper.cs b/src/WireMock.Net/Owin/OwinRequestMapper.cs index 1131e739f..261d8d540 100644 --- a/src/WireMock.Net/Owin/OwinRequestMapper.cs +++ b/src/WireMock.Net/Owin/OwinRequestMapper.cs @@ -2,12 +2,15 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +using WireMock.Models; using WireMock.Util; #if !USE_ASPNETCORE -using Microsoft.Owin; +// using Microsoft.Owin; +using IRequest = Microsoft.Owin.IOwinRequest; #else using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Extensions; +using IRequest = Microsoft.AspNetCore.Http.HttpRequest; #endif namespace WireMock.Owin @@ -18,28 +21,14 @@ namespace WireMock.Owin internal class OwinRequestMapper { /// - /// MapAsync IOwinRequest to RequestMessage + /// MapAsync IRequest to RequestMessage /// - /// - /// - public async Task MapAsync( -#if !USE_ASPNETCORE - IOwinRequest request -#else - HttpRequest request -#endif - ) + /// The OwinRequest/HttpRequest + /// RequestMessage + public async Task MapAsync(IRequest request) { -#if !USE_ASPNETCORE - var urldetails = UrlUtils.Parse(request.Uri, request.PathBase); - string clientIP = request.RemoteIpAddress; -#else - var urldetails = UrlUtils.Parse(new Uri(request.GetEncodedUrl()), request.PathBase); - var connection = request.HttpContext.Connection; - string clientIP = connection.RemoteIpAddress.IsIPv4MappedToIPv6 - ? connection.RemoteIpAddress.MapToIPv4().ToString() - : connection.RemoteIpAddress.ToString(); -#endif + (UrlDetails urldetails, string clientIP) = ParseRequest(request); + string method = request.Method; Dictionary headers = null; @@ -68,7 +57,22 @@ HttpRequest request body = await BodyParser.Parse(request.Body, request.ContentType); } - return new RequestMessage(urldetails, method, clientIP, body, headers, cookies) { DateTime = DateTime.Now }; + return new RequestMessage(urldetails, method, clientIP, body, headers, cookies) { DateTime = DateTime.UtcNow }; + } + + private (UrlDetails UrlDetails, string ClientIP) ParseRequest(IRequest request) + { +#if !USE_ASPNETCORE + var urldetails = UrlUtils.Parse(request.Uri, request.PathBase); + string clientIP = request.RemoteIpAddress; +#else + var urldetails = UrlUtils.Parse(new Uri(request.GetEncodedUrl()), request.PathBase); + var connection = request.HttpContext.Connection; + string clientIP = connection.RemoteIpAddress.IsIPv4MappedToIPv6 + ? connection.RemoteIpAddress.MapToIPv4().ToString() + : connection.RemoteIpAddress.ToString(); +#endif + return (urldetails, clientIP); } private bool ShouldParseBody(string method) diff --git a/src/WireMock.Net/Owin/OwinResponseMapper.cs b/src/WireMock.Net/Owin/OwinResponseMapper.cs index fdd1a3e83..c8c664eaa 100644 --- a/src/WireMock.Net/Owin/OwinResponseMapper.cs +++ b/src/WireMock.Net/Owin/OwinResponseMapper.cs @@ -35,7 +35,7 @@ public class OwinResponseMapper }; /// - /// Map ResponseMessage to OwinResponse/HttpResponse + /// Map ResponseMessage to IResponse. /// /// The ResponseMessage /// The OwinResponse/HttpResponse diff --git a/src/WireMock.Net/Owin/WireMockMiddleware.cs b/src/WireMock.Net/Owin/WireMockMiddleware.cs index 23aca6bca..ec86aee79 100644 --- a/src/WireMock.Net/Owin/WireMockMiddleware.cs +++ b/src/WireMock.Net/Owin/WireMockMiddleware.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; using System.Threading.Tasks; using WireMock.Logging; using WireMock.Matchers.Request; @@ -11,17 +10,19 @@ using WireMock.Serialization; #if !USE_ASPNETCORE using Microsoft.Owin; +using IContext = Microsoft.Owin.IOwinContext; +using OwinMiddleware = Microsoft.Owin.OwinMiddleware; +using Next = Microsoft.Owin.OwinMiddleware; #else using Microsoft.AspNetCore.Http; +using OwinMiddleware = System.Object; +using IContext = Microsoft.AspNetCore.Http.HttpContext; +using Next = Microsoft.AspNetCore.Http.RequestDelegate; #endif namespace WireMock.Owin { -#if !USE_ASPNETCORE internal class WireMockMiddleware : OwinMiddleware -#else - internal class WireMockMiddleware -#endif { private static readonly Task CompletedTask = Task.FromResult(false); private readonly WireMockMiddlewareOptions _options; @@ -30,22 +31,27 @@ internal class WireMockMiddleware private readonly OwinResponseMapper _responseMapper = new OwinResponseMapper(); #if !USE_ASPNETCORE - public WireMockMiddleware(OwinMiddleware next, WireMockMiddlewareOptions options) : base(next) + public WireMockMiddleware(Next next, WireMockMiddlewareOptions options) : base(next) { _options = options; } #else - public WireMockMiddleware(RequestDelegate next, WireMockMiddlewareOptions options) + public WireMockMiddleware(Next next, WireMockMiddlewareOptions options) { _options = options; } #endif #if !USE_ASPNETCORE - public override async Task Invoke(IOwinContext ctx) + public override Task Invoke(IContext ctx) #else - public async Task Invoke(HttpContext ctx) + public Task Invoke(IContext ctx) #endif + { + return InvokeInternal(ctx); + } + + private async Task InvokeInternal(IContext ctx) { var request = await _requestMapper.MapAsync(ctx.Request); diff --git a/test/WireMock.Net.Tests/WireMockMiddlewareTests.cs b/test/WireMock.Net.Tests/WireMockMiddlewareTests.cs index 4c38bae68..ab112ae55 100644 --- a/test/WireMock.Net.Tests/WireMockMiddlewareTests.cs +++ b/test/WireMock.Net.Tests/WireMockMiddlewareTests.cs @@ -1,44 +1,39 @@ -//using Microsoft.Owin; -//using Moq; -//using NFluent; -//using WireMock.Owin; -//using Xunit; +using Moq; +using NFluent; +using WireMock.Owin; +using Xunit; +#if NET452 +using Microsoft.Owin; +using IContext = Microsoft.Owin.IOwinContext; +using OwinMiddleware = Microsoft.Owin.OwinMiddleware; +using Next = Microsoft.Owin.OwinMiddleware; +#else +using Microsoft.AspNetCore.Http; +using OwinMiddleware = System.Object; +using IContext = Microsoft.AspNetCore.Http.HttpContext; +using Next = Microsoft.AspNetCore.Http.RequestDelegate; +#endif -//namespace WireMock.Net.Tests -//{ -// public class WireMockMiddlewareTests -// { -// private readonly ObjectMother _objectMother = new ObjectMother(); +namespace WireMock.Net.Tests +{ + public class WireMockMiddlewareTests + { + //private Mock OwinMiddleware; + //private Mock OwinContext; + private WireMockMiddlewareOptions WireMockMiddlewareOptions; -// [Fact] -// public void Should_have_default_state_as_null() -// { -// // given + private WireMockMiddleware _sut; -// // when -// var sut = _objectMother.Create(); + public WireMockMiddlewareTests() + { + //OwinContext = new Mock(); + //OwinMiddleware = new Mock(null); + WireMockMiddlewareOptions = new WireMockMiddlewareOptions(); + } -// // then -// Check.That(sut.Scenarios).IsNull(); -// } - -// private class ObjectMother -// { -// private Mock OwinMiddleware { get; } -// private Mock OwinContext { get; } -// private WireMockMiddlewareOptions WireMockMiddlewareOptions { get; } - -// public ObjectMother() -// { -// OwinContext = new Mock(); -// OwinMiddleware = new Mock(null); -// WireMockMiddlewareOptions = new WireMockMiddlewareOptions(); -// } - -// public WireMockMiddleware Create() -// { -// return new WireMockMiddleware(OwinMiddleware.Object, WireMockMiddlewareOptions); -// } -// } -// } -//} \ No newline at end of file + [Fact] + public void WireMockMiddleware_Invoke() + { + } + } +} \ No newline at end of file From d1947ccfbe7a35ad383b58eb5beefd787cef9bff Mon Sep 17 00:00:00 2001 From: Stef Heyenrath Date: Tue, 25 Sep 2018 14:31:01 +0200 Subject: [PATCH 05/12] refactor --- src/WireMock.Net/Owin/AspNetCoreSelfHost.cs | 19 +- .../Owin/GlobalExceptionMiddleware.cs | 41 ++-- src/WireMock.Net/Owin/IMappingMatcher.cs | 9 + .../Owin/IWireMockMiddlewareOptions.cs | 38 ++++ .../Owin/Mappers/IOwinRequestMapper.cs | 22 +++ .../Owin/Mappers/IOwinResponseMapper.cs | 22 +++ .../Owin/{ => Mappers}/OwinRequestMapper.cs | 181 +++++++++--------- .../Owin/{ => Mappers}/OwinResponseMapper.cs | 10 +- src/WireMock.Net/Owin/MappingMatcher.cs | 50 +++++ src/WireMock.Net/Owin/OwinSelfHost.cs | 14 +- src/WireMock.Net/Owin/WireMockMiddleware.cs | 71 +++---- .../Owin/WireMockMiddlewareOptions.cs | 10 +- src/WireMock.Net/Properties/AssemblyInfo.cs | 5 +- src/WireMock.Net/Server/FluentMockServer.cs | 2 +- .../FluentMockServerTests.Authentication.cs | 4 +- .../FluentMockServerTests.Settings.cs | 4 +- .../Mappers}/OwinResponseMapperTests.cs | 4 +- .../Owin/MappingMatcherTests.cs | 83 ++++++++ .../Owin/WireMockMiddlewareTests.cs | 93 +++++++++ .../WireMockMiddlewareTests.cs | 39 ---- 20 files changed, 501 insertions(+), 220 deletions(-) create mode 100644 src/WireMock.Net/Owin/IMappingMatcher.cs create mode 100644 src/WireMock.Net/Owin/IWireMockMiddlewareOptions.cs create mode 100644 src/WireMock.Net/Owin/Mappers/IOwinRequestMapper.cs create mode 100644 src/WireMock.Net/Owin/Mappers/IOwinResponseMapper.cs rename src/WireMock.Net/Owin/{ => Mappers}/OwinRequestMapper.cs (88%) rename src/WireMock.Net/Owin/{ => Mappers}/OwinResponseMapper.cs (92%) create mode 100644 src/WireMock.Net/Owin/MappingMatcher.cs rename test/WireMock.Net.Tests/{ => Owin/Mappers}/OwinResponseMapperTests.cs (98%) create mode 100644 test/WireMock.Net.Tests/Owin/MappingMatcherTests.cs create mode 100644 test/WireMock.Net.Tests/Owin/WireMockMiddlewareTests.cs delete mode 100644 test/WireMock.Net.Tests/WireMockMiddlewareTests.cs diff --git a/src/WireMock.Net/Owin/AspNetCoreSelfHost.cs b/src/WireMock.Net/Owin/AspNetCoreSelfHost.cs index 8e69624a9..3d0305430 100644 --- a/src/WireMock.Net/Owin/AspNetCoreSelfHost.cs +++ b/src/WireMock.Net/Owin/AspNetCoreSelfHost.cs @@ -7,8 +7,10 @@ using JetBrains.Annotations; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.DependencyInjection; using WireMock.HttpsCertificate; using WireMock.Logging; +using WireMock.Owin.Mappers; using WireMock.Util; using WireMock.Validation; @@ -17,7 +19,7 @@ namespace WireMock.Owin internal class AspNetCoreSelfHost : IOwinSelfHost { private readonly CancellationTokenSource _cts = new CancellationTokenSource(); - private readonly WireMockMiddlewareOptions _options; + private readonly IWireMockMiddlewareOptions _options; private readonly string[] _urls; private readonly IWireMockLogger _logger; private Exception _runningException; @@ -32,7 +34,7 @@ internal class AspNetCoreSelfHost : IOwinSelfHost public Exception RunningException => _runningException; - public AspNetCoreSelfHost([NotNull] WireMockMiddlewareOptions options, [NotNull] params string[] uriPrefixes) + public AspNetCoreSelfHost([NotNull] IWireMockMiddlewareOptions options, [NotNull] params string[] uriPrefixes) { Check.NotNull(options, nameof(options)); Check.NotNullOrEmpty(uriPrefixes, nameof(uriPrefixes)); @@ -54,13 +56,20 @@ public AspNetCoreSelfHost([NotNull] WireMockMiddlewareOptions options, [NotNull] public Task StartAsync() { _host = new WebHostBuilder() + .ConfigureServices(services => + { + services.AddSingleton(_options); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + }) .Configure(appBuilder => { - appBuilder.UseMiddleware(_options); + appBuilder.UseMiddleware(); _options.PreWireMockMiddlewareInit?.Invoke(appBuilder); - appBuilder.UseMiddleware(_options); + appBuilder.UseMiddleware(); _options.PostWireMockMiddlewareInit?.Invoke(appBuilder); }) @@ -104,7 +113,7 @@ private void StartServers() { try { - var appLifetime = (IApplicationLifetime) _host.Services.GetService(typeof(IApplicationLifetime)); + var appLifetime = (IApplicationLifetime)_host.Services.GetService(typeof(IApplicationLifetime)); appLifetime.ApplicationStarted.Register(() => IsStarted = true); #if NETSTANDARD1_3 diff --git a/src/WireMock.Net/Owin/GlobalExceptionMiddleware.cs b/src/WireMock.Net/Owin/GlobalExceptionMiddleware.cs index 5b028f02d..72ba82216 100644 --- a/src/WireMock.Net/Owin/GlobalExceptionMiddleware.cs +++ b/src/WireMock.Net/Owin/GlobalExceptionMiddleware.cs @@ -3,44 +3,59 @@ using Newtonsoft.Json; #if !USE_ASPNETCORE using Microsoft.Owin; +using IContext = Microsoft.Owin.IOwinContext; +using OwinMiddleware = Microsoft.Owin.OwinMiddleware; +using Next = Microsoft.Owin.OwinMiddleware; #else -using Microsoft.AspNetCore.Http; +using OwinMiddleware = System.Object; +using IContext = Microsoft.AspNetCore.Http.HttpContext; +using Next = Microsoft.AspNetCore.Http.RequestDelegate; #endif +using WireMock.Owin.Mappers; +using WireMock.Validation; namespace WireMock.Owin { -#if !USE_ASPNETCORE internal class GlobalExceptionMiddleware : OwinMiddleware -#else - internal class GlobalExceptionMiddleware -#endif { - private readonly WireMockMiddlewareOptions _options; + private readonly IWireMockMiddlewareOptions _options; + private readonly IOwinResponseMapper _responseMapper; #if !USE_ASPNETCORE - public GlobalExceptionMiddleware(OwinMiddleware next, WireMockMiddlewareOptions options) : base(next) + public GlobalExceptionMiddleware(Next next, IWireMockMiddlewareOptions options, IOwinResponseMapper responseMapper) : base(next) { + Check.NotNull(options, nameof(options)); + Check.NotNull(responseMapper, nameof(responseMapper)); + _options = options; + _responseMapper = responseMapper; } #else - public GlobalExceptionMiddleware(RequestDelegate next, WireMockMiddlewareOptions options) + public GlobalExceptionMiddleware(Next next, IWireMockMiddlewareOptions options, IOwinResponseMapper responseMapper) { + Check.NotNull(options, nameof(options)); + Check.NotNull(responseMapper, nameof(responseMapper)); + Next = next; _options = options; + _responseMapper = responseMapper; } #endif #if USE_ASPNETCORE - public RequestDelegate Next { get; } + public Next Next { get; } #endif - private readonly OwinResponseMapper _responseMapper = new OwinResponseMapper(); - #if !USE_ASPNETCORE - public override async Task Invoke(IOwinContext ctx) + public override Task Invoke(IContext ctx) #else - public async Task Invoke(HttpContext ctx) + public Task Invoke(IContext ctx) #endif + { + return InvokeInternal(ctx); + } + + private async Task InvokeInternal(IContext ctx) { try { diff --git a/src/WireMock.Net/Owin/IMappingMatcher.cs b/src/WireMock.Net/Owin/IMappingMatcher.cs new file mode 100644 index 000000000..950defca8 --- /dev/null +++ b/src/WireMock.Net/Owin/IMappingMatcher.cs @@ -0,0 +1,9 @@ +using WireMock.Matchers.Request; + +namespace WireMock.Owin +{ + internal interface IMappingMatcher + { + (Mapping Mapping, RequestMatchResult RequestMatchResult) Match(RequestMessage request); + } +} \ No newline at end of file diff --git a/src/WireMock.Net/Owin/IWireMockMiddlewareOptions.cs b/src/WireMock.Net/Owin/IWireMockMiddlewareOptions.cs new file mode 100644 index 000000000..cf4988249 --- /dev/null +++ b/src/WireMock.Net/Owin/IWireMockMiddlewareOptions.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Concurrent; +using System.Collections.ObjectModel; +using WireMock.Logging; +using WireMock.Matchers; +#if !USE_ASPNETCORE +using Owin; +#else +using IAppBuilder = Microsoft.AspNetCore.Builder.IApplicationBuilder; +#endif + +namespace WireMock.Owin +{ + internal interface IWireMockMiddlewareOptions + { + IWireMockLogger Logger { get; set; } + + TimeSpan? RequestProcessingDelay { get; set; } + + IStringMatcher AuthorizationMatcher { get; set; } + + bool AllowPartialMapping { get; set; } + + ConcurrentDictionary Mappings { get; } + + ConcurrentDictionary Scenarios { get; } + + ObservableCollection LogEntries { get; } + + int? RequestLogExpirationDuration { get; set; } + + int? MaxRequestLogCount { get; set; } + + Action PreWireMockMiddlewareInit { get; set; } + + Action PostWireMockMiddlewareInit { get; set; } + } +} \ No newline at end of file diff --git a/src/WireMock.Net/Owin/Mappers/IOwinRequestMapper.cs b/src/WireMock.Net/Owin/Mappers/IOwinRequestMapper.cs new file mode 100644 index 000000000..d6ea8f339 --- /dev/null +++ b/src/WireMock.Net/Owin/Mappers/IOwinRequestMapper.cs @@ -0,0 +1,22 @@ +using System.Threading.Tasks; +#if !USE_ASPNETCORE +using IRequest = Microsoft.Owin.IOwinRequest; +#else +using IRequest = Microsoft.AspNetCore.Http.HttpRequest; +#endif + +namespace WireMock.Owin.Mappers +{ + /// + /// IOwinRequestMapper + /// + internal interface IOwinRequestMapper + { + /// + /// MapAsync IRequest to RequestMessage + /// + /// The OwinRequest/HttpRequest + /// RequestMessage + Task MapAsync(IRequest request); + } +} \ No newline at end of file diff --git a/src/WireMock.Net/Owin/Mappers/IOwinResponseMapper.cs b/src/WireMock.Net/Owin/Mappers/IOwinResponseMapper.cs new file mode 100644 index 000000000..14420938f --- /dev/null +++ b/src/WireMock.Net/Owin/Mappers/IOwinResponseMapper.cs @@ -0,0 +1,22 @@ +using System.Threading.Tasks; +#if !USE_ASPNETCORE +using IResponse = Microsoft.Owin.IOwinResponse; +#else +using IResponse = Microsoft.AspNetCore.Http.HttpResponse; +#endif + +namespace WireMock.Owin.Mappers +{ + /// + /// IOwinResponseMapper + /// + internal interface IOwinResponseMapper + { + /// + /// Map ResponseMessage to IResponse. + /// + /// The ResponseMessage + /// The OwinResponse/HttpResponse + Task MapAsync(ResponseMessage responseMessage, IResponse response); + } +} \ No newline at end of file diff --git a/src/WireMock.Net/Owin/OwinRequestMapper.cs b/src/WireMock.Net/Owin/Mappers/OwinRequestMapper.cs similarity index 88% rename from src/WireMock.Net/Owin/OwinRequestMapper.cs rename to src/WireMock.Net/Owin/Mappers/OwinRequestMapper.cs index 261d8d540..b76ce6254 100644 --- a/src/WireMock.Net/Owin/OwinRequestMapper.cs +++ b/src/WireMock.Net/Owin/Mappers/OwinRequestMapper.cs @@ -1,94 +1,89 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using WireMock.Models; -using WireMock.Util; -#if !USE_ASPNETCORE -// using Microsoft.Owin; -using IRequest = Microsoft.Owin.IOwinRequest; -#else -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Http.Extensions; -using IRequest = Microsoft.AspNetCore.Http.HttpRequest; -#endif - -namespace WireMock.Owin -{ - /// - /// OwinRequestMapper - /// - internal class OwinRequestMapper - { - /// - /// MapAsync IRequest to RequestMessage - /// - /// The OwinRequest/HttpRequest - /// RequestMessage - public async Task MapAsync(IRequest request) - { - (UrlDetails urldetails, string clientIP) = ParseRequest(request); - - string method = request.Method; - - Dictionary headers = null; - if (request.Headers.Any()) - { - headers = new Dictionary(); - foreach (var header in request.Headers) - { - headers.Add(header.Key, header.Value); - } - } - - IDictionary cookies = null; - if (request.Cookies.Any()) - { - cookies = new Dictionary(); - foreach (var cookie in request.Cookies) - { - cookies.Add(cookie.Key, cookie.Value); - } - } - - BodyData body = null; - if (request.Body != null && ShouldParseBody(method)) - { - body = await BodyParser.Parse(request.Body, request.ContentType); - } - - return new RequestMessage(urldetails, method, clientIP, body, headers, cookies) { DateTime = DateTime.UtcNow }; - } - - private (UrlDetails UrlDetails, string ClientIP) ParseRequest(IRequest request) - { -#if !USE_ASPNETCORE - var urldetails = UrlUtils.Parse(request.Uri, request.PathBase); - string clientIP = request.RemoteIpAddress; -#else - var urldetails = UrlUtils.Parse(new Uri(request.GetEncodedUrl()), request.PathBase); - var connection = request.HttpContext.Connection; - string clientIP = connection.RemoteIpAddress.IsIPv4MappedToIPv6 - ? connection.RemoteIpAddress.MapToIPv4().ToString() - : connection.RemoteIpAddress.ToString(); -#endif - return (urldetails, clientIP); - } - - private bool ShouldParseBody(string method) - { - /* - HEAD - No defined body semantics. - GET - No defined body semantics. - PUT - Body supported. - POST - Body supported. - DELETE - No defined body semantics. - TRACE - Body not supported. - OPTIONS - Body supported but no semantics on usage (maybe in the future). - CONNECT - No defined body semantics - PATCH - Body supported. - */ - return new[] { "PUT", "POST", "OPTIONS", "PATCH" }.Contains(method.ToUpper()); - } - } +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using WireMock.Models; +using WireMock.Util; +#if !USE_ASPNETCORE +using IRequest = Microsoft.Owin.IOwinRequest; +#else +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Http.Extensions; +using IRequest = Microsoft.AspNetCore.Http.HttpRequest; +#endif + +namespace WireMock.Owin.Mappers +{ + /// + /// OwinRequestMapper + /// + internal class OwinRequestMapper : IOwinRequestMapper + { + /// + public async Task MapAsync(IRequest request) + { + (UrlDetails urldetails, string clientIP) = ParseRequest(request); + + string method = request.Method; + + Dictionary headers = null; + if (request.Headers.Any()) + { + headers = new Dictionary(); + foreach (var header in request.Headers) + { + headers.Add(header.Key, header.Value); + } + } + + IDictionary cookies = null; + if (request.Cookies.Any()) + { + cookies = new Dictionary(); + foreach (var cookie in request.Cookies) + { + cookies.Add(cookie.Key, cookie.Value); + } + } + + BodyData body = null; + if (request.Body != null && ShouldParseBody(method)) + { + body = await BodyParser.Parse(request.Body, request.ContentType); + } + + return new RequestMessage(urldetails, method, clientIP, body, headers, cookies) { DateTime = DateTime.UtcNow }; + } + + private (UrlDetails UrlDetails, string ClientIP) ParseRequest(IRequest request) + { +#if !USE_ASPNETCORE + var urldetails = UrlUtils.Parse(request.Uri, request.PathBase); + string clientIP = request.RemoteIpAddress; +#else + var urldetails = UrlUtils.Parse(new Uri(request.GetEncodedUrl()), request.PathBase); + var connection = request.HttpContext.Connection; + string clientIP = connection.RemoteIpAddress.IsIPv4MappedToIPv6 + ? connection.RemoteIpAddress.MapToIPv4().ToString() + : connection.RemoteIpAddress.ToString(); +#endif + return (urldetails, clientIP); + } + + private bool ShouldParseBody(string method) + { + /* + HEAD - No defined body semantics. + GET - No defined body semantics. + PUT - Body supported. + POST - Body supported. + DELETE - No defined body semantics. + TRACE - Body not supported. + OPTIONS - Body supported but no semantics on usage (maybe in the future). + CONNECT - No defined body semantics + PATCH - Body supported. + */ + return new[] { "PUT", "POST", "OPTIONS", "PATCH" }.Contains(method.ToUpper()); + } + } } \ No newline at end of file diff --git a/src/WireMock.Net/Owin/OwinResponseMapper.cs b/src/WireMock.Net/Owin/Mappers/OwinResponseMapper.cs similarity index 92% rename from src/WireMock.Net/Owin/OwinResponseMapper.cs rename to src/WireMock.Net/Owin/Mappers/OwinResponseMapper.cs index c8c664eaa..fc1e1e8a4 100644 --- a/src/WireMock.Net/Owin/OwinResponseMapper.cs +++ b/src/WireMock.Net/Owin/Mappers/OwinResponseMapper.cs @@ -16,12 +16,12 @@ using IResponse = Microsoft.AspNetCore.Http.HttpResponse; #endif -namespace WireMock.Owin +namespace WireMock.Owin.Mappers { /// /// OwinResponseMapper /// - public class OwinResponseMapper + public class OwinResponseMapper : IOwinResponseMapper { private readonly Encoding _utf8NoBom = new UTF8Encoding(false); @@ -34,11 +34,7 @@ public class OwinResponseMapper { HttpKnownHeaderNames.ContentType, (r, v) => r.ContentType = v.FirstOrDefault() } }; - /// - /// Map ResponseMessage to IResponse. - /// - /// The ResponseMessage - /// The OwinResponse/HttpResponse + /// public async Task MapAsync(ResponseMessage responseMessage, IResponse response) { if (responseMessage == null) diff --git a/src/WireMock.Net/Owin/MappingMatcher.cs b/src/WireMock.Net/Owin/MappingMatcher.cs new file mode 100644 index 000000000..ec61ac83d --- /dev/null +++ b/src/WireMock.Net/Owin/MappingMatcher.cs @@ -0,0 +1,50 @@ +using System.Linq; +using WireMock.Matchers.Request; +using WireMock.Validation; + +namespace WireMock.Owin +{ + internal class MappingMatcher : IMappingMatcher + { + private readonly IWireMockMiddlewareOptions _options; + + public MappingMatcher(IWireMockMiddlewareOptions options) + { + Check.NotNull(options, nameof(options)); + + _options = options; + } + + public (Mapping Mapping, RequestMatchResult RequestMatchResult) Match(RequestMessage request) + { + var mappings = _options.Mappings.Values + .Select(m => new + { + Mapping = m, + MatchResult = m.GetRequestMatchResult(request, m.Scenario != null && _options.Scenarios.ContainsKey(m.Scenario) ? _options.Scenarios[m.Scenario].NextState : null) + }) + .ToList(); + + if (_options.AllowPartialMapping) + { + var partialMappings = mappings + .Where(pm => pm.Mapping.IsAdminInterface && pm.MatchResult.IsPerfectMatch || !pm.Mapping.IsAdminInterface) + .OrderBy(m => m.MatchResult) + .ThenBy(m => m.Mapping.Priority) + .ToList(); + + var bestPartialMatch = partialMappings.FirstOrDefault(pm => pm.MatchResult.AverageTotalScore > 0.0); + + return (bestPartialMatch?.Mapping, bestPartialMatch?.MatchResult); + } + else + { + var perfectMatch = mappings + .OrderBy(m => m.Mapping.Priority) + .FirstOrDefault(m => m.MatchResult.IsPerfectMatch); + + return (perfectMatch?.Mapping, perfectMatch?.MatchResult); + } + } + } +} diff --git a/src/WireMock.Net/Owin/OwinSelfHost.cs b/src/WireMock.Net/Owin/OwinSelfHost.cs index 26a2a61b2..f6c3c0270 100644 --- a/src/WireMock.Net/Owin/OwinSelfHost.cs +++ b/src/WireMock.Net/Owin/OwinSelfHost.cs @@ -6,8 +6,8 @@ using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; -using WireMock.Http; using WireMock.Logging; +using WireMock.Owin.Mappers; using WireMock.Util; using WireMock.Validation; @@ -15,12 +15,12 @@ namespace WireMock.Owin { internal class OwinSelfHost : IOwinSelfHost { - private readonly WireMockMiddlewareOptions _options; + private readonly IWireMockMiddlewareOptions _options; private readonly CancellationTokenSource _cts = new CancellationTokenSource(); private readonly IWireMockLogger _logger; private Exception _runningException; - public OwinSelfHost([NotNull] WireMockMiddlewareOptions options, [NotNull] params string[] uriPrefixes) + public OwinSelfHost([NotNull] IWireMockMiddlewareOptions options, [NotNull] params string[] uriPrefixes) { Check.NotNull(options, nameof(options)); Check.NotNullOrEmpty(uriPrefixes, nameof(uriPrefixes)); @@ -74,11 +74,15 @@ private void StartServers() try { + var requestMapper = new OwinRequestMapper(); + var responseMapper = new OwinResponseMapper(); + var matcher = new MappingMatcher(_options); + Action startup = app => { - app.Use(_options); + app.Use(_options, responseMapper); _options.PreWireMockMiddlewareInit?.Invoke(app); - app.Use(_options); + app.Use(_options, requestMapper, responseMapper, matcher); _options.PostWireMockMiddlewareInit?.Invoke(app); }; diff --git a/src/WireMock.Net/Owin/WireMockMiddleware.cs b/src/WireMock.Net/Owin/WireMockMiddleware.cs index ec86aee79..d8a70d82e 100644 --- a/src/WireMock.Net/Owin/WireMockMiddleware.cs +++ b/src/WireMock.Net/Owin/WireMockMiddleware.cs @@ -7,14 +7,15 @@ using WireMock.Util; using Newtonsoft.Json; using WireMock.Http; +using WireMock.Owin.Mappers; using WireMock.Serialization; +using WireMock.Validation; #if !USE_ASPNETCORE using Microsoft.Owin; using IContext = Microsoft.Owin.IOwinContext; using OwinMiddleware = Microsoft.Owin.OwinMiddleware; using Next = Microsoft.Owin.OwinMiddleware; #else -using Microsoft.AspNetCore.Http; using OwinMiddleware = System.Object; using IContext = Microsoft.AspNetCore.Http.HttpContext; using Next = Microsoft.AspNetCore.Http.RequestDelegate; @@ -25,20 +26,35 @@ namespace WireMock.Owin internal class WireMockMiddleware : OwinMiddleware { private static readonly Task CompletedTask = Task.FromResult(false); - private readonly WireMockMiddlewareOptions _options; - - private readonly OwinRequestMapper _requestMapper = new OwinRequestMapper(); - private readonly OwinResponseMapper _responseMapper = new OwinResponseMapper(); + private readonly IWireMockMiddlewareOptions _options; + private readonly IOwinRequestMapper _requestMapper; + private readonly IOwinResponseMapper _responseMapper; + private readonly IMappingMatcher _mappingMatcher; #if !USE_ASPNETCORE - public WireMockMiddleware(Next next, WireMockMiddlewareOptions options) : base(next) + public WireMockMiddleware(Next next, IWireMockMiddlewareOptions options, IOwinRequestMapper requestMapper, IOwinResponseMapper responseMapper, IMappingMatcher mappingMatcher) : base(next) { + Check.NotNull(options, nameof(options)); + Check.NotNull(requestMapper, nameof(requestMapper)); + Check.NotNull(responseMapper, nameof(responseMapper)); + Check.NotNull(mappingMatcher, nameof(mappingMatcher)); + _options = options; + _requestMapper = requestMapper; + _responseMapper = responseMapper; + _mappingMatcher = mappingMatcher; } #else - public WireMockMiddleware(Next next, WireMockMiddlewareOptions options) + public WireMockMiddleware(Next next, IWireMockMiddlewareOptions options, IOwinRequestMapper requestMapper, IOwinResponseMapper responseMapper, IMappingMatcher mappingMatcher) { + Check.NotNull(options, nameof(options)); + Check.NotNull(requestMapper, nameof(requestMapper)); + Check.NotNull(responseMapper, nameof(responseMapper)); + _options = options; + _requestMapper = requestMapper; + _responseMapper = responseMapper; + _mappingMatcher = mappingMatcher; } #endif @@ -57,8 +73,7 @@ private async Task InvokeInternal(IContext ctx) bool logRequest = false; ResponseMessage response = null; - Mapping targetMapping = null; - RequestMatchResult requestMatchResult = null; + (Mapping TargetMapping, RequestMatchResult RequestMatchResult) result = (null, null); try { foreach (var mapping in _options.Mappings.Values.Where(m => m?.Scenario != null)) @@ -73,36 +88,8 @@ private async Task InvokeInternal(IContext ctx) } } - var mappings = _options.Mappings.Values - .Select(m => new - { - Mapping = m, - MatchResult = m.GetRequestMatchResult(request, m.Scenario != null && _options.Scenarios.ContainsKey(m.Scenario) ? _options.Scenarios[m.Scenario].NextState : null) - }) - .ToList(); - - if (_options.AllowPartialMapping) - { - var partialMappings = mappings - .Where(pm => pm.Mapping.IsAdminInterface && pm.MatchResult.IsPerfectMatch || !pm.Mapping.IsAdminInterface) - .OrderBy(m => m.MatchResult) - .ThenBy(m => m.Mapping.Priority) - .ToList(); - - var bestPartialMatch = partialMappings.FirstOrDefault(pm => pm.MatchResult.AverageTotalScore > 0.0); - - targetMapping = bestPartialMatch?.Mapping; - requestMatchResult = bestPartialMatch?.MatchResult; - } - else - { - var perfectMatch = mappings - .OrderBy(m => m.Mapping.Priority) - .FirstOrDefault(m => m.MatchResult.IsPerfectMatch); - - targetMapping = perfectMatch?.Mapping; - requestMatchResult = perfectMatch?.MatchResult; - } + result = _mappingMatcher.Match(request); + var targetMapping = result.TargetMapping; if (targetMapping == null) { @@ -151,9 +138,9 @@ private async Task InvokeInternal(IContext ctx) Guid = Guid.NewGuid(), RequestMessage = request, ResponseMessage = response, - MappingGuid = targetMapping?.Guid, - MappingTitle = targetMapping?.Title, - RequestMatchResult = requestMatchResult + MappingGuid = result.TargetMapping?.Guid, + MappingTitle = result.TargetMapping?.Title, + RequestMatchResult = result.RequestMatchResult }; LogRequest(log, logRequest); diff --git a/src/WireMock.Net/Owin/WireMockMiddlewareOptions.cs b/src/WireMock.Net/Owin/WireMockMiddlewareOptions.cs index 09beadbe0..b264fe3c9 100644 --- a/src/WireMock.Net/Owin/WireMockMiddlewareOptions.cs +++ b/src/WireMock.Net/Owin/WireMockMiddlewareOptions.cs @@ -7,12 +7,12 @@ #if !USE_ASPNETCORE using Owin; #else -using Microsoft.AspNetCore.Builder; +using IAppBuilder = Microsoft.AspNetCore.Builder.IApplicationBuilder; #endif namespace WireMock.Owin { - internal class WireMockMiddlewareOptions + internal class WireMockMiddlewareOptions : IWireMockMiddlewareOptions { public IWireMockLogger Logger { get; set; } @@ -32,14 +32,8 @@ internal class WireMockMiddlewareOptions public int? MaxRequestLogCount { get; set; } -#if !USE_ASPNETCORE public Action PreWireMockMiddlewareInit { get; set; } public Action PostWireMockMiddlewareInit { get; set; } -#else - public Action PreWireMockMiddlewareInit { get; set; } - - public Action PostWireMockMiddlewareInit { get; set; } -#endif } } \ No newline at end of file diff --git a/src/WireMock.Net/Properties/AssemblyInfo.cs b/src/WireMock.Net/Properties/AssemblyInfo.cs index e6452c0fb..cd982fa9a 100644 --- a/src/WireMock.Net/Properties/AssemblyInfo.cs +++ b/src/WireMock.Net/Properties/AssemblyInfo.cs @@ -1,4 +1,7 @@ using System.Runtime.CompilerServices; [assembly: InternalsVisibleTo("WireMock.Net.StandAlone")] -[assembly: InternalsVisibleTo("WireMock.Net.Tests")] \ No newline at end of file +[assembly: InternalsVisibleTo("WireMock.Net.Tests")] + +// Needed for Moq in the UnitTest project +[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] \ No newline at end of file diff --git a/src/WireMock.Net/Server/FluentMockServer.cs b/src/WireMock.Net/Server/FluentMockServer.cs index 2010037e8..5650762ee 100644 --- a/src/WireMock.Net/Server/FluentMockServer.cs +++ b/src/WireMock.Net/Server/FluentMockServer.cs @@ -29,7 +29,7 @@ public partial class FluentMockServer : IDisposable private const int ServerStartDelay = 100; private readonly IOwinSelfHost _httpServer; - private readonly WireMockMiddlewareOptions _options = new WireMockMiddlewareOptions(); + private readonly IWireMockMiddlewareOptions _options = new WireMockMiddlewareOptions(); /// /// Gets a value indicating whether this server is started. diff --git a/test/WireMock.Net.Tests/FluentMockServerTests.Authentication.cs b/test/WireMock.Net.Tests/FluentMockServerTests.Authentication.cs index e6485ff36..a83181aca 100644 --- a/test/WireMock.Net.Tests/FluentMockServerTests.Authentication.cs +++ b/test/WireMock.Net.Tests/FluentMockServerTests.Authentication.cs @@ -19,7 +19,7 @@ public void FluentMockServer_Authentication_SetBasicAuthentication() server.SetBasicAuthentication("x", "y"); // Assert - var options = server.GetPrivateFieldValue("_options"); + var options = server.GetPrivateFieldValue("_options"); Check.That(options.AuthorizationMatcher.Name).IsEqualTo("RegexMatcher"); Check.That(options.AuthorizationMatcher.MatchBehaviour).IsEqualTo(MatchBehaviour.AcceptOnMatch); Check.That(options.AuthorizationMatcher.GetPatterns()).ContainsExactly("^(?i)BASIC eDp5$"); @@ -36,7 +36,7 @@ public void FluentMockServer_Authentication_RemoveBasicAuthentication() server.RemoveBasicAuthentication(); // Assert - var options = server.GetPrivateFieldValue("_options"); + var options = server.GetPrivateFieldValue("_options"); Check.That(options.AuthorizationMatcher).IsNull(); } } diff --git a/test/WireMock.Net.Tests/FluentMockServerTests.Settings.cs b/test/WireMock.Net.Tests/FluentMockServerTests.Settings.cs index 355ff620e..1e5af064c 100644 --- a/test/WireMock.Net.Tests/FluentMockServerTests.Settings.cs +++ b/test/WireMock.Net.Tests/FluentMockServerTests.Settings.cs @@ -21,7 +21,7 @@ public void FluentMockServer_FluentMockServerSettings_StartAdminInterfaceTrue_Ba }); // Assert - var options = server.GetPrivateFieldValue("_options"); + var options = server.GetPrivateFieldValue("_options"); Check.That(options.AuthorizationMatcher).IsNotNull(); } @@ -37,7 +37,7 @@ public void FluentMockServer_FluentMockServerSettings_StartAdminInterfaceFalse_B }); // Assert - var options = server.GetPrivateFieldValue("_options"); + var options = server.GetPrivateFieldValue("_options"); Check.That(options.AuthorizationMatcher).IsNull(); } diff --git a/test/WireMock.Net.Tests/OwinResponseMapperTests.cs b/test/WireMock.Net.Tests/Owin/Mappers/OwinResponseMapperTests.cs similarity index 98% rename from test/WireMock.Net.Tests/OwinResponseMapperTests.cs rename to test/WireMock.Net.Tests/Owin/Mappers/OwinResponseMapperTests.cs index 2419533d3..4786be1d0 100644 --- a/test/WireMock.Net.Tests/OwinResponseMapperTests.cs +++ b/test/WireMock.Net.Tests/Owin/Mappers/OwinResponseMapperTests.cs @@ -1,10 +1,10 @@ using System.Collections.Generic; using System.IO; -using WireMock.Owin; using Xunit; using Moq; using System.Threading.Tasks; using System.Threading; +using WireMock.Owin.Mappers; using WireMock.Util; #if NET452 using Microsoft.Owin; @@ -17,7 +17,7 @@ using Microsoft.Extensions.Primitives; #endif -namespace WireMock.Net.Tests +namespace WireMock.Net.Tests.Owin.Mappers { public class OwinResponseMapperTests { diff --git a/test/WireMock.Net.Tests/Owin/MappingMatcherTests.cs b/test/WireMock.Net.Tests/Owin/MappingMatcherTests.cs new file mode 100644 index 000000000..03148222d --- /dev/null +++ b/test/WireMock.Net.Tests/Owin/MappingMatcherTests.cs @@ -0,0 +1,83 @@ +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using Moq; +using NFluent; +using WireMock.Logging; +using WireMock.Matchers.Request; +using WireMock.Models; +using WireMock.Owin; +using WireMock.Util; +using Xunit; + +namespace WireMock.Net.Tests.Owin +{ + public class MappingMatcherTests + { + private Mock _options; + + private IMappingMatcher _sut; + + public MappingMatcherTests() + { + _options = new Mock(); + _options.SetupAllProperties(); + _options.Setup(o => o.Mappings).Returns(new ConcurrentDictionary()); + _options.Setup(o => o.LogEntries).Returns(new ConcurentObservableCollection()); + _options.Setup(o => o.Scenarios).Returns(new ConcurrentDictionary()); + + _sut = new MappingMatcher(_options.Object); + } + + [Fact] + public void MappingMatcher_Match_NoMappingsDefined() + { + // Assign + var headers = new Dictionary { { "Content-Type", new[] { "application/json" } } }; + var body = new BodyData + { + BodyAsJson = new { x = 1 } + }; + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "GET", "::1", body, headers); + + // Act + var result = _sut.Match(request); + + // Assert and Verify + Check.That(result.Mapping).IsNull(); + Check.That(result.RequestMatchResult).IsNull(); + } + + //[Fact] + //public void MappingMatcher_Match_AllowPartialMapping() + //{ + // // Assign + // var headers = new Dictionary { { "Content-Type", new[] { "application/json" } } }; + // var body = new BodyData + // { + // BodyAsJson = new { x = 1 } + // }; + // var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "GET", "::1", body, headers); + + // _options.SetupGet(o => o.AllowPartialMapping).Returns(true); + + // var mappingMock = new Mock(); + // var partialMatchResult = new RequestMatchResult(); + // partialMatchResult.AddScore(typeof(object), 0.1); + + // mappingMock.Setup(m => m.GetRequestMatchResult(It.IsAny(), It.IsAny())).Returns(partialMatchResult); + + // var mappings = new ConcurrentDictionary(); + // mappings.TryAdd(Guid.NewGuid(), mappingMock.Object); + + // _options.Setup(o => o.Mappings).Returns(mappings); + + // // Act + // var result = _sut.Match(request); + + // // Assert and Verify + // Check.That(result.Mapping).IsNotNull(); + // Check.That(result.RequestMatchResult.AverageTotalScore).IsEqualTo(0.1); + //} + } +} diff --git a/test/WireMock.Net.Tests/Owin/WireMockMiddlewareTests.cs b/test/WireMock.Net.Tests/Owin/WireMockMiddlewareTests.cs new file mode 100644 index 000000000..f65d899a0 --- /dev/null +++ b/test/WireMock.Net.Tests/Owin/WireMockMiddlewareTests.cs @@ -0,0 +1,93 @@ +using System; +using System.Collections.Concurrent; +using System.Linq.Expressions; +using System.Collections.Generic; +using System.Threading.Tasks; +using Moq; +using Xunit; +using WireMock.Admin.Mappings; +using WireMock.Models; +using WireMock.Owin; +using WireMock.Owin.Mappers; +using WireMock.Util; +using WireMock.Admin.Requests; +using WireMock.Logging; +using WireMock.Matchers.Request; +#if NET452 +using Microsoft.Owin; +using IContext = Microsoft.Owin.IOwinContext; +using OwinMiddleware = Microsoft.Owin.OwinMiddleware; +using Next = Microsoft.Owin.OwinMiddleware; +using IRequest = Microsoft.Owin.IOwinRequest; +using IResponse = Microsoft.Owin.IOwinResponse; +#else +using Microsoft.AspNetCore.Http; +using OwinMiddleware = System.Object; +using IContext = Microsoft.AspNetCore.Http.HttpContext; +using Next = Microsoft.AspNetCore.Http.RequestDelegate; +using IRequest = Microsoft.AspNetCore.Http.HttpRequest; +using IResponse = Microsoft.AspNetCore.Http.HttpResponse; +#endif + +namespace WireMock.Net.Tests.Owin +{ + public class WireMockMiddlewareTests + { + private WireMockMiddleware _sut; + + private Mock _options; + private Mock _requestMapper; + private Mock _responseMapper; + private Mock _matcher; + private Mock _context; + + public WireMockMiddlewareTests() + { + _options = new Mock(); + _options.SetupAllProperties(); + _options.Setup(o => o.Mappings).Returns(new ConcurrentDictionary()); + _options.Setup(o => o.LogEntries).Returns(new ConcurentObservableCollection()); + _options.Setup(o => o.Scenarios).Returns(new ConcurrentDictionary()); + _options.Setup(o => o.Logger.Warn(It.IsAny(), It.IsAny())); + _options.Setup(o => o.Logger.DebugRequestResponse(It.IsAny(), false)); + + _requestMapper = new Mock(); + _requestMapper.SetupAllProperties(); + + _responseMapper = new Mock(); + _responseMapper.SetupAllProperties(); + + _matcher = new Mock(); + _matcher.SetupAllProperties(); + _matcher.Setup(m => m.Match(It.IsAny())).Returns(((Mapping)null, (RequestMatchResult)null)); + + _context = new Mock(); + + _sut = new WireMockMiddleware(null, _options.Object, _requestMapper.Object, _responseMapper.Object, _matcher.Object); + } + + [Fact] + public async void WireMockMiddleware_Invoke_NoMatch() + { + // Assign + var headers = new Dictionary { { "Content-Type", new[] { "application/json" } } }; + var body = new BodyData + { + BodyAsJson = new { x = 1 } + }; + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "GET", "::1", body, headers); + + _requestMapper.Setup(m => m.MapAsync(It.IsAny())).ReturnsAsync(request); + _responseMapper.Setup(m => m.MapAsync(It.IsAny(), It.IsAny())).Returns(Task.FromResult(true)); + + // Act + await _sut.Invoke(_context.Object); + + // Assert and Verify + _options.Verify(o => o.Logger.Warn(It.IsAny(), It.IsAny()), Times.Once); + + Expression> match = r => r.StatusCode == 404 && ((StatusModel)r.BodyAsJson).Status == "No matching mapping found"; + _responseMapper.Verify(m => m.MapAsync(It.Is(match), It.IsAny()), Times.Once); + } + } +} \ No newline at end of file diff --git a/test/WireMock.Net.Tests/WireMockMiddlewareTests.cs b/test/WireMock.Net.Tests/WireMockMiddlewareTests.cs deleted file mode 100644 index ab112ae55..000000000 --- a/test/WireMock.Net.Tests/WireMockMiddlewareTests.cs +++ /dev/null @@ -1,39 +0,0 @@ -using Moq; -using NFluent; -using WireMock.Owin; -using Xunit; -#if NET452 -using Microsoft.Owin; -using IContext = Microsoft.Owin.IOwinContext; -using OwinMiddleware = Microsoft.Owin.OwinMiddleware; -using Next = Microsoft.Owin.OwinMiddleware; -#else -using Microsoft.AspNetCore.Http; -using OwinMiddleware = System.Object; -using IContext = Microsoft.AspNetCore.Http.HttpContext; -using Next = Microsoft.AspNetCore.Http.RequestDelegate; -#endif - -namespace WireMock.Net.Tests -{ - public class WireMockMiddlewareTests - { - //private Mock OwinMiddleware; - //private Mock OwinContext; - private WireMockMiddlewareOptions WireMockMiddlewareOptions; - - private WireMockMiddleware _sut; - - public WireMockMiddlewareTests() - { - //OwinContext = new Mock(); - //OwinMiddleware = new Mock(null); - WireMockMiddlewareOptions = new WireMockMiddlewareOptions(); - } - - [Fact] - public void WireMockMiddleware_Invoke() - { - } - } -} \ No newline at end of file From 2f4c3a2b5d8a81c60f7472ea6f78b3848dbea48a Mon Sep 17 00:00:00 2001 From: Stef Heyenrath Date: Tue, 25 Sep 2018 17:21:39 +0200 Subject: [PATCH 06/12] Add IMapper --- src/WireMock.Net/IMapping.cs | 91 +++++++++++++++++++ src/WireMock.Net/Mapping.cs | 6 +- .../MappingRegistrationCallback.cs | 2 +- src/WireMock.Net/Owin/IMappingMatcher.cs | 2 +- .../Owin/IWireMockMiddlewareOptions.cs | 2 +- src/WireMock.Net/Owin/MappingMatcher.cs | 4 +- src/WireMock.Net/Owin/WireMockMiddleware.cs | 2 +- .../Owin/WireMockMiddlewareOptions.cs | 2 +- .../Serialization/MappingConverter.cs | 2 +- .../Server/FluentMockServer.Admin.cs | 4 +- src/WireMock.Net/Server/FluentMockServer.cs | 4 +- .../Owin/MappingMatcherTests.cs | 66 +++++++------- .../Owin/WireMockMiddlewareTests.cs | 52 +++++------ 13 files changed, 163 insertions(+), 76 deletions(-) create mode 100644 src/WireMock.Net/IMapping.cs diff --git a/src/WireMock.Net/IMapping.cs b/src/WireMock.Net/IMapping.cs new file mode 100644 index 000000000..10e93db82 --- /dev/null +++ b/src/WireMock.Net/IMapping.cs @@ -0,0 +1,91 @@ +using System; +using System.Threading.Tasks; +using JetBrains.Annotations; +using WireMock.Matchers.Request; +using WireMock.ResponseProviders; + +namespace WireMock +{ + /// + /// The IMapping interface. + /// + public interface IMapping + { + /// + /// Gets the unique identifier. + /// + Guid Guid { get; } + + /// + /// Gets the unique title. + /// + string Title { get; } + + /// + /// The full filename path for this mapping (only defined for static mappings). + /// + string Path { get; set; } + + /// + /// Gets the priority. + /// + int Priority { get; } + + /// + /// Scenario. + /// + [CanBeNull] + string Scenario { get; } + + /// + /// Execution state condition for the current mapping. + /// + [CanBeNull] + string ExecutionConditionState { get; } + + /// + /// The next state which will be signaled after the current mapping execution. + /// In case the value is null, state will not be changed. + /// + [CanBeNull] + string NextState { get; } + + /// + /// The Request matcher. + /// + IRequestMatcher RequestMatcher { get; } + + /// + /// The Provider. + /// + IResponseProvider Provider { get; } + + /// + /// Is State started ? + /// + bool IsStartState { get; } + + /// + /// ResponseToAsync + /// + /// The request message. + /// The . + Task ResponseToAsync(RequestMessage requestMessage); + + /// + /// Gets the RequestMatchResult based on the RequestMessage. + /// + /// The request message. + /// The Next State. + /// The . + RequestMatchResult GetRequestMatchResult(RequestMessage requestMessage, [CanBeNull] string nextState); + + /// + /// Gets a value indicating whether this mapping is an Admin Interface. + /// + /// + /// true if this mapping is an Admin Interface; otherwise, false. + /// + bool IsAdminInterface { get; } + } +} \ No newline at end of file diff --git a/src/WireMock.Net/Mapping.cs b/src/WireMock.Net/Mapping.cs index 31e40de91..edb6a099f 100644 --- a/src/WireMock.Net/Mapping.cs +++ b/src/WireMock.Net/Mapping.cs @@ -9,11 +9,9 @@ namespace WireMock /// /// The Mapping. /// - public class Mapping + public class Mapping : IMapping { - /// - /// Gets the unique identifier. - /// + /// public Guid Guid { get; } /// diff --git a/src/WireMock.Net/MappingRegistrationCallback.cs b/src/WireMock.Net/MappingRegistrationCallback.cs index 78616afb4..cd5ad6f33 100644 --- a/src/WireMock.Net/MappingRegistrationCallback.cs +++ b/src/WireMock.Net/MappingRegistrationCallback.cs @@ -4,5 +4,5 @@ /// The registration callback. /// /// The mapping. - public delegate void RegistrationCallback(Mapping mapping); + public delegate void RegistrationCallback(IMapping mapping); } \ No newline at end of file diff --git a/src/WireMock.Net/Owin/IMappingMatcher.cs b/src/WireMock.Net/Owin/IMappingMatcher.cs index 950defca8..e1b5363cf 100644 --- a/src/WireMock.Net/Owin/IMappingMatcher.cs +++ b/src/WireMock.Net/Owin/IMappingMatcher.cs @@ -4,6 +4,6 @@ namespace WireMock.Owin { internal interface IMappingMatcher { - (Mapping Mapping, RequestMatchResult RequestMatchResult) Match(RequestMessage request); + (IMapping Mapping, RequestMatchResult RequestMatchResult) Match(RequestMessage request); } } \ No newline at end of file diff --git a/src/WireMock.Net/Owin/IWireMockMiddlewareOptions.cs b/src/WireMock.Net/Owin/IWireMockMiddlewareOptions.cs index cf4988249..e26e0acec 100644 --- a/src/WireMock.Net/Owin/IWireMockMiddlewareOptions.cs +++ b/src/WireMock.Net/Owin/IWireMockMiddlewareOptions.cs @@ -21,7 +21,7 @@ internal interface IWireMockMiddlewareOptions bool AllowPartialMapping { get; set; } - ConcurrentDictionary Mappings { get; } + ConcurrentDictionary Mappings { get; } ConcurrentDictionary Scenarios { get; } diff --git a/src/WireMock.Net/Owin/MappingMatcher.cs b/src/WireMock.Net/Owin/MappingMatcher.cs index ec61ac83d..880c125d1 100644 --- a/src/WireMock.Net/Owin/MappingMatcher.cs +++ b/src/WireMock.Net/Owin/MappingMatcher.cs @@ -15,7 +15,7 @@ public MappingMatcher(IWireMockMiddlewareOptions options) _options = options; } - public (Mapping Mapping, RequestMatchResult RequestMatchResult) Match(RequestMessage request) + public (IMapping Mapping, RequestMatchResult RequestMatchResult) Match(RequestMessage request) { var mappings = _options.Mappings.Values .Select(m => new @@ -28,7 +28,7 @@ public MappingMatcher(IWireMockMiddlewareOptions options) if (_options.AllowPartialMapping) { var partialMappings = mappings - .Where(pm => pm.Mapping.IsAdminInterface && pm.MatchResult.IsPerfectMatch || !pm.Mapping.IsAdminInterface) + .Where(pm => (pm.Mapping.IsAdminInterface && pm.MatchResult.IsPerfectMatch) || !pm.Mapping.IsAdminInterface) .OrderBy(m => m.MatchResult) .ThenBy(m => m.Mapping.Priority) .ToList(); diff --git a/src/WireMock.Net/Owin/WireMockMiddleware.cs b/src/WireMock.Net/Owin/WireMockMiddleware.cs index d8a70d82e..9cb89472d 100644 --- a/src/WireMock.Net/Owin/WireMockMiddleware.cs +++ b/src/WireMock.Net/Owin/WireMockMiddleware.cs @@ -73,7 +73,7 @@ private async Task InvokeInternal(IContext ctx) bool logRequest = false; ResponseMessage response = null; - (Mapping TargetMapping, RequestMatchResult RequestMatchResult) result = (null, null); + (IMapping TargetMapping, RequestMatchResult RequestMatchResult) result = (null, null); try { foreach (var mapping in _options.Mappings.Values.Where(m => m?.Scenario != null)) diff --git a/src/WireMock.Net/Owin/WireMockMiddlewareOptions.cs b/src/WireMock.Net/Owin/WireMockMiddlewareOptions.cs index b264fe3c9..aa7a2f890 100644 --- a/src/WireMock.Net/Owin/WireMockMiddlewareOptions.cs +++ b/src/WireMock.Net/Owin/WireMockMiddlewareOptions.cs @@ -22,7 +22,7 @@ internal class WireMockMiddlewareOptions : IWireMockMiddlewareOptions public bool AllowPartialMapping { get; set; } - public ConcurrentDictionary Mappings { get; } = new ConcurrentDictionary(); + public ConcurrentDictionary Mappings { get; } = new ConcurrentDictionary(); public ConcurrentDictionary Scenarios { get; } = new ConcurrentDictionary(); diff --git a/src/WireMock.Net/Serialization/MappingConverter.cs b/src/WireMock.Net/Serialization/MappingConverter.cs index c5a11fa9f..a53b66ab7 100644 --- a/src/WireMock.Net/Serialization/MappingConverter.cs +++ b/src/WireMock.Net/Serialization/MappingConverter.cs @@ -10,7 +10,7 @@ namespace WireMock.Serialization { internal static class MappingConverter { - public static MappingModel ToMappingModel(Mapping mapping) + public static MappingModel ToMappingModel(IMapping mapping) { var request = (Request)mapping.RequestMatcher; var response = (Response)mapping.Provider; diff --git a/src/WireMock.Net/Server/FluentMockServer.Admin.cs b/src/WireMock.Net/Server/FluentMockServer.Admin.cs index 7133e84f6..02fb8ae32 100644 --- a/src/WireMock.Net/Server/FluentMockServer.Admin.cs +++ b/src/WireMock.Net/Server/FluentMockServer.Admin.cs @@ -256,7 +256,7 @@ private async Task ProxyAndRecordAsync(RequestMessage requestMe return responseMessage; } - private Mapping ToMapping(RequestMessage requestMessage, ResponseMessage responseMessage, string[] blacklistedHeaders) + private IMapping ToMapping(RequestMessage requestMessage, ResponseMessage responseMessage, string[] blacklistedHeaders) { var request = Request.Create(); request.WithPath(requestMessage.Path); @@ -371,7 +371,7 @@ private ResponseMessage MappingsSave(RequestMessage requestMessage) return ResponseMessageBuilder.Create("Mappings saved to disk"); } - private void SaveMappingToFile(Mapping mapping, string folder = null) + private void SaveMappingToFile(IMapping mapping, string folder = null) { if (folder == null) { diff --git a/src/WireMock.Net/Server/FluentMockServer.cs b/src/WireMock.Net/Server/FluentMockServer.cs index 5650762ee..ffa2609b5 100644 --- a/src/WireMock.Net/Server/FluentMockServer.cs +++ b/src/WireMock.Net/Server/FluentMockServer.cs @@ -53,7 +53,7 @@ public partial class FluentMockServer : IDisposable /// Gets the mappings. /// [PublicAPI] - public IEnumerable Mappings => _options.Mappings.Values.ToArray(); + public IEnumerable Mappings => _options.Mappings.Values.ToArray(); /// /// Gets the scenarios. @@ -424,7 +424,7 @@ public IRespondWithAProvider Given(IRequestMatcher requestMatcher) return new RespondWithAProvider(RegisterMapping, requestMatcher); } - private void RegisterMapping(Mapping mapping) + private void RegisterMapping(IMapping mapping) { // Check a mapping exists with the same Guid, if so, replace it. if (_options.Mappings.ContainsKey(mapping.Guid)) diff --git a/test/WireMock.Net.Tests/Owin/MappingMatcherTests.cs b/test/WireMock.Net.Tests/Owin/MappingMatcherTests.cs index 03148222d..e201a6a3f 100644 --- a/test/WireMock.Net.Tests/Owin/MappingMatcherTests.cs +++ b/test/WireMock.Net.Tests/Owin/MappingMatcherTests.cs @@ -14,31 +14,30 @@ namespace WireMock.Net.Tests.Owin { public class MappingMatcherTests { - private Mock _options; + private Mock _optionsMock; private IMappingMatcher _sut; public MappingMatcherTests() { - _options = new Mock(); - _options.SetupAllProperties(); - _options.Setup(o => o.Mappings).Returns(new ConcurrentDictionary()); - _options.Setup(o => o.LogEntries).Returns(new ConcurentObservableCollection()); - _options.Setup(o => o.Scenarios).Returns(new ConcurrentDictionary()); - - _sut = new MappingMatcher(_options.Object); + _optionsMock = new Mock(); + _optionsMock.SetupAllProperties(); + _optionsMock.Setup(o => o.Mappings).Returns(new ConcurrentDictionary()); + _optionsMock.Setup(o => o.LogEntries).Returns(new ConcurentObservableCollection()); + _optionsMock.Setup(o => o.Scenarios).Returns(new ConcurrentDictionary()); + + _sut = new MappingMatcher(_optionsMock.Object); } [Fact] public void MappingMatcher_Match_NoMappingsDefined() { // Assign - var headers = new Dictionary { { "Content-Type", new[] { "application/json" } } }; var body = new BodyData { BodyAsJson = new { x = 1 } }; - var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "GET", "::1", body, headers); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "GET", "::1", body); // Act var result = _sut.Match(request); @@ -48,36 +47,35 @@ public void MappingMatcher_Match_NoMappingsDefined() Check.That(result.RequestMatchResult).IsNull(); } - //[Fact] - //public void MappingMatcher_Match_AllowPartialMapping() - //{ - // // Assign - // var headers = new Dictionary { { "Content-Type", new[] { "application/json" } } }; - // var body = new BodyData - // { - // BodyAsJson = new { x = 1 } - // }; - // var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "GET", "::1", body, headers); + [Fact] + public void MappingMatcher_Match_AllowPartialMapping() + { + // Assign + var body = new BodyData + { + BodyAsJson = new { x = 1 } + }; + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "GET", "::1", body); - // _options.SetupGet(o => o.AllowPartialMapping).Returns(true); + _optionsMock.SetupGet(o => o.AllowPartialMapping).Returns(true); - // var mappingMock = new Mock(); - // var partialMatchResult = new RequestMatchResult(); - // partialMatchResult.AddScore(typeof(object), 0.1); + var mappingMock = new Mock(); + var partialMatchResult = new RequestMatchResult(); + partialMatchResult.AddScore(typeof(object), 0.1); - // mappingMock.Setup(m => m.GetRequestMatchResult(It.IsAny(), It.IsAny())).Returns(partialMatchResult); + mappingMock.Setup(m => m.GetRequestMatchResult(It.IsAny(), It.IsAny())).Returns(partialMatchResult); - // var mappings = new ConcurrentDictionary(); - // mappings.TryAdd(Guid.NewGuid(), mappingMock.Object); + var mappings = new ConcurrentDictionary(); + mappings.TryAdd(Guid.NewGuid(), mappingMock.Object); - // _options.Setup(o => o.Mappings).Returns(mappings); + _optionsMock.Setup(o => o.Mappings).Returns(mappings); - // // Act - // var result = _sut.Match(request); + // Act + var result = _sut.Match(request); - // // Assert and Verify - // Check.That(result.Mapping).IsNotNull(); - // Check.That(result.RequestMatchResult.AverageTotalScore).IsEqualTo(0.1); - //} + // Assert and Verify + Check.That(result.Mapping).IsNotNull(); + Check.That(result.RequestMatchResult.AverageTotalScore).IsEqualTo(0.1); + } } } diff --git a/test/WireMock.Net.Tests/Owin/WireMockMiddlewareTests.cs b/test/WireMock.Net.Tests/Owin/WireMockMiddlewareTests.cs index f65d899a0..5925258a2 100644 --- a/test/WireMock.Net.Tests/Owin/WireMockMiddlewareTests.cs +++ b/test/WireMock.Net.Tests/Owin/WireMockMiddlewareTests.cs @@ -35,35 +35,35 @@ public class WireMockMiddlewareTests { private WireMockMiddleware _sut; - private Mock _options; - private Mock _requestMapper; - private Mock _responseMapper; - private Mock _matcher; - private Mock _context; + private Mock _optionsMock; + private Mock _requestMapperMock; + private Mock _responseMapperMock; + private Mock _matcherMock; + private Mock _contextMock; public WireMockMiddlewareTests() { - _options = new Mock(); - _options.SetupAllProperties(); - _options.Setup(o => o.Mappings).Returns(new ConcurrentDictionary()); - _options.Setup(o => o.LogEntries).Returns(new ConcurentObservableCollection()); - _options.Setup(o => o.Scenarios).Returns(new ConcurrentDictionary()); - _options.Setup(o => o.Logger.Warn(It.IsAny(), It.IsAny())); - _options.Setup(o => o.Logger.DebugRequestResponse(It.IsAny(), false)); + _optionsMock = new Mock(); + _optionsMock.SetupAllProperties(); + _optionsMock.Setup(o => o.Mappings).Returns(new ConcurrentDictionary()); + _optionsMock.Setup(o => o.LogEntries).Returns(new ConcurentObservableCollection()); + _optionsMock.Setup(o => o.Scenarios).Returns(new ConcurrentDictionary()); + _optionsMock.Setup(o => o.Logger.Warn(It.IsAny(), It.IsAny())); + _optionsMock.Setup(o => o.Logger.DebugRequestResponse(It.IsAny(), false)); - _requestMapper = new Mock(); - _requestMapper.SetupAllProperties(); + _requestMapperMock = new Mock(); + _requestMapperMock.SetupAllProperties(); - _responseMapper = new Mock(); - _responseMapper.SetupAllProperties(); + _responseMapperMock = new Mock(); + _responseMapperMock.SetupAllProperties(); - _matcher = new Mock(); - _matcher.SetupAllProperties(); - _matcher.Setup(m => m.Match(It.IsAny())).Returns(((Mapping)null, (RequestMatchResult)null)); + _matcherMock = new Mock(); + _matcherMock.SetupAllProperties(); + _matcherMock.Setup(m => m.Match(It.IsAny())).Returns(((IMapping)null, (RequestMatchResult)null)); - _context = new Mock(); + _contextMock = new Mock(); - _sut = new WireMockMiddleware(null, _options.Object, _requestMapper.Object, _responseMapper.Object, _matcher.Object); + _sut = new WireMockMiddleware(null, _optionsMock.Object, _requestMapperMock.Object, _responseMapperMock.Object, _matcherMock.Object); } [Fact] @@ -77,17 +77,17 @@ public async void WireMockMiddleware_Invoke_NoMatch() }; var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "GET", "::1", body, headers); - _requestMapper.Setup(m => m.MapAsync(It.IsAny())).ReturnsAsync(request); - _responseMapper.Setup(m => m.MapAsync(It.IsAny(), It.IsAny())).Returns(Task.FromResult(true)); + _requestMapperMock.Setup(m => m.MapAsync(It.IsAny())).ReturnsAsync(request); + _responseMapperMock.Setup(m => m.MapAsync(It.IsAny(), It.IsAny())).Returns(Task.FromResult(true)); // Act - await _sut.Invoke(_context.Object); + await _sut.Invoke(_contextMock.Object); // Assert and Verify - _options.Verify(o => o.Logger.Warn(It.IsAny(), It.IsAny()), Times.Once); + _optionsMock.Verify(o => o.Logger.Warn(It.IsAny(), It.IsAny()), Times.Once); Expression> match = r => r.StatusCode == 404 && ((StatusModel)r.BodyAsJson).Status == "No matching mapping found"; - _responseMapper.Verify(m => m.MapAsync(It.Is(match), It.IsAny()), Times.Once); + _responseMapperMock.Verify(m => m.MapAsync(It.Is(match), It.IsAny()), Times.Once); } } } \ No newline at end of file From d07d31892e1acde4cc019f29fd9d166a5da73006 Mon Sep 17 00:00:00 2001 From: Stef Heyenrath Date: Tue, 25 Sep 2018 21:35:13 +0200 Subject: [PATCH 07/12] more tests --- .../Owin/WireMockMiddlewareTests.cs | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/test/WireMock.Net.Tests/Owin/WireMockMiddlewareTests.cs b/test/WireMock.Net.Tests/Owin/WireMockMiddlewareTests.cs index 5925258a2..857752481 100644 --- a/test/WireMock.Net.Tests/Owin/WireMockMiddlewareTests.cs +++ b/test/WireMock.Net.Tests/Owin/WireMockMiddlewareTests.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Concurrent; using System.Linq.Expressions; -using System.Collections.Generic; using System.Threading.Tasks; using Moq; using Xunit; @@ -54,8 +53,13 @@ public WireMockMiddlewareTests() _requestMapperMock = new Mock(); _requestMapperMock.SetupAllProperties(); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "GET", "::1", new BodyData { BodyAsJson = new { x = 1 } }); + _requestMapperMock.Setup(m => m.MapAsync(It.IsAny())).ReturnsAsync(request); + + _responseMapperMock = new Mock(); _responseMapperMock.SetupAllProperties(); + _responseMapperMock.Setup(m => m.MapAsync(It.IsAny(), It.IsAny())).Returns(Task.FromResult(true)); _matcherMock = new Mock(); _matcherMock.SetupAllProperties(); @@ -69,17 +73,6 @@ public WireMockMiddlewareTests() [Fact] public async void WireMockMiddleware_Invoke_NoMatch() { - // Assign - var headers = new Dictionary { { "Content-Type", new[] { "application/json" } } }; - var body = new BodyData - { - BodyAsJson = new { x = 1 } - }; - var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "GET", "::1", body, headers); - - _requestMapperMock.Setup(m => m.MapAsync(It.IsAny())).ReturnsAsync(request); - _responseMapperMock.Setup(m => m.MapAsync(It.IsAny(), It.IsAny())).Returns(Task.FromResult(true)); - // Act await _sut.Invoke(_contextMock.Object); @@ -89,5 +82,15 @@ public async void WireMockMiddleware_Invoke_NoMatch() Expression> match = r => r.StatusCode == 404 && ((StatusModel)r.BodyAsJson).Status == "No matching mapping found"; _responseMapperMock.Verify(m => m.MapAsync(It.Is(match), It.IsAny()), Times.Once); } + + [Fact] + public async void WireMockMiddleware_Invoke_RequestLogExpirationDurationIsDefined() + { + // Assign + _optionsMock.SetupGet(o => o.RequestLogExpirationDuration).Returns(1); + + // Act + await _sut.Invoke(_contextMock.Object); + } } } \ No newline at end of file From 84e69db50b73cbd247db7e7d4549e5df60becf48 Mon Sep 17 00:00:00 2001 From: Stef Heyenrath Date: Tue, 25 Sep 2018 23:18:44 +0200 Subject: [PATCH 08/12] tests --- src/WireMock.Net/ResponseBuilders/Response.cs | 33 ++++++++--- .../FluentMockServerTests.cs | 58 ------------------- .../Owin/MappingMatcherTests.cs | 13 +---- .../Owin/WireMockMiddlewareTests.cs | 56 ++++++++++++++++-- .../ResponseBuilders/ResponseCreateTests.cs | 6 +- .../ResponseWithCallbackTests.cs | 26 +++++++++ 6 files changed, 107 insertions(+), 85 deletions(-) create mode 100644 test/WireMock.Net.Tests/ResponseBuilders/ResponseWithCallbackTests.cs diff --git a/src/WireMock.Net/ResponseBuilders/Response.cs b/src/WireMock.Net/ResponseBuilders/Response.cs index 714da3e38..58980af61 100644 --- a/src/WireMock.Net/ResponseBuilders/Response.cs +++ b/src/WireMock.Net/ResponseBuilders/Response.cs @@ -49,10 +49,15 @@ public class Response : IResponseBuilder public ResponseMessage ResponseMessage { get; } /// - /// A delegate to execute to generate the response + /// A delegate to execute to generate the response. /// public Func Callback { get; private set; } + /// + /// Defines if the method WithCallback(...) is used. + /// + public bool WithCallbackUsed { get; private set; } + /// /// Creates this instance. /// @@ -171,7 +176,7 @@ public IResponseBuilder WithBody(Func bodyFactory, strin { Check.NotNull(bodyFactory, nameof(bodyFactory)); - return WithCallback(req => new ResponseMessage + return WithCallbackInternal(false, req => new ResponseMessage { Body = bodyFactory(req), BodyDestination = destination, @@ -341,6 +346,15 @@ public IResponseBuilder WithCallback(Func callb { Check.NotNull(callbackHandler, nameof(callbackHandler)); + return WithCallbackInternal(true, callbackHandler); + } + + /// + private IResponseBuilder WithCallbackInternal(bool withCallbackUsed, Func callbackHandler) + { + Check.NotNull(callbackHandler, nameof(callbackHandler)); + + WithCallbackUsed = withCallbackUsed; Callback = callbackHandler; return this; @@ -364,13 +378,16 @@ public async Task ProvideResponseAsync(RequestMessage requestMe { var callbackResponseMessage = Callback(requestMessage); - // Copy StatusCode from ResponseMessage - callbackResponseMessage.StatusCode = ResponseMessage.StatusCode; - - // Copy Headers from ResponseMessage (if defined) - if (ResponseMessage.Headers != null) + if (!WithCallbackUsed) { - callbackResponseMessage.Headers = ResponseMessage.Headers; + // Copy StatusCode from ResponseMessage + callbackResponseMessage.StatusCode = ResponseMessage.StatusCode; + + // Copy Headers from ResponseMessage (if defined) + if (ResponseMessage.Headers != null) + { + callbackResponseMessage.Headers = ResponseMessage.Headers; + } } return callbackResponseMessage; diff --git a/test/WireMock.Net.Tests/FluentMockServerTests.cs b/test/WireMock.Net.Tests/FluentMockServerTests.cs index e4af9d167..4685b1d39 100644 --- a/test/WireMock.Net.Tests/FluentMockServerTests.cs +++ b/test/WireMock.Net.Tests/FluentMockServerTests.cs @@ -2,7 +2,6 @@ using System; using System.Diagnostics; using System.Linq; -using System.Net; using System.Net.Http; using System.Threading.Tasks; using WireMock.Matchers; @@ -15,31 +14,6 @@ namespace WireMock.Net.Tests { public class FluentMockServerTests { - [Fact] - public async Task FluentMockServer_Should_respond_to_request_bodyAsCallback() - { - // Assign - var _server = FluentMockServer.Start(); - - _server - .Given(Request.Create() - .WithPath("/foo") - .UsingGet()) - .RespondWith(Response.Create() - .WithStatusCode(500) - .WithHeader("H1", "X1") - .WithBody(req => $"path: {req.Path}")); - - // Act - var response = await new HttpClient().GetAsync("http://localhost:" + _server.Ports[0] + "/foo"); - - // Assert - string content = await response.Content.ReadAsStringAsync(); - Check.That(content).IsEqualTo("path: /foo"); - Check.That((int)response.StatusCode).IsEqualTo(500); - Check.That(response.Headers.GetValues("H1")).ContainsExactly("X1"); - } - [Fact] public async Task FluentMockServer_Should_respond_to_request_bodyAsBase64() { @@ -55,21 +29,6 @@ public async Task FluentMockServer_Should_respond_to_request_bodyAsBase64() Check.That(response).IsEqualTo("Hello World?"); } - [Fact] - public async Task FluentMockServer_Should_respond_404_for_unexpected_request() - { - // given - string path = $"/foo{Guid.NewGuid()}"; - var _server = FluentMockServer.Start(); - - // when - var response = await new HttpClient().GetAsync("http://localhost:" + _server.Ports[0] + path); - - // then - Check.That(response.StatusCode).IsEqualTo(HttpStatusCode.NotFound); - Check.That((int)response.StatusCode).IsEqualTo(404); - } - [Fact] public async Task FluentMockServer_Should_find_a_request_satisfying_a_request_spec() { @@ -218,23 +177,6 @@ public async Task FluentMockServer_Should_delay_responses() // Check.That(result).Contains("google"); //} - [Fact] - public async Task FluentMockServer_Should_respond_to_request_callback() - { - // Assign - var _server = FluentMockServer.Start(); - - _server - .Given(Request.Create().WithPath("/foo").UsingGet()) - .RespondWith(Response.Create().WithCallback(req => new ResponseMessage { Body = req.Path + "Bar" })); - - // Act - string response = await new HttpClient().GetStringAsync("http://localhost:" + _server.Ports[0] + "/foo"); - - // Assert - Check.That(response).IsEqualTo("/fooBar"); - } - #if !NET452 [Fact] public async Task FluentMockServer_Should_not_exclude_restrictedResponseHeader_for_ASPNETCORE() diff --git a/test/WireMock.Net.Tests/Owin/MappingMatcherTests.cs b/test/WireMock.Net.Tests/Owin/MappingMatcherTests.cs index e201a6a3f..5fefc38e6 100644 --- a/test/WireMock.Net.Tests/Owin/MappingMatcherTests.cs +++ b/test/WireMock.Net.Tests/Owin/MappingMatcherTests.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Concurrent; -using System.Collections.Generic; using Moq; using NFluent; using WireMock.Logging; @@ -33,11 +32,7 @@ public MappingMatcherTests() public void MappingMatcher_Match_NoMappingsDefined() { // Assign - var body = new BodyData - { - BodyAsJson = new { x = 1 } - }; - var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "GET", "::1", body); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "GET", "::1"); // Act var result = _sut.Match(request); @@ -51,11 +46,7 @@ public void MappingMatcher_Match_NoMappingsDefined() public void MappingMatcher_Match_AllowPartialMapping() { // Assign - var body = new BodyData - { - BodyAsJson = new { x = 1 } - }; - var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "GET", "::1", body); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "GET", "::1"); _optionsMock.SetupGet(o => o.AllowPartialMapping).Returns(true); diff --git a/test/WireMock.Net.Tests/Owin/WireMockMiddlewareTests.cs b/test/WireMock.Net.Tests/Owin/WireMockMiddlewareTests.cs index 857752481..344eec4aa 100644 --- a/test/WireMock.Net.Tests/Owin/WireMockMiddlewareTests.cs +++ b/test/WireMock.Net.Tests/Owin/WireMockMiddlewareTests.cs @@ -12,6 +12,8 @@ using WireMock.Admin.Requests; using WireMock.Logging; using WireMock.Matchers.Request; +using WireMock.Matchers; +using System.Collections.Generic; #if NET452 using Microsoft.Owin; using IContext = Microsoft.Owin.IOwinContext; @@ -38,6 +40,7 @@ public class WireMockMiddlewareTests private Mock _requestMapperMock; private Mock _responseMapperMock; private Mock _matcherMock; + private Mock _mappingMock; private Mock _contextMock; public WireMockMiddlewareTests() @@ -48,14 +51,13 @@ public WireMockMiddlewareTests() _optionsMock.Setup(o => o.LogEntries).Returns(new ConcurentObservableCollection()); _optionsMock.Setup(o => o.Scenarios).Returns(new ConcurrentDictionary()); _optionsMock.Setup(o => o.Logger.Warn(It.IsAny(), It.IsAny())); - _optionsMock.Setup(o => o.Logger.DebugRequestResponse(It.IsAny(), false)); + _optionsMock.Setup(o => o.Logger.Error(It.IsAny(), It.IsAny())); + _optionsMock.Setup(o => o.Logger.DebugRequestResponse(It.IsAny(), It.IsAny())); _requestMapperMock = new Mock(); _requestMapperMock.SetupAllProperties(); - - var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "GET", "::1", new BodyData { BodyAsJson = new { x = 1 } }); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "GET", "::1"); _requestMapperMock.Setup(m => m.MapAsync(It.IsAny())).ReturnsAsync(request); - _responseMapperMock = new Mock(); _responseMapperMock.SetupAllProperties(); @@ -67,6 +69,8 @@ public WireMockMiddlewareTests() _contextMock = new Mock(); + _mappingMock = new Mock(); + _sut = new WireMockMiddleware(null, _optionsMock.Object, _requestMapperMock.Object, _responseMapperMock.Object, _matcherMock.Object); } @@ -83,6 +87,50 @@ public async void WireMockMiddleware_Invoke_NoMatch() _responseMapperMock.Verify(m => m.MapAsync(It.Is(match), It.IsAny()), Times.Once); } + [Fact] + public async void WireMockMiddleware_Invoke_IsAdminInterface_EmptyHeaders_401() + { + // Assign + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "GET", "::1", null, new Dictionary()); + _requestMapperMock.Setup(m => m.MapAsync(It.IsAny())).ReturnsAsync(request); + + _optionsMock.SetupGet(o => o.AuthorizationMatcher).Returns(new ExactMatcher()); + _mappingMock.SetupGet(m => m.IsAdminInterface).Returns(true); + _matcherMock.Setup(m => m.Match(It.IsAny())).Returns((_mappingMock.Object, (RequestMatchResult)null)); + + // Act + await _sut.Invoke(_contextMock.Object); + + // Assert and Verify + _optionsMock.Verify(o => o.Logger.Error(It.IsAny(), It.IsAny()), Times.Once); + + Expression> match = r => r.StatusCode == 401; + _responseMapperMock.Verify(m => m.MapAsync(It.Is(match), It.IsAny()), Times.Once); + } + + [Fact] + public async void WireMockMiddleware_Invoke_IsAdminInterface_MissingHeader_401() + { + // Assign + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "GET", "::1", null, new Dictionary { { "h", new[] { "x" } } }); + _requestMapperMock.Setup(m => m.MapAsync(It.IsAny())).ReturnsAsync(request); + + _optionsMock.SetupGet(o => o.AuthorizationMatcher).Returns(new ExactMatcher()); + _mappingMock.SetupGet(m => m.IsAdminInterface).Returns(true); + _matcherMock.Setup(m => m.Match(It.IsAny())).Returns((_mappingMock.Object, (RequestMatchResult)null)); + + // Act + await _sut.Invoke(_contextMock.Object); + + // Assert and Verify + _optionsMock.Verify(o => o.Logger.Error(It.IsAny(), It.IsAny()), Times.Once); + + Expression> match = r => r.StatusCode == 401; + _responseMapperMock.Verify(m => m.MapAsync(It.Is(match), It.IsAny()), Times.Once); + } + + + [Fact] public async void WireMockMiddleware_Invoke_RequestLogExpirationDurationIsDefined() { diff --git a/test/WireMock.Net.Tests/ResponseBuilders/ResponseCreateTests.cs b/test/WireMock.Net.Tests/ResponseBuilders/ResponseCreateTests.cs index aa85906b2..63ba0f789 100644 --- a/test/WireMock.Net.Tests/ResponseBuilders/ResponseCreateTests.cs +++ b/test/WireMock.Net.Tests/ResponseBuilders/ResponseCreateTests.cs @@ -8,14 +8,12 @@ namespace WireMock.Net.Tests.ResponseBuilderTests { public class ResponseCreateTests { - private const string ClientIp = "::1"; - [Fact] - public async Task Response_Create() + public async Task Response_Create_Func() { // Assign var responseMessage = new ResponseMessage { StatusCode = 500 }; - var request = new RequestMessage(new UrlDetails("http://localhost"), "GET", ClientIp); + var request = new RequestMessage(new UrlDetails("http://localhost"), "GET", "::1"); var response = Response.Create(() => responseMessage); diff --git a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithCallbackTests.cs b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithCallbackTests.cs new file mode 100644 index 000000000..4749ffd9b --- /dev/null +++ b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithCallbackTests.cs @@ -0,0 +1,26 @@ +using System.Threading.Tasks; +using NFluent; +using WireMock.Models; +using WireMock.ResponseBuilders; +using Xunit; + +namespace WireMock.Net.Tests.ResponseBuilderTests +{ + public class ResponseWithCallbackTests + { + [Fact] + public async Task Response_WithCallback() + { + // Assign + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "GET", "::1"); + var response = Response.Create().WithCallback(req => new ResponseMessage { Body = req.Path + "Bar", StatusCode = 302 }); + + // Act + var responseMessage = await response.ProvideResponseAsync(request); + + // Assert + Check.That(responseMessage.Body).IsEqualTo("/fooBar"); + Check.That(responseMessage.StatusCode).IsEqualTo(302); + } + } +} \ No newline at end of file From 941258af2579e3a3b7dfe7c61c340aca8145fd2a Mon Sep 17 00:00:00 2001 From: Stef Heyenrath Date: Wed, 26 Sep 2018 08:12:58 +0200 Subject: [PATCH 09/12] More tests --- .../FluentMockServerTests.Settings.cs | 43 +++++++++++++++ .../FluentMockServerTests.cs | 20 ------- .../Owin/MappingMatcherTests.cs | 53 ++++++++++++++----- 3 files changed, 83 insertions(+), 33 deletions(-) diff --git a/test/WireMock.Net.Tests/FluentMockServerTests.Settings.cs b/test/WireMock.Net.Tests/FluentMockServerTests.Settings.cs index 1e5af064c..36bd4f329 100644 --- a/test/WireMock.Net.Tests/FluentMockServerTests.Settings.cs +++ b/test/WireMock.Net.Tests/FluentMockServerTests.Settings.cs @@ -1,5 +1,7 @@ using System.Linq; +using Moq; using NFluent; +using WireMock.Logging; using WireMock.Owin; using WireMock.Server; using WireMock.Settings; @@ -9,6 +11,14 @@ namespace WireMock.Net.Tests { public class FluentMockServerSettingsTests { + private Mock _loggerMock; + + public FluentMockServerSettingsTests() + { + _loggerMock = new Mock(); + _loggerMock.Setup(l => l.Info(It.IsAny(), It.IsAny())); + } + [Fact] public void FluentMockServer_FluentMockServerSettings_StartAdminInterfaceTrue_BasicAuthenticationIsSet() { @@ -93,5 +103,38 @@ public void FluentMockServer_FluentMockServerSettings_ProxyAndRecordSettings_Pro Check.That(mappings.Count()).IsEqualTo(1); Check.That(mappings[0].Priority).IsEqualTo(0); } + + [Fact] + public void FluentMockServer_FluentMockServerSettings_AllowPartialMapping() + { + // Assign and Act + var server = FluentMockServer.Start(new FluentMockServerSettings + { + Logger = _loggerMock.Object, + AllowPartialMapping = true + }); + + // Assert + var options = server.GetPrivateFieldValue("_options"); + Check.That(options.AllowPartialMapping).IsTrue(); + + // Verify + _loggerMock.Verify(l => l.Info(It.IsAny(), It.IsAny())); + } + + [Fact] + public void FluentMockServer_FluentMockServerSettings_RequestLogExpirationDuration() + { + // Assign and Act + var server = FluentMockServer.Start(new FluentMockServerSettings + { + Logger = _loggerMock.Object, + RequestLogExpirationDuration = 1 + }); + + // Assert + var options = server.GetPrivateFieldValue("_options"); + Check.That(options.RequestLogExpirationDuration).IsEqualTo(1); + } } } \ No newline at end of file diff --git a/test/WireMock.Net.Tests/FluentMockServerTests.cs b/test/WireMock.Net.Tests/FluentMockServerTests.cs index 4685b1d39..f908945c6 100644 --- a/test/WireMock.Net.Tests/FluentMockServerTests.cs +++ b/test/WireMock.Net.Tests/FluentMockServerTests.cs @@ -29,26 +29,6 @@ public async Task FluentMockServer_Should_respond_to_request_bodyAsBase64() Check.That(response).IsEqualTo("Hello World?"); } - [Fact] - public async Task FluentMockServer_Should_find_a_request_satisfying_a_request_spec() - { - // Assign - string path = $"/bar_{Guid.NewGuid()}"; - var _server = FluentMockServer.Start(); - - // when - await new HttpClient().GetAsync("http://localhost:" + _server.Ports[0] + "/foo"); - await new HttpClient().GetAsync("http://localhost:" + _server.Ports[0] + path); - - // then - var result = _server.FindLogEntries(Request.Create().WithPath(new RegexMatcher("^/b.*"))).ToList(); - Check.That(result).HasSize(1); - - var requestLogged = result.First(); - Check.That(requestLogged.RequestMessage.Path).IsEqualTo(path); - Check.That(requestLogged.RequestMessage.Url).IsEqualTo("http://localhost:" + _server.Ports[0] + path); - } - [Fact] public async Task FluentMockServer_Should_reset_requestlogs() { diff --git a/test/WireMock.Net.Tests/Owin/MappingMatcherTests.cs b/test/WireMock.Net.Tests/Owin/MappingMatcherTests.cs index 5fefc38e6..865559cd8 100644 --- a/test/WireMock.Net.Tests/Owin/MappingMatcherTests.cs +++ b/test/WireMock.Net.Tests/Owin/MappingMatcherTests.cs @@ -43,30 +43,57 @@ public void MappingMatcher_Match_NoMappingsDefined() } [Fact] - public void MappingMatcher_Match_AllowPartialMapping() + public void MappingMatcher_Match_GetBestMapping_Exact() { // Assign - var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "GET", "::1"); - - _optionsMock.SetupGet(o => o.AllowPartialMapping).Returns(true); + var mappings = InitMappings(new[] { (Guid.Parse("00000000-0000-0000-0000-000000000001"), 0.1), (Guid.Parse("00000000-0000-0000-0000-000000000002"), 1.0) }); + _optionsMock.Setup(o => o.Mappings).Returns(mappings); - var mappingMock = new Mock(); - var partialMatchResult = new RequestMatchResult(); - partialMatchResult.AddScore(typeof(object), 0.1); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "GET", "::1"); - mappingMock.Setup(m => m.GetRequestMatchResult(It.IsAny(), It.IsAny())).Returns(partialMatchResult); + // Act + var result = _sut.Match(request); - var mappings = new ConcurrentDictionary(); - mappings.TryAdd(Guid.NewGuid(), mappingMock.Object); + // Assert and Verify + Check.That(result.Mapping.Guid).IsEqualTo(Guid.Parse("00000000-0000-0000-0000-000000000002")); + Check.That(result.RequestMatchResult.AverageTotalScore).IsEqualTo(1.0); + } + [Fact] + public void MappingMatcher_Match_GetBestMapping_AllowPartialMapping() + { + // Assign + _optionsMock.SetupGet(o => o.AllowPartialMapping).Returns(true); + var mappings = InitMappings(new[] { (Guid.Parse("00000000-0000-0000-0000-000000000001"), 0.1), (Guid.Parse("00000000-0000-0000-0000-000000000002"), 0.9) }); _optionsMock.Setup(o => o.Mappings).Returns(mappings); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "GET", "::1"); + // Act var result = _sut.Match(request); // Assert and Verify - Check.That(result.Mapping).IsNotNull(); - Check.That(result.RequestMatchResult.AverageTotalScore).IsEqualTo(0.1); + Check.That(result.Mapping.Guid).IsEqualTo(Guid.Parse("00000000-0000-0000-0000-000000000002")); + Check.That(result.RequestMatchResult.AverageTotalScore).IsEqualTo(0.9); + } + + private ConcurrentDictionary InitMappings(params (Guid guid, double match)[] matches) + { + var mappings = new ConcurrentDictionary(); + + foreach (var match in matches) + { + var mappingMock = new Mock(); + mappingMock.SetupGet(m => m.Guid).Returns(match.guid); + + var partialMatchResult = new RequestMatchResult(); + partialMatchResult.AddScore(typeof(object), match.match); + mappingMock.Setup(m => m.GetRequestMatchResult(It.IsAny(), It.IsAny())).Returns(partialMatchResult); + + mappings.TryAdd(match.guid, mappingMock.Object); + } + + return mappings; } } -} +} \ No newline at end of file From 6847af889291c0903f8bce60fd32fe41df2d2feb Mon Sep 17 00:00:00 2001 From: Stef Heyenrath Date: Wed, 26 Sep 2018 08:16:57 +0200 Subject: [PATCH 10/12] RequestLogExpirationDuration --- src/WireMock.Net/Server/FluentMockServer.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/WireMock.Net/Server/FluentMockServer.cs b/src/WireMock.Net/Server/FluentMockServer.cs index ffa2609b5..e57f6de84 100644 --- a/src/WireMock.Net/Server/FluentMockServer.cs +++ b/src/WireMock.Net/Server/FluentMockServer.cs @@ -265,6 +265,11 @@ private FluentMockServer(IFluentMockServerSettings settings) InitProxyAndRecord(settings); } + if (settings.RequestLogExpirationDuration != null) + { + SetRequestLogExpirationDuration(settings.RequestLogExpirationDuration); + } + if (settings.MaxRequestLogCount != null) { SetMaxRequestLogCount(settings.MaxRequestLogCount); From 711ba63bfe6f4696eb567b50c7aee460575f839a Mon Sep 17 00:00:00 2001 From: Stef Heyenrath Date: Wed, 26 Sep 2018 09:14:04 +0200 Subject: [PATCH 11/12] fix --- test/WireMock.Net.Tests/Owin/WireMockMiddlewareTests.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/WireMock.Net.Tests/Owin/WireMockMiddlewareTests.cs b/test/WireMock.Net.Tests/Owin/WireMockMiddlewareTests.cs index 344eec4aa..74551a2fc 100644 --- a/test/WireMock.Net.Tests/Owin/WireMockMiddlewareTests.cs +++ b/test/WireMock.Net.Tests/Owin/WireMockMiddlewareTests.cs @@ -129,8 +129,6 @@ public async void WireMockMiddleware_Invoke_IsAdminInterface_MissingHeader_401() _responseMapperMock.Verify(m => m.MapAsync(It.Is(match), It.IsAny()), Times.Once); } - - [Fact] public async void WireMockMiddleware_Invoke_RequestLogExpirationDurationIsDefined() { From 5fc85ef9002f06e54002c9b17dbf9a49f85496d0 Mon Sep 17 00:00:00 2001 From: Stef Heyenrath Date: Wed, 26 Sep 2018 11:52:20 +0200 Subject: [PATCH 12/12] GlobalExceptionMiddlewareTests --- report/coverage.info | 4122 ++++----- report/coverage.opencover.xml | 7567 +++++++++-------- ...Net.StandAlone_SimpleCommandLineParser.htm | 2 +- .../WireMock.Net.StandAlone_StandAloneApp.htm | 2 +- .../WireMock.Net_AspNetCoreSelfHost.htm | 301 +- report/coverlet/WireMock.Net_BodyData.htm | 10 +- report/coverlet/WireMock.Net_BodyModel.htm | 2 +- report/coverlet/WireMock.Net_BodyParser.htm | 56 +- report/coverlet/WireMock.Net_Check.htm | 22 +- .../WireMock.Net_ClientCertificateHelper.htm | 2 +- .../coverlet/WireMock.Net_ClientIPModel.htm | 2 +- ...ck.Net_ConcurentObservableCollection_1.htm | 42 +- report/coverlet/WireMock.Net_CookieModel.htm | 2 +- report/coverlet/WireMock.Net_CoreStrings.htm | 2 +- .../WireMock.Net_DictionaryExtensions.htm | 2 +- ...eMock.Net_DynamicAsyncResponseProvider.htm | 2 +- .../WireMock.Net_DynamicResponseProvider.htm | 2 +- .../coverlet/WireMock.Net_EncodingModel.htm | 8 +- ...WireMock.Net_EnhancedFileSystemWatcher.htm | 2 +- report/coverlet/WireMock.Net_ExactMatcher.htm | 10 +- .../WireMock.Net_ExactObjectMatcher.htm | 2 +- report/coverlet/WireMock.Net_FileHelper.htm | 2 +- .../WireMock.Net_FluentMockServer.htm | 587 +- .../WireMock.Net_FluentMockServerSettings.htm | 36 +- ...WireMock.Net_GlobalExceptionMiddleware.htm | 135 +- .../WireMock.Net_HandleBarsJsonPath.htm | 2 +- .../coverlet/WireMock.Net_HandleBarsLinq.htm | 2 +- .../coverlet/WireMock.Net_HandleBarsRegex.htm | 2 +- .../WireMock.Net_HandlebarsHelpers.htm | 2 +- report/coverlet/WireMock.Net_HeaderModel.htm | 2 +- .../WireMock.Net_HttpClientHelper.htm | 2 +- .../WireMock.Net_HttpRequestMessageHelper.htm | 2 +- report/coverlet/WireMock.Net_JsonMatcher.htm | 2 +- .../coverlet/WireMock.Net_JsonPathMatcher.htm | 74 +- report/coverlet/WireMock.Net_JsonUtils.htm | 2 +- report/coverlet/WireMock.Net_LinqMatcher.htm | 2 +- .../WireMock.Net_LocalFileSystemHandler.htm | 2 +- report/coverlet/WireMock.Net_LogEntry.htm | 14 +- .../coverlet/WireMock.Net_LogEntryMapper.htm | 126 +- .../coverlet/WireMock.Net_LogEntryModel.htm | 14 +- .../WireMock.Net_LogRequestMatchModel.htm | 12 +- .../coverlet/WireMock.Net_LogRequestModel.htm | 30 +- .../WireMock.Net_LogResponseModel.htm | 22 +- report/coverlet/WireMock.Net_Mapping.htm | 284 +- .../WireMock.Net_MappingConverter.htm | 8 +- .../coverlet/WireMock.Net_MappingMatcher.htm | 102 + report/coverlet/WireMock.Net_MappingModel.htm | 2 +- .../WireMock.Net_MatchBehaviourHelper.htm | 12 +- report/coverlet/WireMock.Net_MatchScores.htm | 14 +- .../coverlet/WireMock.Net_MatcherMapper.htm | 12 +- report/coverlet/WireMock.Net_MatcherModel.htm | 2 +- .../WireMock.Net_OwinRequestMapper.htm | 197 +- .../WireMock.Net_OwinResponseMapper.htm | 240 +- report/coverlet/WireMock.Net_ParamModel.htm | 2 +- report/coverlet/WireMock.Net_PathModel.htm | 2 +- report/coverlet/WireMock.Net_PortUtils.htm | 44 +- .../WireMock.Net_ProxyAndRecordSettings.htm | 2 +- ...ireMock.Net_ProxyAsyncResponseProvider.htm | 2 +- .../WireMock.Net_PublicCertificateHelper.htm | 2 +- report/coverlet/WireMock.Net_RegexMatcher.htm | 62 +- report/coverlet/WireMock.Net_RegexUtils.htm | 2 +- report/coverlet/WireMock.Net_Request.htm | 94 +- .../WireMock.Net_RequestMatchResult.htm | 44 +- .../coverlet/WireMock.Net_RequestMessage.htm | 100 +- ...WireMock.Net_RequestMessageBodyMatcher.htm | 56 +- ...Mock.Net_RequestMessageClientIPMatcher.htm | 2 +- ...ock.Net_RequestMessageCompositeMatcher.htm | 32 +- ...reMock.Net_RequestMessageCookieMatcher.htm | 2 +- ...reMock.Net_RequestMessageHeaderMatcher.htm | 2 +- ...reMock.Net_RequestMessageMethodMatcher.htm | 30 +- ...ireMock.Net_RequestMessageParamMatcher.htm | 2 +- ...WireMock.Net_RequestMessagePathMatcher.htm | 38 +- ..._RequestMessageScenarioAndStateMatcher.htm | 2 +- .../WireMock.Net_RequestMessageUrlMatcher.htm | 2 +- report/coverlet/WireMock.Net_RequestModel.htm | 2 +- .../WireMock.Net_RespondWithAProvider.htm | 20 +- report/coverlet/WireMock.Net_Response.htm | 740 +- .../coverlet/WireMock.Net_ResponseMessage.htm | 38 +- .../WireMock.Net_ResponseMessageBuilder.htm | 24 +- ...ireMock.Net_ResponseMessageTransformer.htm | 2 +- .../coverlet/WireMock.Net_ResponseModel.htm | 2 +- .../coverlet/WireMock.Net_ScenarioState.htm | 2 +- .../WireMock.Net_ScenarioStateModel.htm | 2 +- .../coverlet/WireMock.Net_SettingsModel.htm | 2 +- .../WireMock.Net_SimMetricsMatcher.htm | 2 +- report/coverlet/WireMock.Net_StatusModel.htm | 6 +- report/coverlet/WireMock.Net_UrlDetails.htm | 32 +- report/coverlet/WireMock.Net_UrlModel.htm | 2 +- report/coverlet/WireMock.Net_UrlUtils.htm | 12 +- .../coverlet/WireMock.Net_WildcardMatcher.htm | 28 +- .../WireMock.Net_WireMockConsoleLogger.htm | 2 +- .../coverlet/WireMock.Net_WireMockList_1.htm | 8 +- .../WireMock.Net_WireMockMiddleware.htm | 401 +- ...WireMock.Net_WireMockMiddlewareOptions.htm | 44 +- .../WireMock.Net_WireMockNullLogger.htm | 18 +- report/coverlet/WireMock.Net_XPathMatcher.htm | 2 +- report/coverlet/combined.js | 27 +- report/coverlet/index.htm | 49 +- .../Owin/GlobalExceptionMiddlewareTests.cs | 44 + .../Owin/WireMockMiddlewareTests.cs | 4 - 100 files changed, 8178 insertions(+), 7970 deletions(-) create mode 100644 report/coverlet/WireMock.Net_MappingMatcher.htm create mode 100644 test/WireMock.Net.Tests/Owin/GlobalExceptionMiddlewareTests.cs diff --git a/report/coverage.info b/report/coverage.info index d5905d011..8f3209c9f 100644 --- a/report/coverage.info +++ b/report/coverage.info @@ -1,82 +1,82 @@ SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Mapping.cs -FN:16,System.Guid WireMock.Mapping::get_Guid() -FNDA:587,System.Guid WireMock.Mapping::get_Guid() -DA:17,587 -FN:21,System.String WireMock.Mapping::get_Title() -FNDA:58,System.String WireMock.Mapping::get_Title() -DA:22,58 -FN:26,System.String WireMock.Mapping::get_Path() -FNDA:265,System.String WireMock.Mapping::get_Path() -DA:27,265 -FN:31,System.Int32 WireMock.Mapping::get_Priority() -FNDA:134,System.Int32 WireMock.Mapping::get_Priority() -DA:32,134 -FN:37,System.String WireMock.Mapping::get_Scenario() -FNDA:1076,System.String WireMock.Mapping::get_Scenario() -DA:38,1076 -FN:43,System.String WireMock.Mapping::get_ExecutionConditionState() +FN:14,System.Guid WireMock.Mapping::get_Guid() +FNDA:541,System.Guid WireMock.Mapping::get_Guid() +DA:15,541 +FN:19,System.String WireMock.Mapping::get_Title() +FNDA:42,System.String WireMock.Mapping::get_Title() +DA:20,42 +FN:24,System.String WireMock.Mapping::get_Path() +FNDA:250,System.String WireMock.Mapping::get_Path() +DA:25,250 +FN:29,System.Int32 WireMock.Mapping::get_Priority() +FNDA:118,System.Int32 WireMock.Mapping::get_Priority() +DA:30,118 +FN:35,System.String WireMock.Mapping::get_Scenario() +FNDA:1014,System.String WireMock.Mapping::get_Scenario() +DA:36,1014 +FN:41,System.String WireMock.Mapping::get_ExecutionConditionState() FNDA:37,System.String WireMock.Mapping::get_ExecutionConditionState() -DA:44,37 -FN:50,System.String WireMock.Mapping::get_NextState() -FNDA:27,System.String WireMock.Mapping::get_NextState() -DA:51,27 -FN:55,WireMock.Matchers.Request.IRequestMatcher WireMock.Mapping::get_RequestMatcher() -FNDA:300,WireMock.Matchers.Request.IRequestMatcher WireMock.Mapping::get_RequestMatcher() -DA:56,300 -FN:60,WireMock.ResponseProviders.IResponseProvider WireMock.Mapping::get_Provider() -FNDA:507,WireMock.ResponseProviders.IResponseProvider WireMock.Mapping::get_Provider() -DA:61,507 -FN:65,System.Boolean WireMock.Mapping::get_IsStartState() -FNDA:7,System.Boolean WireMock.Mapping::get_IsStartState() -DA:66,7 -BRDA:66,6,0,7 -BRDA:66,14,0,7 -BRDA:66,22,0,5 -BRDA:66,14,1,2 -BRDA:66,22,1,2 -BRDA:66,6,1,0 -FN:109,WireMock.Matchers.Request.RequestMatchResult WireMock.Mapping::GetRequestMatchResult(WireMock.RequestMessage,System.String) -FNDA:295,WireMock.Matchers.Request.RequestMatchResult WireMock.Mapping::GetRequestMatchResult(WireMock.RequestMessage,System.String) -DA:110,295 -DA:111,295 -DA:113,295 -DA:116,295 +DA:42,37 +FN:48,System.String WireMock.Mapping::get_NextState() +FNDA:28,System.String WireMock.Mapping::get_NextState() +DA:49,28 +FN:53,WireMock.Matchers.Request.IRequestMatcher WireMock.Mapping::get_RequestMatcher() +FNDA:284,WireMock.Matchers.Request.IRequestMatcher WireMock.Mapping::get_RequestMatcher() +DA:54,284 +FN:58,WireMock.ResponseProviders.IResponseProvider WireMock.Mapping::get_Provider() +FNDA:323,WireMock.ResponseProviders.IResponseProvider WireMock.Mapping::get_Provider() +DA:59,323 +FN:63,System.Boolean WireMock.Mapping::get_IsStartState() +FNDA:8,System.Boolean WireMock.Mapping::get_IsStartState() +DA:64,8 +BRDA:64,6,0,8 +BRDA:64,14,0,8 +BRDA:64,22,0,5 +BRDA:64,14,1,3 +BRDA:64,22,1,3 +BRDA:64,6,1,0 +FN:107,WireMock.Matchers.Request.RequestMatchResult WireMock.Mapping::GetRequestMatchResult(WireMock.RequestMessage,System.String) +FNDA:279,WireMock.Matchers.Request.RequestMatchResult WireMock.Mapping::GetRequestMatchResult(WireMock.RequestMessage,System.String) +DA:108,279 +DA:109,279 +DA:111,279 +DA:114,279 +DA:115,30 +DA:116,30 DA:117,30 -DA:118,30 -DA:119,30 -DA:127,30 -DA:129,295 -DA:130,295 -BRDA:116,32,0,30 -BRDA:116,32,1,295 -FN:137,System.Boolean WireMock.Mapping::get_IsAdminInterface() -FNDA:166,System.Boolean WireMock.Mapping::get_IsAdminInterface() -DA:138,166 -BRDA:138,11,0,142 -BRDA:138,24,0,142 -BRDA:138,11,1,24 -BRDA:138,24,1,24 -FN:79,System.Void WireMock.Mapping::.ctor(System.Guid,System.String,System.String,WireMock.Matchers.Request.IRequestMatcher,WireMock.ResponseProviders.IResponseProvider,System.Int32,System.String,System.String,System.String) -FNDA:265,System.Void WireMock.Mapping::.ctor(System.Guid,System.String,System.String,WireMock.Matchers.Request.IRequestMatcher,WireMock.ResponseProviders.IResponseProvider,System.Int32,System.String,System.String,System.String) -DA:80,265 -DA:81,265 -DA:82,265 -DA:83,265 -DA:84,265 -DA:85,265 -DA:86,265 -DA:87,265 -DA:88,265 -DA:89,265 -DA:90,265 -DA:91,265 -FN:98,System.Void WireMock.Mapping/d__31::MoveNext() -FNDA:51,System.Void WireMock.Mapping/d__31::MoveNext() -DA:99,51 -DA:100,51 -DA:101,51 -BRDA:100,50,0,1 -BRDA:100,50,1,51 +DA:125,30 +DA:127,279 +DA:128,279 +BRDA:114,32,0,30 +BRDA:114,32,1,279 +FN:135,System.Boolean WireMock.Mapping::get_IsAdminInterface() +FNDA:110,System.Boolean WireMock.Mapping::get_IsAdminInterface() +DA:136,110 +BRDA:136,11,0,86 +BRDA:136,24,0,86 +BRDA:136,11,1,24 +BRDA:136,24,1,24 +FN:77,System.Void WireMock.Mapping::.ctor(System.Guid,System.String,System.String,WireMock.Matchers.Request.IRequestMatcher,WireMock.ResponseProviders.IResponseProvider,System.Int32,System.String,System.String,System.String) +FNDA:250,System.Void WireMock.Mapping::.ctor(System.Guid,System.String,System.String,WireMock.Matchers.Request.IRequestMatcher,WireMock.ResponseProviders.IResponseProvider,System.Int32,System.String,System.String,System.String) +DA:78,250 +DA:79,250 +DA:80,250 +DA:81,250 +DA:82,250 +DA:83,250 +DA:84,250 +DA:85,250 +DA:86,250 +DA:87,250 +DA:88,250 +DA:89,250 +FN:96,System.Void WireMock.Mapping/d__31::MoveNext() +FNDA:35,System.Void WireMock.Mapping/d__31::MoveNext() +DA:97,35 +DA:98,35 +DA:99,35 +BRDA:98,50,0,1 +BRDA:98,50,1,35 LF:36 LH:36 BRF:14 @@ -86,23 +86,23 @@ FNH:14 end_of_record SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\RequestMessage.cs FN:20,System.String WireMock.RequestMessage::get_ClientIP() -FNDA:75,System.String WireMock.RequestMessage::get_ClientIP() -DA:21,75 +FNDA:60,System.String WireMock.RequestMessage::get_ClientIP() +DA:21,60 FN:25,System.String WireMock.RequestMessage::get_Url() -FNDA:77,System.String WireMock.RequestMessage::get_Url() -DA:26,77 +FNDA:61,System.String WireMock.RequestMessage::get_Url() +DA:26,61 FN:30,System.String WireMock.RequestMessage::get_AbsoluteUrl() -FNDA:70,System.String WireMock.RequestMessage::get_AbsoluteUrl() -DA:31,70 +FNDA:55,System.String WireMock.RequestMessage::get_AbsoluteUrl() +DA:31,55 FN:35,System.DateTime WireMock.RequestMessage::get_DateTime() -FNDA:134,System.DateTime WireMock.RequestMessage::get_DateTime() -DA:36,134 +FNDA:101,System.DateTime WireMock.RequestMessage::get_DateTime() +DA:36,101 FN:40,System.String WireMock.RequestMessage::get_Path() -FNDA:672,System.String WireMock.RequestMessage::get_Path() -DA:41,672 +FNDA:616,System.String WireMock.RequestMessage::get_Path() +DA:41,616 FN:45,System.String WireMock.RequestMessage::get_AbsolutePath() -FNDA:278,System.String WireMock.RequestMessage::get_AbsolutePath() -DA:46,278 +FNDA:255,System.String WireMock.RequestMessage::get_AbsolutePath() +DA:46,255 FN:50,System.String[] WireMock.RequestMessage::get_PathSegments() FNDA:3,System.String[] WireMock.RequestMessage::get_PathSegments() DA:51,3 @@ -110,50 +110,50 @@ FN:55,System.String[] WireMock.RequestMessage::get_AbsolutePathSegments() FNDA:1,System.String[] WireMock.RequestMessage::get_AbsolutePathSegments() DA:56,1 FN:60,System.String WireMock.RequestMessage::get_Method() -FNDA:372,System.String WireMock.RequestMessage::get_Method() -DA:61,372 +FNDA:350,System.String WireMock.RequestMessage::get_Method() +DA:61,350 FN:65,System.Collections.Generic.IDictionary`2> WireMock.RequestMessage::get_Headers() -FNDA:202,System.Collections.Generic.IDictionary`2> WireMock.RequestMessage::get_Headers() -DA:66,202 +FNDA:189,System.Collections.Generic.IDictionary`2> WireMock.RequestMessage::get_Headers() +DA:66,189 FN:70,System.Collections.Generic.IDictionary`2 WireMock.RequestMessage::get_Cookies() -FNDA:89,System.Collections.Generic.IDictionary`2 WireMock.RequestMessage::get_Cookies() -DA:71,89 +FNDA:74,System.Collections.Generic.IDictionary`2 WireMock.RequestMessage::get_Cookies() +DA:71,74 FN:75,System.Collections.Generic.IDictionary`2> WireMock.RequestMessage::get_Query() -FNDA:119,System.Collections.Generic.IDictionary`2> WireMock.RequestMessage::get_Query() -DA:76,119 +FNDA:104,System.Collections.Generic.IDictionary`2> WireMock.RequestMessage::get_Query() +DA:76,104 FN:80,System.String WireMock.RequestMessage::get_RawQuery() -FNDA:208,System.String WireMock.RequestMessage::get_RawQuery() -DA:81,208 +FNDA:200,System.String WireMock.RequestMessage::get_RawQuery() +DA:81,200 FN:85,System.String WireMock.RequestMessage::get_Body() -FNDA:138,System.String WireMock.RequestMessage::get_Body() -DA:86,138 +FNDA:107,System.String WireMock.RequestMessage::get_Body() +DA:86,107 FN:90,System.Object WireMock.RequestMessage::get_BodyAsJson() -FNDA:335,System.Object WireMock.RequestMessage::get_BodyAsJson() -DA:91,335 +FNDA:302,System.Object WireMock.RequestMessage::get_BodyAsJson() +DA:91,302 FN:95,System.Byte[] WireMock.RequestMessage::get_BodyAsBytes() -FNDA:295,System.Byte[] WireMock.RequestMessage::get_BodyAsBytes() -DA:96,295 +FNDA:271,System.Byte[] WireMock.RequestMessage::get_BodyAsBytes() +DA:96,271 FN:100,System.String WireMock.RequestMessage::get_Host() -FNDA:209,System.String WireMock.RequestMessage::get_Host() -DA:101,209 +FNDA:201,System.String WireMock.RequestMessage::get_Host() +DA:101,201 FN:105,System.String WireMock.RequestMessage::get_Protocol() -FNDA:209,System.String WireMock.RequestMessage::get_Protocol() -DA:106,209 +FNDA:201,System.String WireMock.RequestMessage::get_Protocol() +DA:106,201 FN:110,System.Int32 WireMock.RequestMessage::get_Port() -FNDA:209,System.Int32 WireMock.RequestMessage::get_Port() -DA:111,209 +FNDA:201,System.Int32 WireMock.RequestMessage::get_Port() +DA:111,201 FN:115,System.String WireMock.RequestMessage::get_Origin() FNDA:1,System.String WireMock.RequestMessage::get_Origin() DA:116,1 FN:120,System.Text.Encoding WireMock.RequestMessage::get_BodyEncoding() -FNDA:129,System.Text.Encoding WireMock.RequestMessage::get_BodyEncoding() -DA:121,129 +FNDA:87,System.Text.Encoding WireMock.RequestMessage::get_BodyEncoding() +DA:121,87 FN:164,System.Collections.Generic.IDictionary`2> WireMock.RequestMessage::ParseQuery(System.String) -FNDA:208,System.Collections.Generic.IDictionary`2> WireMock.RequestMessage::ParseQuery(System.String) -DA:165,208 -DA:166,208 -DA:167,195 -DA:168,195 +FNDA:200,System.Collections.Generic.IDictionary`2> WireMock.RequestMessage::ParseQuery(System.String) +DA:165,200 +DA:166,200 +DA:167,187 +DA:168,187 DA:171,13 DA:172,13 DA:173,13 @@ -177,8 +177,8 @@ DA:191,30 DA:192,13 DA:193,33 DA:194,33 -DA:195,208 -BRDA:166,9,0,195 +DA:195,200 +BRDA:166,9,0,187 BRDA:166,9,1,13 BRDA:171,29,0,13 BRDA:171,29,1,13 @@ -197,47 +197,47 @@ BRDA:204,12,1,14 BRDA:209,31,0,0 BRDA:209,31,1,14 FN:131,System.Void WireMock.RequestMessage::.ctor(WireMock.Models.UrlDetails,System.String,System.String,WireMock.Util.BodyData,System.Collections.Generic.IDictionary`2,System.Collections.Generic.IDictionary`2) -FNDA:208,System.Void WireMock.RequestMessage::.ctor(WireMock.Models.UrlDetails,System.String,System.String,WireMock.Util.BodyData,System.Collections.Generic.IDictionary`2,System.Collections.Generic.IDictionary`2) -DA:132,208 -DA:133,208 -DA:134,208 -DA:135,208 -DA:136,208 -DA:138,208 -DA:139,208 -DA:140,208 -DA:141,208 -DA:142,208 -DA:143,208 -DA:145,208 -DA:146,208 -DA:147,208 -DA:148,208 -DA:150,208 -DA:151,208 -DA:153,208 -DA:154,208 -DA:155,208 -DA:156,208 -DA:158,446 -DA:159,208 -DA:160,208 -DA:161,208 -DA:162,208 +FNDA:200,System.Void WireMock.RequestMessage::.ctor(WireMock.Models.UrlDetails,System.String,System.String,WireMock.Util.BodyData,System.Collections.Generic.IDictionary`2,System.Collections.Generic.IDictionary`2) +DA:132,200 +DA:133,200 +DA:134,200 +DA:135,200 +DA:136,200 +DA:138,200 +DA:139,200 +DA:140,200 +DA:141,200 +DA:142,200 +DA:143,200 +DA:145,200 +DA:146,200 +DA:147,199 +DA:148,200 +DA:150,200 +DA:151,200 +DA:153,200 +DA:154,200 +DA:155,200 +DA:156,200 +DA:158,365 +DA:159,199 +DA:160,200 +DA:161,200 +DA:162,200 BRDA:153,307,0,122 -BRDA:153,307,1,86 +BRDA:153,307,1,78 BRDA:154,327,0,122 -BRDA:154,327,1,86 +BRDA:154,327,1,78 BRDA:155,347,0,122 -BRDA:155,347,1,86 +BRDA:155,347,1,78 BRDA:156,368,0,122 -BRDA:156,368,1,86 -BRDA:158,389,0,123 -BRDA:158,389,1,85 +BRDA:156,368,1,78 +BRDA:158,389,0,132 +BRDA:158,389,1,68 BRDA:158,402,0,1 -BRDA:158,402,1,85 +BRDA:158,402,1,68 BRDA:158,433,0,1 -BRDA:158,433,1,85 +BRDA:158,433,1,68 LF:81 LH:81 BRF:28 @@ -247,53 +247,53 @@ FNH:24 end_of_record SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\ResponseMessage.cs FN:16,System.Collections.Generic.IDictionary`2> WireMock.ResponseMessage::get_Headers() -FNDA:601,System.Collections.Generic.IDictionary`2> WireMock.ResponseMessage::get_Headers() -DA:17,601 +FNDA:564,System.Collections.Generic.IDictionary`2> WireMock.ResponseMessage::get_Headers() +DA:17,564 FN:21,System.Int32 WireMock.ResponseMessage::get_StatusCode() -FNDA:512,System.Int32 WireMock.ResponseMessage::get_StatusCode() -DA:22,512 +FNDA:465,System.Int32 WireMock.ResponseMessage::get_StatusCode() +DA:22,465 FN:26,System.String WireMock.ResponseMessage::get_BodyOriginal() -FNDA:88,System.String WireMock.ResponseMessage::get_BodyOriginal() -DA:27,88 +FNDA:73,System.String WireMock.ResponseMessage::get_BodyOriginal() +DA:27,73 FN:31,System.String WireMock.ResponseMessage::get_BodyDestination() -FNDA:151,System.String WireMock.ResponseMessage::get_BodyDestination() -DA:32,151 +FNDA:123,System.String WireMock.ResponseMessage::get_BodyDestination() +DA:32,123 FN:36,System.String WireMock.ResponseMessage::get_Body() -FNDA:294,System.String WireMock.ResponseMessage::get_Body() -DA:37,294 +FNDA:251,System.String WireMock.ResponseMessage::get_Body() +DA:37,251 FN:41,System.Object WireMock.ResponseMessage::get_BodyAsJson() -FNDA:327,System.Object WireMock.ResponseMessage::get_BodyAsJson() -DA:42,327 +FNDA:290,System.Object WireMock.ResponseMessage::get_BodyAsJson() +DA:42,290 FN:46,System.Nullable`1 WireMock.ResponseMessage::get_BodyAsJsonIndented() -FNDA:38,System.Nullable`1 WireMock.ResponseMessage::get_BodyAsJsonIndented() -DA:47,38 +FNDA:35,System.Nullable`1 WireMock.ResponseMessage::get_BodyAsJsonIndented() +DA:47,35 FN:51,System.Byte[] WireMock.ResponseMessage::get_BodyAsBytes() -FNDA:207,System.Byte[] WireMock.ResponseMessage::get_BodyAsBytes() -DA:52,207 +FNDA:168,System.Byte[] WireMock.ResponseMessage::get_BodyAsBytes() +DA:52,168 FN:56,System.String WireMock.ResponseMessage::get_BodyAsFile() -FNDA:137,System.String WireMock.ResponseMessage::get_BodyAsFile() -DA:57,137 +FNDA:110,System.String WireMock.ResponseMessage::get_BodyAsFile() +DA:57,110 FN:61,System.Nullable`1 WireMock.ResponseMessage::get_BodyAsFileIsCached() -FNDA:74,System.Nullable`1 WireMock.ResponseMessage::get_BodyAsFileIsCached() -DA:62,74 +FNDA:59,System.Nullable`1 WireMock.ResponseMessage::get_BodyAsFileIsCached() +DA:62,59 FN:66,System.Text.Encoding WireMock.ResponseMessage::get_BodyEncoding() -FNDA:566,System.Text.Encoding WireMock.ResponseMessage::get_BodyEncoding() -DA:67,566 +FNDA:483,System.Text.Encoding WireMock.ResponseMessage::get_BodyEncoding() +DA:67,483 FN:74,System.Void WireMock.ResponseMessage::AddHeader(System.String,System.String) FNDA:0,System.Void WireMock.ResponseMessage::AddHeader(System.String,System.String) DA:75,0 DA:76,0 DA:77,0 FN:84,System.Void WireMock.ResponseMessage::AddHeader(System.String,System.String[]) -FNDA:103,System.Void WireMock.ResponseMessage::AddHeader(System.String,System.String[]) -DA:85,103 -DA:86,103 -DA:88,103 -DA:89,103 -DA:90,103 -DA:92,103 -DA:93,103 -BRDA:88,27,0,103 +FNDA:102,System.Void WireMock.ResponseMessage::AddHeader(System.String,System.String[]) +DA:85,102 +DA:86,102 +DA:88,102 +DA:89,102 +DA:90,102 +DA:92,102 +DA:93,102 +BRDA:88,27,0,102 BRDA:88,27,1,0 LF:21 LH:18 @@ -304,18 +304,18 @@ FNH:12 end_of_record SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\ResponseMessageBuilder.cs FN:14,WireMock.ResponseMessage WireMock.ResponseMessageBuilder::Create(System.String,System.Int32,System.Nullable`1) -FNDA:17,WireMock.ResponseMessage WireMock.ResponseMessageBuilder::Create(System.String,System.Int32,System.Nullable`1) -DA:15,17 -DA:16,17 -DA:17,17 -DA:18,17 -DA:19,17 -DA:20,17 -DA:21,17 -DA:23,17 -DA:24,17 -BRDA:16,28,0,0 -BRDA:16,28,1,17 +FNDA:18,WireMock.ResponseMessage WireMock.ResponseMessageBuilder::Create(System.String,System.Int32,System.Nullable`1) +DA:15,18 +DA:16,18 +DA:17,18 +DA:18,18 +DA:19,18 +DA:20,18 +DA:21,18 +DA:23,18 +DA:24,18 +BRDA:16,28,0,2 +BRDA:16,28,1,16 FN:10,System.Void WireMock.ResponseMessageBuilder::.cctor() FNDA:1,System.Void WireMock.ResponseMessageBuilder::.cctor() DA:11,1 @@ -323,7 +323,7 @@ DA:12,1 LF:11 LH:11 BRF:2 -BRH:1 +BRH:2 FNF:2 FNH:2 end_of_record @@ -362,16 +362,16 @@ DA:32,23 BRDA:24,37,0,1 BRDA:24,37,1,23 FN:35,T WireMock.Validation.Check::NotNull(T,System.String) -FNDA:3884,T WireMock.Validation.Check::NotNull(T,System.String) -DA:36,3884 -DA:37,3884 +FNDA:4004,T WireMock.Validation.Check::NotNull(T,System.String) +DA:36,4004 +DA:37,4004 DA:38,2 DA:39,2 DA:41,2 -DA:44,3882 -DA:45,3882 +DA:44,4002 +DA:45,4002 BRDA:37,12,0,2 -BRDA:37,12,1,3882 +BRDA:37,12,1,4002 FN:48,T WireMock.Validation.Check::NotNull(T,System.String,System.String) FNDA:0,T WireMock.Validation.Check::NotNull(T,System.String,System.String) DA:49,0 @@ -385,17 +385,17 @@ DA:59,0 BRDA:50,12,0,0 BRDA:50,12,1,0 FN:62,System.Collections.Generic.IList`1 WireMock.Validation.Check::NotNullOrEmpty(System.Collections.Generic.IList`1,System.String) -FNDA:480,System.Collections.Generic.IList`1 WireMock.Validation.Check::NotNullOrEmpty(System.Collections.Generic.IList`1,System.String) -DA:63,480 -DA:64,480 -DA:66,480 +FNDA:456,System.Collections.Generic.IList`1 WireMock.Validation.Check::NotNullOrEmpty(System.Collections.Generic.IList`1,System.String) +DA:63,456 +DA:64,456 +DA:66,456 DA:67,0 DA:68,0 DA:70,0 -DA:73,480 -DA:74,480 +DA:73,456 +DA:74,456 BRDA:66,20,0,0 -BRDA:66,20,1,480 +BRDA:66,20,1,456 FN:77,System.String WireMock.Validation.Check::NotNullOrEmpty(System.String,System.String) FNDA:36,System.String WireMock.Validation.Check::NotNullOrEmpty(System.String,System.String) DA:78,36 @@ -438,7 +438,7 @@ FN:113,System.Collections.Generic.IList`1 WireMock.Validation.Check::HasNoNul FNDA:39,System.Collections.Generic.IList`1 WireMock.Validation.Check::HasNoNulls(System.Collections.Generic.IList`1,System.String) DA:114,39 DA:115,39 -DA:117,80 +DA:117,78 DA:118,0 DA:119,0 DA:121,0 @@ -496,17 +496,17 @@ FNH:0 end_of_record SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Util\BodyData.cs FN:12,System.Text.Encoding WireMock.Util.BodyData::get_Encoding() -FNDA:110,System.Text.Encoding WireMock.Util.BodyData::get_Encoding() -DA:13,110 +FNDA:93,System.Text.Encoding WireMock.Util.BodyData::get_Encoding() +DA:13,93 FN:17,System.String WireMock.Util.BodyData::get_BodyAsString() -FNDA:151,System.String WireMock.Util.BodyData::get_BodyAsString() -DA:18,151 +FNDA:135,System.String WireMock.Util.BodyData::get_BodyAsString() +DA:18,135 FN:22,System.Object WireMock.Util.BodyData::get_BodyAsJson() -FNDA:122,System.Object WireMock.Util.BodyData::get_BodyAsJson() -DA:23,122 +FNDA:110,System.Object WireMock.Util.BodyData::get_BodyAsJson() +DA:23,110 FN:27,System.Byte[] WireMock.Util.BodyData::get_BodyAsBytes() -FNDA:94,System.Byte[] WireMock.Util.BodyData::get_BodyAsBytes() -DA:28,94 +FNDA:86,System.Byte[] WireMock.Util.BodyData::get_BodyAsBytes() +DA:28,86 LF:4 LH:4 BRF:0 @@ -530,17 +530,17 @@ DA:23,1 DA:24,1 DA:25,1 FN:27,System.Void WireMock.Util.BodyParser/d__2::MoveNext() -FNDA:19,System.Void WireMock.Util.BodyParser/d__2::MoveNext() -DA:28,19 -DA:29,19 -DA:30,19 -DA:31,19 -DA:33,19 -DA:35,19 -BRDA:29,34,0,19 +FNDA:10,System.Void WireMock.Util.BodyParser/d__2::MoveNext() +DA:28,10 +DA:29,10 +DA:30,10 +DA:31,10 +DA:33,10 +DA:35,10 +BRDA:29,34,0,10 BRDA:31,65,0,0 BRDA:29,34,1,0 -BRDA:31,65,1,19 +BRDA:31,65,1,10 FN:37,System.Void WireMock.Util.BodyParser/d__3::MoveNext() FNDA:0,System.Void WireMock.Util.BodyParser/d__3::MoveNext() DA:38,0 @@ -554,60 +554,60 @@ BRDA:41,65,0,0 BRDA:39,28,1,0 BRDA:41,65,1,0 FN:49,System.Boolean WireMock.Util.BodyParser/<>c__DisplayClass4_0::b__0(System.String) -FNDA:101,System.Boolean WireMock.Util.BodyParser/<>c__DisplayClass4_0::b__0(System.String) -DA:50,101 +FNDA:63,System.Boolean WireMock.Util.BodyParser/<>c__DisplayClass4_0::b__0(System.String) +DA:50,63 FN:63,System.Boolean WireMock.Util.BodyParser/<>c__DisplayClass4_0::b__1(System.String) -FNDA:26,System.Boolean WireMock.Util.BodyParser/<>c__DisplayClass4_0::b__1(System.String) -DA:64,26 +FNDA:18,System.Boolean WireMock.Util.BodyParser/<>c__DisplayClass4_0::b__1(System.String) +DA:64,18 FN:46,System.Void WireMock.Util.BodyParser/d__4::MoveNext() -FNDA:19,System.Void WireMock.Util.BodyParser/d__4::MoveNext() -DA:47,19 -DA:48,19 -DA:51,7 -DA:53,7 -DA:54,7 -DA:55,7 -DA:56,7 -DA:57,7 +FNDA:10,System.Void WireMock.Util.BodyParser/d__4::MoveNext() +DA:47,10 +DA:48,10 +DA:51,2 +DA:53,2 +DA:54,2 +DA:55,2 +DA:56,2 +DA:57,2 DA:58,0 DA:59,0 DA:61,0 DA:62,0 -DA:63,7 -DA:65,12 -DA:66,12 -DA:67,12 -DA:68,12 -DA:71,12 -DA:72,12 -DA:73,12 +DA:63,2 +DA:65,8 +DA:66,8 +DA:67,8 +DA:68,8 +DA:71,8 +DA:72,8 +DA:73,8 DA:74,0 DA:75,0 DA:77,0 DA:78,0 -DA:79,12 +DA:79,8 DA:81,0 DA:82,0 DA:83,0 -DA:85,19 -DA:86,19 -BRDA:50,99,0,19 +DA:85,10 +DA:86,10 +BRDA:50,99,0,10 BRDA:50,99,1,0 -BRDA:50,133,0,7 -BRDA:51,148,0,7 +BRDA:50,133,0,2 +BRDA:51,148,0,2 BRDA:54,179,0,0 BRDA:51,148,1,0 -BRDA:54,179,1,7 +BRDA:54,179,1,2 BRDA:58,367,1,0 BRDA:61,412,0,0 BRDA:61,412,1,0 -BRDA:58,367,0,7 -BRDA:50,133,1,12 -BRDA:64,556,0,12 +BRDA:58,367,0,2 +BRDA:50,133,1,8 +BRDA:64,556,0,8 BRDA:64,556,1,0 -BRDA:64,592,0,12 +BRDA:64,592,0,8 BRDA:66,623,0,0 -BRDA:66,623,1,12 +BRDA:66,623,1,8 BRDA:64,592,1,0 BRDA:82,897,0,0 BRDA:82,897,1,0 @@ -620,29 +620,29 @@ FNH:5 end_of_record SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Util\ConcurentObservableCollection.cs FN:33,System.Void WireMock.Util.ConcurentObservableCollection`1::ClearItems() -FNDA:9,System.Void WireMock.Util.ConcurentObservableCollection`1::ClearItems() -DA:34,9 -DA:35,9 -DA:36,9 -DA:37,9 -DA:38,9 -DA:39,9 +FNDA:1,System.Void WireMock.Util.ConcurentObservableCollection`1::ClearItems() +DA:34,1 +DA:35,1 +DA:36,1 +DA:37,1 +DA:38,1 +DA:39,1 FN:42,System.Void WireMock.Util.ConcurentObservableCollection`1::RemoveItem(System.Int32) -FNDA:1,System.Void WireMock.Util.ConcurentObservableCollection`1::RemoveItem(System.Int32) -DA:43,1 -DA:44,1 -DA:45,1 -DA:46,1 -DA:47,1 -DA:48,1 +FNDA:2,System.Void WireMock.Util.ConcurentObservableCollection`1::RemoveItem(System.Int32) +DA:43,2 +DA:44,2 +DA:45,2 +DA:46,2 +DA:47,2 +DA:48,2 FN:51,System.Void WireMock.Util.ConcurentObservableCollection`1::InsertItem(System.Int32,T) -FNDA:57,System.Void WireMock.Util.ConcurentObservableCollection`1::InsertItem(System.Int32,T) -DA:52,57 -DA:53,57 -DA:54,57 -DA:55,57 -DA:56,57 -DA:57,57 +FNDA:40,System.Void WireMock.Util.ConcurentObservableCollection`1::InsertItem(System.Int32,T) +DA:52,40 +DA:53,40 +DA:54,40 +DA:55,40 +DA:56,40 +DA:57,40 FN:60,System.Void WireMock.Util.ConcurentObservableCollection`1::SetItem(System.Int32,T) FNDA:0,System.Void WireMock.Util.ConcurentObservableCollection`1::SetItem(System.Int32,T) DA:61,0 @@ -660,9 +660,9 @@ DA:73,0 DA:74,0 DA:75,0 FN:12,System.Void WireMock.Util.ConcurentObservableCollection`1::.ctor() -FNDA:55,System.Void WireMock.Util.ConcurentObservableCollection`1::.ctor() -DA:13,55 -DA:18,165 +FNDA:54,System.Void WireMock.Util.ConcurentObservableCollection`1::.ctor() +DA:13,54 +DA:18,162 FN:23,System.Void WireMock.Util.ConcurentObservableCollection`1::.ctor(System.Collections.Generic.List`1) FNDA:0,System.Void WireMock.Util.ConcurentObservableCollection`1::.ctor(System.Collections.Generic.List`1) DA:24,0 @@ -1007,8 +1007,8 @@ BRDA:96,17,0,1 BRDA:96,17,6,1 BRDA:96,17,8,1 BRDA:96,17,9,1 -BRDA:139,233,0,25 -BRDA:139,233,1,29 +BRDA:139,282,0,25 +BRDA:139,282,1,29 LF:84 LH:84 BRF:33 @@ -1018,34 +1018,34 @@ FNH:6 end_of_record SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Util\PortUtils.cs FN:18,System.Int32 WireMock.Util.PortUtils::FindFreeTcpPort() -FNDA:54,System.Int32 WireMock.Util.PortUtils::FindFreeTcpPort() -DA:19,54 -DA:20,54 -DA:22,54 -DA:23,54 -DA:24,54 -DA:26,54 -DA:29,54 -DA:30,54 -DA:31,54 -DA:32,54 -BRDA:30,44,1,54 -BRDA:30,44,0,54 +FNDA:46,System.Int32 WireMock.Util.PortUtils::FindFreeTcpPort() +DA:19,46 +DA:20,46 +DA:22,46 +DA:23,46 +DA:24,46 +DA:26,46 +DA:29,46 +DA:30,46 +DA:31,46 +DA:32,46 +BRDA:30,44,1,46 +BRDA:30,44,0,46 FN:37,System.Boolean WireMock.Util.PortUtils::TryExtract(System.String,System.String&,System.String&,System.Int32&) -FNDA:114,System.Boolean WireMock.Util.PortUtils::TryExtract(System.String,System.String&,System.String&,System.Int32&) -DA:38,114 -DA:39,114 -DA:40,114 -DA:41,114 -DA:43,114 -DA:44,114 -DA:45,112 -DA:46,112 -DA:47,112 -DA:49,112 +FNDA:98,System.Boolean WireMock.Util.PortUtils::TryExtract(System.String,System.String&,System.String&,System.Int32&) +DA:38,98 +DA:39,98 +DA:40,98 +DA:41,98 +DA:43,98 +DA:44,98 +DA:45,96 +DA:46,96 +DA:47,96 +DA:49,96 DA:52,2 -DA:53,114 -BRDA:44,30,0,112 +DA:53,98 +BRDA:44,30,0,96 BRDA:44,30,1,2 FN:11,System.Void WireMock.Util.PortUtils::.cctor() FNDA:1,System.Void WireMock.Util.PortUtils::.cctor() @@ -1085,16 +1085,16 @@ FNH:1 end_of_record SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Util\UrlUtils.cs FN:14,WireMock.Models.UrlDetails WireMock.Util.UrlUtils::Parse(System.Uri,Microsoft.AspNetCore.Http.PathString) -FNDA:70,WireMock.Models.UrlDetails WireMock.Util.UrlUtils::Parse(System.Uri,Microsoft.AspNetCore.Http.PathString) -DA:15,70 -DA:16,70 -DA:17,66 -DA:18,66 +FNDA:51,WireMock.Models.UrlDetails WireMock.Util.UrlUtils::Parse(System.Uri,Microsoft.AspNetCore.Http.PathString) +DA:15,51 +DA:16,51 +DA:17,47 +DA:18,47 DA:21,4 DA:22,4 DA:24,4 -DA:25,70 -BRDA:16,13,0,66 +DA:25,51 +BRDA:16,13,0,47 BRDA:16,13,1,4 FN:27,System.String WireMock.Util.UrlUtils::RemoveFirst(System.String,System.String) FNDA:4,System.String WireMock.Util.UrlUtils::RemoveFirst(System.String,System.String) @@ -1128,10 +1128,10 @@ DA:16,30 DA:17,30 DA:18,30 FN:23,System.Void WireMock.Util.WireMockList`1::.ctor(T[]) -FNDA:242,System.Void WireMock.Util.WireMockList`1::.ctor(T[]) -DA:24,242 -DA:25,242 -DA:26,242 +FNDA:206,System.Void WireMock.Util.WireMockList`1::.ctor(T[]) +DA:24,206 +DA:25,205 +DA:26,205 FN:31,System.Void WireMock.Util.WireMockList`1::.ctor(System.Collections.Generic.IEnumerable`1) FNDA:0,System.Void WireMock.Util.WireMockList`1::.ctor(System.Collections.Generic.IEnumerable`1) DA:32,0 @@ -1505,56 +1505,56 @@ FNH:5 end_of_record SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Settings\FluentMockServerSettings.cs FN:15,System.Nullable`1 WireMock.Settings.FluentMockServerSettings::get_Port() -FNDA:148,System.Nullable`1 WireMock.Settings.FluentMockServerSettings::get_Port() -DA:16,148 +FNDA:123,System.Nullable`1 WireMock.Settings.FluentMockServerSettings::get_Port() +DA:16,123 FN:20,System.Nullable`1 WireMock.Settings.FluentMockServerSettings::get_UseSSL() -FNDA:149,System.Nullable`1 WireMock.Settings.FluentMockServerSettings::get_UseSSL() -DA:21,149 +FNDA:123,System.Nullable`1 WireMock.Settings.FluentMockServerSettings::get_UseSSL() +DA:21,123 FN:24,System.Nullable`1 WireMock.Settings.FluentMockServerSettings::get_StartAdminInterface() -FNDA:124,System.Nullable`1 WireMock.Settings.FluentMockServerSettings::get_StartAdminInterface() -DA:25,124 +FNDA:108,System.Nullable`1 WireMock.Settings.FluentMockServerSettings::get_StartAdminInterface() +DA:25,108 FN:28,System.Nullable`1 WireMock.Settings.FluentMockServerSettings::get_ReadStaticMappings() -FNDA:110,System.Nullable`1 WireMock.Settings.FluentMockServerSettings::get_ReadStaticMappings() -DA:29,110 +FNDA:94,System.Nullable`1 WireMock.Settings.FluentMockServerSettings::get_ReadStaticMappings() +DA:29,94 FN:32,System.Nullable`1 WireMock.Settings.FluentMockServerSettings::get_WatchStaticMappings() -FNDA:110,System.Nullable`1 WireMock.Settings.FluentMockServerSettings::get_WatchStaticMappings() -DA:33,110 +FNDA:94,System.Nullable`1 WireMock.Settings.FluentMockServerSettings::get_WatchStaticMappings() +DA:33,94 FN:36,WireMock.Settings.IProxyAndRecordSettings WireMock.Settings.FluentMockServerSettings::get_ProxyAndRecordSettings() -FNDA:116,WireMock.Settings.IProxyAndRecordSettings WireMock.Settings.FluentMockServerSettings::get_ProxyAndRecordSettings() -DA:37,116 +FNDA:100,WireMock.Settings.IProxyAndRecordSettings WireMock.Settings.FluentMockServerSettings::get_ProxyAndRecordSettings() +DA:37,100 FN:40,System.String[] WireMock.Settings.FluentMockServerSettings::get_Urls() -FNDA:112,System.String[] WireMock.Settings.FluentMockServerSettings::get_Urls() -DA:41,112 +FNDA:96,System.String[] WireMock.Settings.FluentMockServerSettings::get_Urls() +DA:41,96 FN:44,System.Int32 WireMock.Settings.FluentMockServerSettings::get_StartTimeout() -FNDA:165,System.Int32 WireMock.Settings.FluentMockServerSettings::get_StartTimeout() -DA:45,165 +FNDA:141,System.Int32 WireMock.Settings.FluentMockServerSettings::get_StartTimeout() +DA:45,141 FN:48,System.Nullable`1 WireMock.Settings.FluentMockServerSettings::get_AllowPartialMapping() -FNDA:110,System.Nullable`1 WireMock.Settings.FluentMockServerSettings::get_AllowPartialMapping() -DA:49,110 +FNDA:95,System.Nullable`1 WireMock.Settings.FluentMockServerSettings::get_AllowPartialMapping() +DA:49,95 FN:52,System.String WireMock.Settings.FluentMockServerSettings::get_AdminUsername() -FNDA:69,System.String WireMock.Settings.FluentMockServerSettings::get_AdminUsername() -DA:53,69 +FNDA:61,System.String WireMock.Settings.FluentMockServerSettings::get_AdminUsername() +DA:53,61 FN:56,System.String WireMock.Settings.FluentMockServerSettings::get_AdminPassword() -FNDA:59,System.String WireMock.Settings.FluentMockServerSettings::get_AdminPassword() -DA:57,59 +FNDA:51,System.String WireMock.Settings.FluentMockServerSettings::get_AdminPassword() +DA:57,51 FN:60,System.Nullable`1 WireMock.Settings.FluentMockServerSettings::get_RequestLogExpirationDuration() -FNDA:55,System.Nullable`1 WireMock.Settings.FluentMockServerSettings::get_RequestLogExpirationDuration() -DA:61,55 +FNDA:96,System.Nullable`1 WireMock.Settings.FluentMockServerSettings::get_RequestLogExpirationDuration() +DA:61,96 FN:64,System.Nullable`1 WireMock.Settings.FluentMockServerSettings::get_MaxRequestLogCount() -FNDA:110,System.Nullable`1 WireMock.Settings.FluentMockServerSettings::get_MaxRequestLogCount() -DA:65,110 +FNDA:94,System.Nullable`1 WireMock.Settings.FluentMockServerSettings::get_MaxRequestLogCount() +DA:65,94 FN:69,System.Action`1 WireMock.Settings.FluentMockServerSettings::get_PreWireMockMiddlewareInit() -FNDA:55,System.Action`1 WireMock.Settings.FluentMockServerSettings::get_PreWireMockMiddlewareInit() -DA:70,55 +FNDA:47,System.Action`1 WireMock.Settings.FluentMockServerSettings::get_PreWireMockMiddlewareInit() +DA:70,47 FN:74,System.Action`1 WireMock.Settings.FluentMockServerSettings::get_PostWireMockMiddlewareInit() -FNDA:55,System.Action`1 WireMock.Settings.FluentMockServerSettings::get_PostWireMockMiddlewareInit() -DA:75,55 +FNDA:47,System.Action`1 WireMock.Settings.FluentMockServerSettings::get_PostWireMockMiddlewareInit() +DA:75,47 FN:79,WireMock.Logging.IWireMockLogger WireMock.Settings.FluentMockServerSettings::get_Logger() -FNDA:225,WireMock.Logging.IWireMockLogger WireMock.Settings.FluentMockServerSettings::get_Logger() -DA:80,225 +FNDA:195,WireMock.Logging.IWireMockLogger WireMock.Settings.FluentMockServerSettings::get_Logger() +DA:80,195 FN:84,WireMock.Handlers.IFileSystemHandler WireMock.Settings.FluentMockServerSettings::get_FileSystemHandler() -FNDA:114,WireMock.Handlers.IFileSystemHandler WireMock.Settings.FluentMockServerSettings::get_FileSystemHandler() -DA:85,114 +FNDA:98,WireMock.Handlers.IFileSystemHandler WireMock.Settings.FluentMockServerSettings::get_FileSystemHandler() +DA:85,98 LF:17 LH:17 BRF:0 @@ -1721,12 +1721,10 @@ DA:231,1 DA:232,1 DA:234,2 DA:235,2 -BRDA:229,76,0,1 -BRDA:229,76,1,1 -BRDA:229,90,0,1 -BRDA:229,90,1,2 -FN:259,WireMock.Mapping WireMock.Server.FluentMockServer::ToMapping(WireMock.RequestMessage,WireMock.ResponseMessage,System.String[]) -FNDA:0,WireMock.Mapping WireMock.Server.FluentMockServer::ToMapping(WireMock.RequestMessage,WireMock.ResponseMessage,System.String[]) +BRDA:229,88,0,1 +BRDA:229,88,1,2 +FN:259,WireMock.IMapping WireMock.Server.FluentMockServer::ToMapping(WireMock.RequestMessage,WireMock.ResponseMessage,System.String[]) +FNDA:0,WireMock.IMapping WireMock.Server.FluentMockServer::ToMapping(WireMock.RequestMessage,WireMock.ResponseMessage,System.String[]) DA:260,0 DA:261,0 DA:262,0 @@ -1831,8 +1829,8 @@ DA:368,0 DA:369,0 DA:371,0 DA:372,0 -FN:374,System.Void WireMock.Server.FluentMockServer::SaveMappingToFile(WireMock.Mapping,System.String) -FNDA:1,System.Void WireMock.Server.FluentMockServer::SaveMappingToFile(WireMock.Mapping,System.String) +FN:374,System.Void WireMock.Server.FluentMockServer::SaveMappingToFile(WireMock.IMapping,System.String) +FNDA:1,System.Void WireMock.Server.FluentMockServer::SaveMappingToFile(WireMock.IMapping,System.String) DA:375,1 DA:376,1 DA:377,1 @@ -2249,40 +2247,36 @@ DA:757,0 DA:758,0 DA:760,11 DA:761,11 -BRDA:694,25,0,11 -BRDA:694,25,1,0 -BRDA:694,39,0,0 -BRDA:694,39,1,11 -BRDA:699,82,0,0 -BRDA:701,100,0,0 -BRDA:701,100,1,0 -BRDA:699,82,1,11 -BRDA:709,166,0,10 -BRDA:709,166,1,11 -BRDA:714,204,0,9 -BRDA:716,310,1,81 -BRDA:718,248,0,0 -BRDA:718,248,1,81 -BRDA:716,310,0,9 -BRDA:714,204,1,2 -BRDA:723,346,0,0 -BRDA:725,517,1,0 -BRDA:725,517,0,0 -BRDA:723,346,1,11 -BRDA:734,533,0,0 -BRDA:734,533,1,11 -BRDA:738,586,0,7 -BRDA:738,586,1,4 -BRDA:742,639,0,1 -BRDA:744,681,0,1 -BRDA:744,681,1,0 -BRDA:742,639,1,3 -BRDA:746,720,0,0 -BRDA:746,720,1,3 -BRDA:750,764,0,3 -BRDA:750,764,1,11 -BRDA:755,792,0,0 -BRDA:755,792,1,11 +BRDA:694,37,0,0 +BRDA:694,37,1,11 +BRDA:699,80,0,0 +BRDA:701,98,0,0 +BRDA:701,98,1,0 +BRDA:699,80,1,11 +BRDA:709,164,0,10 +BRDA:709,164,1,11 +BRDA:714,202,0,9 +BRDA:716,308,1,81 +BRDA:718,246,0,0 +BRDA:718,246,1,81 +BRDA:716,308,0,9 +BRDA:714,202,1,2 +BRDA:723,344,0,0 +BRDA:725,515,1,0 +BRDA:725,515,0,0 +BRDA:723,344,1,11 +BRDA:734,531,0,0 +BRDA:734,531,1,11 +BRDA:738,584,0,7 +BRDA:738,584,1,4 +BRDA:742,637,0,1 +BRDA:742,637,1,3 +BRDA:746,716,0,0 +BRDA:746,716,1,3 +BRDA:750,760,0,3 +BRDA:750,760,1,11 +BRDA:755,788,0,0 +BRDA:755,788,1,11 FN:763,WireMock.ResponseMessage WireMock.Server.FluentMockServer::ToJson(T,System.Boolean) FNDA:5,WireMock.ResponseMessage WireMock.Server.FluentMockServer::ToJson(T,System.Boolean) DA:764,5 @@ -2312,19 +2306,19 @@ DA:783,4 BRDA:780,7,0,0 BRDA:780,7,1,4 FN:41,System.Void WireMock.Server.FluentMockServer::.ctor(WireMock.Settings.IFluentMockServerSettings) -FNDA:55,System.Void WireMock.Server.FluentMockServer::.ctor(WireMock.Settings.IFluentMockServerSettings) -DA:42,55 -DA:43,55 -DA:45,55 -DA:46,55 -DA:47,55 -DA:48,55 -DA:49,55 -DA:51,55 -DA:52,55 -DA:53,55 -DA:54,55 -DA:55,55 +FNDA:47,System.Void WireMock.Server.FluentMockServer::.ctor(WireMock.Settings.IFluentMockServerSettings) +DA:42,47 +DA:43,47 +DA:45,47 +DA:46,47 +DA:47,47 +DA:48,47 +DA:49,47 +DA:51,47 +DA:52,47 +DA:53,47 +DA:54,47 +DA:55,47 FN:237,System.Void WireMock.Server.FluentMockServer/d__19::MoveNext() FNDA:0,System.Void WireMock.Server.FluentMockServer/d__19::MoveNext() DA:238,0 @@ -2353,8 +2347,8 @@ BRDA:250,362,1,0 BRDA:245,252,1,0 LF:513 LH:263 -BRF:194 -BRH:103 +BRF:188 +BRH:99 FNF:33 FNH:19 end_of_record @@ -2365,13 +2359,13 @@ DA:38,0 BRDA:38,6,0,0 BRDA:38,6,1,0 FN:43,System.Collections.Generic.List`1 WireMock.Server.FluentMockServer::get_Ports() -FNDA:40,System.Collections.Generic.List`1 WireMock.Server.FluentMockServer::get_Ports() -DA:44,40 +FNDA:20,System.Collections.Generic.List`1 WireMock.Server.FluentMockServer::get_Ports() +DA:44,20 FN:49,System.String[] WireMock.Server.FluentMockServer::get_Urls() -FNDA:72,System.String[] WireMock.Server.FluentMockServer::get_Urls() -DA:50,72 -FN:55,System.Collections.Generic.IEnumerable`1 WireMock.Server.FluentMockServer::get_Mappings() -FNDA:18,System.Collections.Generic.IEnumerable`1 WireMock.Server.FluentMockServer::get_Mappings() +FNDA:64,System.String[] WireMock.Server.FluentMockServer::get_Urls() +DA:50,64 +FN:55,System.Collections.Generic.IEnumerable`1 WireMock.Server.FluentMockServer::get_Mappings() +FNDA:18,System.Collections.Generic.IEnumerable`1 WireMock.Server.FluentMockServer::get_Mappings() DA:56,18 FN:61,System.Collections.Concurrent.ConcurrentDictionary`2 WireMock.Server.FluentMockServer::get_Scenarios() FNDA:13,System.Collections.Concurrent.ConcurrentDictionary`2 WireMock.Server.FluentMockServer::get_Scenarios() @@ -2393,20 +2387,20 @@ DA:84,0 BRDA:80,12,0,0 BRDA:80,12,1,0 FN:94,WireMock.Server.FluentMockServer WireMock.Server.FluentMockServer::Start(WireMock.Settings.IFluentMockServerSettings) -FNDA:14,WireMock.Server.FluentMockServer WireMock.Server.FluentMockServer::Start(WireMock.Settings.IFluentMockServerSettings) -DA:95,14 -DA:96,14 -DA:98,14 -DA:99,14 +FNDA:16,WireMock.Server.FluentMockServer WireMock.Server.FluentMockServer::Start(WireMock.Settings.IFluentMockServerSettings) +DA:95,16 +DA:96,16 +DA:98,16 +DA:99,16 FN:108,WireMock.Server.FluentMockServer WireMock.Server.FluentMockServer::Start(System.Nullable`1,System.Boolean) -FNDA:36,WireMock.Server.FluentMockServer WireMock.Server.FluentMockServer::Start(System.Nullable`1,System.Boolean) -DA:109,36 -DA:110,36 -DA:111,36 -DA:112,36 -DA:113,36 -DA:114,36 -DA:115,36 +FNDA:26,WireMock.Server.FluentMockServer WireMock.Server.FluentMockServer::Start(System.Nullable`1,System.Boolean) +DA:109,26 +DA:110,26 +DA:111,26 +DA:112,26 +DA:113,26 +DA:114,26 +DA:115,26 FN:123,WireMock.Server.FluentMockServer WireMock.Server.FluentMockServer::Start(System.String[]) FNDA:1,WireMock.Server.FluentMockServer WireMock.Server.FluentMockServer::Start(System.String[]) DA:124,1 @@ -2447,159 +2441,159 @@ DA:180,0 DA:181,0 DA:182,0 DA:183,0 -FN:278,System.Void WireMock.Server.FluentMockServer::Stop() +FN:283,System.Void WireMock.Server.FluentMockServer::Stop() FNDA:2,System.Void WireMock.Server.FluentMockServer::Stop() -DA:279,2 -DA:280,2 -DA:281,2 -DA:282,2 -BRDA:280,8,0,0 -BRDA:280,8,1,2 -BRDA:281,21,1,2 -BRDA:281,21,0,2 -FN:289,System.Void WireMock.Server.FluentMockServer::AddCatchAllMapping() +DA:284,2 +DA:285,2 +DA:286,2 +DA:287,2 +BRDA:285,8,0,0 +BRDA:285,8,1,2 +BRDA:286,21,1,2 +BRDA:286,21,0,2 +FN:294,System.Void WireMock.Server.FluentMockServer::AddCatchAllMapping() FNDA:0,System.Void WireMock.Server.FluentMockServer::AddCatchAllMapping() -DA:290,0 -DA:291,0 -DA:292,0 -DA:293,0 -DA:294,0 DA:295,0 -BRDA:291,67,0,0 -BRDA:291,67,1,0 -FN:301,System.Void WireMock.Server.FluentMockServer::Reset() +DA:296,0 +DA:297,0 +DA:298,0 +DA:299,0 +DA:300,0 +BRDA:296,67,0,0 +BRDA:296,67,1,0 +FN:306,System.Void WireMock.Server.FluentMockServer::Reset() FNDA:0,System.Void WireMock.Server.FluentMockServer::Reset() -DA:302,0 -DA:303,0 -DA:305,0 -DA:306,0 -FN:312,System.Void WireMock.Server.FluentMockServer::ResetMappings() -FNDA:10,System.Void WireMock.Server.FluentMockServer::ResetMappings() -DA:313,10 -DA:314,66 -DA:315,12 -DA:316,12 -DA:317,12 -DA:318,10 -BRDA:314,24,0,1 -BRDA:314,24,1,10 -BRDA:314,103,1,12 -BRDA:314,103,0,10 -FN:325,System.Boolean WireMock.Server.FluentMockServer::DeleteMapping(System.Guid) +DA:307,0 +DA:308,0 +DA:310,0 +DA:311,0 +FN:317,System.Void WireMock.Server.FluentMockServer::ResetMappings() +FNDA:2,System.Void WireMock.Server.FluentMockServer::ResetMappings() +DA:318,2 +DA:319,18 +DA:320,4 +DA:321,4 +DA:322,4 +DA:323,2 +BRDA:319,24,0,1 +BRDA:319,24,1,2 +BRDA:319,103,1,4 +BRDA:319,103,0,2 +FN:330,System.Boolean WireMock.Server.FluentMockServer::DeleteMapping(System.Guid) FNDA:0,System.Boolean WireMock.Server.FluentMockServer::DeleteMapping(System.Guid) -DA:326,0 -DA:328,0 -DA:329,0 -DA:330,0 +DA:331,0 DA:333,0 DA:334,0 -BRDA:328,20,0,0 -BRDA:328,20,1,0 -FN:336,System.Boolean WireMock.Server.FluentMockServer::DeleteMapping(System.String) -FNDA:0,System.Boolean WireMock.Server.FluentMockServer::DeleteMapping(System.String) -DA:337,0 +DA:335,0 +DA:338,0 DA:339,0 -DA:340,0 -DA:341,0 -FN:348,System.Void WireMock.Server.FluentMockServer::AddGlobalProcessingDelay(System.TimeSpan) +BRDA:333,20,0,0 +BRDA:333,20,1,0 +FN:341,System.Boolean WireMock.Server.FluentMockServer::DeleteMapping(System.String) +FNDA:0,System.Boolean WireMock.Server.FluentMockServer::DeleteMapping(System.String) +DA:342,0 +DA:344,0 +DA:345,0 +DA:346,0 +FN:353,System.Void WireMock.Server.FluentMockServer::AddGlobalProcessingDelay(System.TimeSpan) FNDA:1,System.Void WireMock.Server.FluentMockServer::AddGlobalProcessingDelay(System.TimeSpan) -DA:349,1 -DA:350,1 -DA:351,1 -FN:357,System.Void WireMock.Server.FluentMockServer::AllowPartialMapping(System.Boolean) -FNDA:0,System.Void WireMock.Server.FluentMockServer::AllowPartialMapping(System.Boolean) -DA:358,0 -DA:359,0 -DA:360,0 -DA:361,0 -FN:369,System.Void WireMock.Server.FluentMockServer::SetBasicAuthentication(System.String,System.String) +DA:354,1 +DA:355,1 +DA:356,1 +FN:362,System.Void WireMock.Server.FluentMockServer::AllowPartialMapping(System.Boolean) +FNDA:1,System.Void WireMock.Server.FluentMockServer::AllowPartialMapping(System.Boolean) +DA:363,1 +DA:364,1 +DA:365,1 +DA:366,1 +FN:374,System.Void WireMock.Server.FluentMockServer::SetBasicAuthentication(System.String,System.String) FNDA:3,System.Void WireMock.Server.FluentMockServer::SetBasicAuthentication(System.String,System.String) -DA:370,3 -DA:371,3 -DA:372,3 -DA:374,3 DA:375,3 DA:376,3 -FN:382,System.Void WireMock.Server.FluentMockServer::RemoveBasicAuthentication() +DA:377,3 +DA:379,3 +DA:380,3 +DA:381,3 +FN:387,System.Void WireMock.Server.FluentMockServer::RemoveBasicAuthentication() FNDA:1,System.Void WireMock.Server.FluentMockServer::RemoveBasicAuthentication() -DA:383,1 -DA:384,1 -DA:385,1 -FN:392,System.Void WireMock.Server.FluentMockServer::SetMaxRequestLogCount(System.Nullable`1) +DA:388,1 +DA:389,1 +DA:390,1 +FN:397,System.Void WireMock.Server.FluentMockServer::SetMaxRequestLogCount(System.Nullable`1) FNDA:1,System.Void WireMock.Server.FluentMockServer::SetMaxRequestLogCount(System.Nullable`1) -DA:393,1 -DA:394,1 -DA:395,1 -FN:402,System.Void WireMock.Server.FluentMockServer::SetRequestLogExpirationDuration(System.Nullable`1) -FNDA:0,System.Void WireMock.Server.FluentMockServer::SetRequestLogExpirationDuration(System.Nullable`1) -DA:403,0 -DA:404,0 -DA:405,0 -FN:411,System.Void WireMock.Server.FluentMockServer::ResetScenarios() +DA:398,1 +DA:399,1 +DA:400,1 +FN:407,System.Void WireMock.Server.FluentMockServer::SetRequestLogExpirationDuration(System.Nullable`1) +FNDA:1,System.Void WireMock.Server.FluentMockServer::SetRequestLogExpirationDuration(System.Nullable`1) +DA:408,1 +DA:409,1 +DA:410,1 +FN:416,System.Void WireMock.Server.FluentMockServer::ResetScenarios() FNDA:0,System.Void WireMock.Server.FluentMockServer::ResetScenarios() -DA:412,0 -DA:413,0 -DA:414,0 -FN:422,WireMock.Server.IRespondWithAProvider WireMock.Server.FluentMockServer::Given(WireMock.Matchers.Request.IRequestMatcher) -FNDA:264,WireMock.Server.IRespondWithAProvider WireMock.Server.FluentMockServer::Given(WireMock.Matchers.Request.IRequestMatcher) -DA:423,264 -DA:424,264 -DA:425,264 -FN:427,System.Void WireMock.Server.FluentMockServer::RegisterMapping(WireMock.Mapping) -FNDA:264,System.Void WireMock.Server.FluentMockServer::RegisterMapping(WireMock.Mapping) -DA:428,264 -DA:430,264 -DA:431,1 -DA:432,1 -DA:433,1 -DA:435,263 -DA:436,263 -DA:437,263 -DA:438,264 -BRDA:430,25,0,1 -BRDA:430,25,1,263 +DA:417,0 +DA:418,0 +DA:419,0 +FN:427,WireMock.Server.IRespondWithAProvider WireMock.Server.FluentMockServer::Given(WireMock.Matchers.Request.IRequestMatcher) +FNDA:249,WireMock.Server.IRespondWithAProvider WireMock.Server.FluentMockServer::Given(WireMock.Matchers.Request.IRequestMatcher) +DA:428,249 +DA:429,249 +DA:430,249 +FN:432,System.Void WireMock.Server.FluentMockServer::RegisterMapping(WireMock.IMapping) +FNDA:249,System.Void WireMock.Server.FluentMockServer::RegisterMapping(WireMock.IMapping) +DA:433,249 +DA:435,249 +DA:436,1 +DA:437,1 +DA:438,1 +DA:440,248 +DA:441,248 +DA:442,248 +DA:443,249 +BRDA:435,25,0,1 +BRDA:435,25,1,248 FN:31,System.Void WireMock.Server.FluentMockServer::.ctor(WireMock.Settings.IFluentMockServerSettings) -FNDA:55,System.Void WireMock.Server.FluentMockServer::.ctor(WireMock.Settings.IFluentMockServerSettings) -DA:32,55 -DA:185,55 -DA:186,55 -DA:187,55 -DA:189,55 -DA:190,55 -DA:192,55 -DA:193,55 -DA:195,55 +FNDA:47,System.Void WireMock.Server.FluentMockServer::.ctor(WireMock.Settings.IFluentMockServerSettings) +DA:32,47 +DA:185,47 +DA:186,47 +DA:187,47 +DA:189,47 +DA:190,47 +DA:192,47 +DA:193,47 +DA:195,47 DA:196,1 DA:197,1 DA:198,1 -DA:200,54 -DA:201,54 -DA:202,54 -DA:203,54 -DA:205,55 -DA:206,55 -DA:207,55 -DA:210,55 -DA:214,55 -DA:216,55 -DA:218,55 -DA:219,55 -DA:220,451 -DA:221,396 -DA:223,396 +DA:200,46 +DA:201,46 +DA:202,46 +DA:203,46 +DA:205,47 +DA:206,47 +DA:207,47 +DA:210,47 +DA:214,47 +DA:216,47 +DA:218,47 +DA:219,47 +DA:220,480 +DA:221,433 +DA:223,433 DA:224,0 DA:225,0 -DA:229,396 +DA:229,433 DA:230,0 DA:231,0 -DA:234,396 -DA:235,396 -DA:236,55 -DA:238,55 -DA:239,0 -DA:240,0 -DA:241,0 -DA:243,55 +DA:234,433 +DA:235,433 +DA:236,47 +DA:238,47 +DA:239,1 +DA:240,1 +DA:241,1 +DA:243,47 DA:244,11 DA:245,11 DA:246,1 @@ -2607,73 +2601,67 @@ DA:247,1 DA:248,1 DA:250,11 DA:251,11 -DA:253,55 +DA:253,47 DA:254,0 DA:255,0 DA:256,0 -DA:258,55 +DA:258,47 DA:259,0 DA:260,0 DA:261,0 -DA:263,55 +DA:263,47 DA:264,2 DA:265,2 DA:266,2 -DA:268,55 -DA:269,0 -DA:270,0 -DA:271,0 -DA:272,55 +DA:268,47 +DA:269,1 +DA:270,1 +DA:271,1 +DA:273,47 +DA:274,0 +DA:275,0 +DA:276,0 +DA:277,47 BRDA:187,117,0,0 -BRDA:187,117,1,55 +BRDA:187,117,1,47 BRDA:190,151,0,0 -BRDA:190,151,1,55 +BRDA:190,151,1,47 BRDA:195,230,0,1 -BRDA:195,230,1,54 -BRDA:201,274,0,54 -BRDA:201,274,1,0 -BRDA:201,286,0,54 -BRDA:201,286,1,0 -BRDA:202,344,0,54 -BRDA:202,344,1,0 -BRDA:202,356,0,54 -BRDA:202,356,1,0 -BRDA:220,668,1,396 -BRDA:223,532,0,0 -BRDA:223,532,1,396 -BRDA:229,589,0,0 -BRDA:229,589,1,396 -BRDA:220,668,0,55 -BRDA:238,709,0,55 -BRDA:238,709,1,0 -BRDA:238,725,0,0 -BRDA:238,725,1,55 -BRDA:243,757,0,44 -BRDA:243,757,1,11 -BRDA:243,773,0,11 -BRDA:245,787,0,1 -BRDA:245,787,1,10 -BRDA:245,810,0,1 -BRDA:245,810,1,11 -BRDA:243,773,1,55 -BRDA:253,861,0,55 -BRDA:253,861,1,0 -BRDA:253,877,0,0 -BRDA:253,877,1,55 -BRDA:258,909,0,55 -BRDA:258,909,1,0 -BRDA:258,925,0,0 -BRDA:258,925,1,55 -BRDA:263,950,0,2 -BRDA:263,950,1,55 -BRDA:268,980,0,0 -BRDA:268,980,1,55 -LF:189 -LH:115 -BRF:62 -BRH:38 +BRDA:195,230,1,46 +BRDA:201,284,0,46 +BRDA:201,284,1,0 +BRDA:202,352,0,46 +BRDA:202,352,1,0 +BRDA:220,664,1,433 +BRDA:223,528,0,0 +BRDA:223,528,1,433 +BRDA:229,585,0,0 +BRDA:229,585,1,433 +BRDA:220,664,0,47 +BRDA:238,719,0,1 +BRDA:238,719,1,47 +BRDA:243,765,0,11 +BRDA:245,779,0,1 +BRDA:245,779,1,10 +BRDA:245,802,0,1 +BRDA:245,802,1,11 +BRDA:243,765,1,47 +BRDA:253,867,0,0 +BRDA:253,867,1,47 +BRDA:258,913,0,0 +BRDA:258,913,1,47 +BRDA:263,938,0,2 +BRDA:263,938,1,47 +BRDA:268,968,0,1 +BRDA:268,968,1,47 +BRDA:273,1003,0,0 +BRDA:273,1003,1,47 +LF:193 +LH:129 +BRF:52 +BRH:34 FNF:29 -FNH:17 +FNH:19 end_of_record SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Server\FluentMockServer.LogEntries.cs FN:21,System.Void WireMock.Server.FluentMockServer::add_LogEntriesChanged(System.Collections.Specialized.NotifyCollectionChangedEventHandler) @@ -2683,41 +2671,41 @@ FN:22,System.Void WireMock.Server.FluentMockServer::remove_LogEntriesChanged(Sys FNDA:0,System.Void WireMock.Server.FluentMockServer::remove_LogEntriesChanged(System.Collections.Specialized.NotifyCollectionChangedEventHandler) DA:23,0 FN:29,System.Collections.Generic.IEnumerable`1 WireMock.Server.FluentMockServer::get_LogEntries() -FNDA:12,System.Collections.Generic.IEnumerable`1 WireMock.Server.FluentMockServer::get_LogEntries() -DA:30,12 +FNDA:10,System.Collections.Generic.IEnumerable`1 WireMock.Server.FluentMockServer::get_LogEntries() +DA:30,10 FN:38,System.Collections.Generic.IEnumerable`1 WireMock.Server.FluentMockServer::FindLogEntries(WireMock.Matchers.Request.IRequestMatcher[]) -FNDA:1,System.Collections.Generic.IEnumerable`1 WireMock.Server.FluentMockServer::FindLogEntries(WireMock.Matchers.Request.IRequestMatcher[]) -DA:39,1 -DA:40,1 -DA:42,7 -DA:43,2 -DA:44,2 -DA:45,10 -DA:46,2 -DA:47,2 -DA:48,2 -DA:50,2 -DA:51,1 -DA:52,1 -DA:53,1 -DA:54,2 -DA:56,3 -DA:57,1 -BRDA:42,129,1,2 -BRDA:45,86,1,2 -BRDA:45,86,0,2 -BRDA:50,109,0,1 -BRDA:50,109,1,2 -BRDA:42,129,0,1 -BRDA:56,151,0,1 -BRDA:56,151,1,1 -BRDA:56,187,0,1 -BRDA:56,187,1,1 +FNDA:0,System.Collections.Generic.IEnumerable`1 WireMock.Server.FluentMockServer::FindLogEntries(WireMock.Matchers.Request.IRequestMatcher[]) +DA:39,0 +DA:40,0 +DA:42,0 +DA:43,0 +DA:44,0 +DA:45,0 +DA:46,0 +DA:47,0 +DA:48,0 +DA:50,0 +DA:51,0 +DA:52,0 +DA:53,0 +DA:54,0 +DA:56,0 +DA:57,0 +BRDA:42,129,1,0 +BRDA:45,86,1,0 +BRDA:45,86,0,0 +BRDA:50,109,0,0 +BRDA:50,109,1,0 +BRDA:42,129,0,0 +BRDA:56,151,0,0 +BRDA:56,151,1,0 +BRDA:56,187,0,0 +BRDA:56,187,1,0 FN:63,System.Void WireMock.Server.FluentMockServer::ResetLogEntries() -FNDA:9,System.Void WireMock.Server.FluentMockServer::ResetLogEntries() -DA:64,9 -DA:65,9 -DA:66,9 +FNDA:1,System.Void WireMock.Server.FluentMockServer::ResetLogEntries() +DA:64,1 +DA:65,1 +DA:66,1 FN:73,System.Boolean WireMock.Server.FluentMockServer::DeleteLogEntry(System.Guid) FNDA:0,System.Boolean WireMock.Server.FluentMockServer::DeleteLogEntry(System.Guid) DA:74,0 @@ -2731,21 +2719,21 @@ DA:84,0 BRDA:77,49,0,0 BRDA:77,49,1,0 LF:30 -LH:21 +LH:5 BRF:12 -BRH:10 +BRH:0 FNF:6 -FNH:4 +FNH:3 end_of_record SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Server\RespondWithAProvider.cs FN:20,System.Guid WireMock.Server.RespondWithAProvider::get_Guid() -FNDA:553,System.Guid WireMock.Server.RespondWithAProvider::get_Guid() -DA:21,553 +FNDA:523,System.Guid WireMock.Server.RespondWithAProvider::get_Guid() +DA:21,523 FN:38,System.Void WireMock.Server.RespondWithAProvider::RespondWith(WireMock.ResponseProviders.IResponseProvider) -FNDA:264,System.Void WireMock.Server.RespondWithAProvider::RespondWith(WireMock.ResponseProviders.IResponseProvider) -DA:39,264 -DA:40,264 -DA:41,264 +FNDA:249,System.Void WireMock.Server.RespondWithAProvider::RespondWith(WireMock.ResponseProviders.IResponseProvider) +DA:39,249 +DA:40,249 +DA:41,249 FN:44,WireMock.Server.IRespondWithAProvider WireMock.Server.RespondWithAProvider::WithGuid(System.String) FNDA:2,WireMock.Server.IRespondWithAProvider WireMock.Server.RespondWithAProvider::WithGuid(System.String) DA:45,2 @@ -2804,12 +2792,12 @@ DA:113,5 BRDA:105,14,0,0 BRDA:105,14,1,5 FN:27,System.Void WireMock.Server.RespondWithAProvider::.ctor(WireMock.RegistrationCallback,WireMock.Matchers.Request.IRequestMatcher) -FNDA:264,System.Void WireMock.Server.RespondWithAProvider::.ctor(WireMock.RegistrationCallback,WireMock.Matchers.Request.IRequestMatcher) -DA:28,264 -DA:29,264 -DA:30,264 -DA:31,264 -DA:32,264 +FNDA:249,System.Void WireMock.Server.RespondWithAProvider::.ctor(WireMock.RegistrationCallback,WireMock.Matchers.Request.IRequestMatcher) +DA:28,249 +DA:29,249 +DA:30,249 +DA:31,249 +DA:32,249 LF:46 LH:42 BRF:4 @@ -2819,85 +2807,85 @@ FNH:11 end_of_record SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Serialization\LogEntryMapper.cs FN:10,WireMock.Admin.Requests.LogEntryModel WireMock.Serialization.LogEntryMapper::Map(WireMock.Logging.LogEntry) -FNDA:69,WireMock.Admin.Requests.LogEntryModel WireMock.Serialization.LogEntryMapper::Map(WireMock.Logging.LogEntry) -DA:11,69 -DA:12,69 -DA:13,69 -DA:14,69 -DA:15,69 -DA:16,69 -DA:17,69 -DA:18,69 -DA:19,69 -DA:20,69 -DA:21,69 -DA:22,69 -DA:23,69 -DA:24,69 -DA:25,69 -DA:26,69 -DA:27,69 -DA:28,69 -DA:29,69 -DA:30,69 -DA:31,69 -DA:32,69 -DA:33,69 -DA:34,69 -DA:35,69 -DA:36,69 -DA:37,69 -DA:38,69 -DA:39,69 -DA:40,69 -DA:41,69 -DA:42,69 -DA:43,69 -DA:44,69 -DA:45,69 -DA:46,69 -DA:47,69 -DA:48,69 -DA:49,69 -DA:50,69 -DA:51,69 -DA:52,69 -DA:53,69 -DA:54,69 -DA:55,69 -DA:56,69 -DA:57,69 -DA:58,69 -DA:59,69 -DA:60,69 -DA:61,69 -DA:62,69 -DA:63,177 -DA:64,177 -DA:65,177 -DA:66,177 -DA:67,177 -DA:68,69 -DA:69,69 -DA:70,69 -BRDA:12,271,0,51 -BRDA:12,271,1,18 -BRDA:12,542,0,4 -BRDA:12,542,1,65 -BRDA:12,666,0,18 -BRDA:12,666,1,51 +FNDA:54,WireMock.Admin.Requests.LogEntryModel WireMock.Serialization.LogEntryMapper::Map(WireMock.Logging.LogEntry) +DA:11,54 +DA:12,54 +DA:13,54 +DA:14,54 +DA:15,54 +DA:16,54 +DA:17,54 +DA:18,54 +DA:19,54 +DA:20,54 +DA:21,54 +DA:22,54 +DA:23,54 +DA:24,54 +DA:25,54 +DA:26,54 +DA:27,54 +DA:28,54 +DA:29,54 +DA:30,54 +DA:31,54 +DA:32,54 +DA:33,54 +DA:34,54 +DA:35,54 +DA:36,54 +DA:37,54 +DA:38,54 +DA:39,54 +DA:40,54 +DA:41,54 +DA:42,54 +DA:43,54 +DA:44,54 +DA:45,54 +DA:46,54 +DA:47,54 +DA:48,54 +DA:49,54 +DA:50,54 +DA:51,54 +DA:52,54 +DA:53,54 +DA:54,54 +DA:55,54 +DA:56,54 +DA:57,54 +DA:58,54 +DA:59,54 +DA:60,54 +DA:61,54 +DA:62,54 +DA:63,134 +DA:64,134 +DA:65,134 +DA:66,134 +DA:67,134 +DA:68,54 +DA:69,54 +DA:70,54 +BRDA:12,271,0,45 +BRDA:12,271,1,9 +BRDA:12,542,0,0 +BRDA:12,542,1,54 +BRDA:12,666,0,19 +BRDA:12,666,1,35 BRDA:12,769,0,1 -BRDA:12,769,1,51 +BRDA:12,769,1,35 LF:60 LH:60 BRF:8 -BRH:8 +BRH:7 FNF:1 FNH:1 end_of_record SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Serialization\MappingConverter.cs -FN:13,WireMock.Admin.Mappings.MappingModel WireMock.Serialization.MappingConverter::ToMappingModel(WireMock.Mapping) -FNDA:2,WireMock.Admin.Mappings.MappingModel WireMock.Serialization.MappingConverter::ToMappingModel(WireMock.Mapping) +FN:13,WireMock.Admin.Mappings.MappingModel WireMock.Serialization.MappingConverter::ToMappingModel(WireMock.IMapping) +FNDA:2,WireMock.Admin.Mappings.MappingModel WireMock.Serialization.MappingConverter::ToMappingModel(WireMock.IMapping) DA:14,2 DA:15,2 DA:16,2 @@ -3126,56 +3114,50 @@ BRDA:22,51,0,22 BRDA:22,51,1,2 BRDA:24,66,0,19 BRDA:24,66,1,5 -BRDA:25,127,0,24 -BRDA:25,127,1,0 -BRDA:25,139,0,24 -BRDA:25,139,1,0 -BRDA:27,166,0,8 -BRDA:27,175,0,5 -BRDA:27,184,0,5 -BRDA:27,175,1,3 -BRDA:27,215,0,3 -BRDA:27,166,1,16 -BRDA:27,243,0,1 -BRDA:27,252,0,1 -BRDA:27,243,1,15 -BRDA:27,280,0,4 -BRDA:27,229,1,2 -BRDA:27,280,1,11 -BRDA:27,266,1,1 -BRDA:27,215,1,0 -BRDA:27,184,1,0 -BRDA:27,252,1,0 -BRDA:27,198,1,5 -BRDA:27,291,1,3 -BRDA:27,313,1,2 -BRDA:27,335,1,11 -BRDA:27,357,1,1 -BRDA:36,530,0,0 -BRDA:36,530,1,1 -BRDA:27,379,1,0 -BRDA:27,401,1,0 -BRDA:27,423,1,0 -BRDA:27,445,1,5 -BRDA:48,646,0,4 -BRDA:48,646,1,1 -BRDA:27,467,1,3 -BRDA:52,677,0,2 -BRDA:52,677,1,1 -BRDA:52,697,0,1 -BRDA:52,697,1,2 -BRDA:27,198,0,2 -BRDA:27,229,0,2 -BRDA:27,266,0,2 -BRDA:27,291,0,2 -BRDA:27,313,0,2 -BRDA:27,335,0,2 -BRDA:27,357,0,2 -BRDA:27,379,0,2 -BRDA:27,401,0,2 -BRDA:27,423,0,2 -BRDA:27,445,0,2 -BRDA:27,467,0,2 +BRDA:25,137,0,24 +BRDA:25,137,1,0 +BRDA:27,164,0,8 +BRDA:27,173,0,5 +BRDA:27,182,0,5 +BRDA:27,173,1,3 +BRDA:27,213,0,3 +BRDA:27,164,1,16 +BRDA:27,241,0,1 +BRDA:27,250,0,1 +BRDA:27,241,1,15 +BRDA:27,278,0,4 +BRDA:27,227,1,2 +BRDA:27,278,1,11 +BRDA:27,264,1,1 +BRDA:27,213,1,0 +BRDA:27,182,1,0 +BRDA:27,250,1,0 +BRDA:27,196,1,5 +BRDA:27,289,1,3 +BRDA:27,311,1,2 +BRDA:27,333,1,11 +BRDA:27,355,1,1 +BRDA:27,377,1,0 +BRDA:27,399,1,0 +BRDA:27,421,1,0 +BRDA:27,443,1,5 +BRDA:27,465,1,3 +BRDA:52,674,0,2 +BRDA:52,674,1,1 +BRDA:52,694,0,1 +BRDA:52,694,1,2 +BRDA:27,196,0,2 +BRDA:27,227,0,2 +BRDA:27,264,0,2 +BRDA:27,289,0,2 +BRDA:27,311,0,2 +BRDA:27,333,0,2 +BRDA:27,355,0,2 +BRDA:27,377,0,2 +BRDA:27,399,0,2 +BRDA:27,421,0,2 +BRDA:27,443,0,2 +BRDA:27,465,0,2 FN:64,WireMock.Admin.Mappings.MatcherModel[] WireMock.Serialization.MatcherMapper::Map(System.Collections.Generic.IEnumerable`1) FNDA:3,WireMock.Admin.Mappings.MatcherModel[] WireMock.Serialization.MatcherMapper::Map(System.Collections.Generic.IEnumerable`1) DA:65,3 @@ -3222,8 +3204,8 @@ BRDA:86,209,0,5 BRDA:86,209,1,1 LF:46 LH:43 -BRF:74 -BRH:63 +BRF:68 +BRH:59 FNF:3 FNH:3 end_of_record @@ -3291,307 +3273,322 @@ FNH:1 end_of_record SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\ResponseBuilders\Response.cs FN:28,System.Nullable`1 WireMock.ResponseBuilders.Response::get_Delay() -FNDA:94,System.Nullable`1 WireMock.ResponseBuilders.Response::get_Delay() -DA:29,94 +FNDA:80,System.Nullable`1 WireMock.ResponseBuilders.Response::get_Delay() +DA:29,80 FN:33,System.Boolean WireMock.ResponseBuilders.Response::get_UseTransformer() -FNDA:121,System.Boolean WireMock.ResponseBuilders.Response::get_UseTransformer() -DA:34,121 +FNDA:108,System.Boolean WireMock.ResponseBuilders.Response::get_UseTransformer() +DA:34,108 FN:38,System.String WireMock.ResponseBuilders.Response::get_ProxyUrl() -FNDA:89,System.String WireMock.ResponseBuilders.Response::get_ProxyUrl() -DA:39,89 +FNDA:76,System.String WireMock.ResponseBuilders.Response::get_ProxyUrl() +DA:39,76 FN:43,System.String WireMock.ResponseBuilders.Response::get_ClientX509Certificate2ThumbprintOrSubjectName() FNDA:0,System.String WireMock.ResponseBuilders.Response::get_ClientX509Certificate2ThumbprintOrSubjectName() DA:44,0 FN:48,WireMock.ResponseMessage WireMock.ResponseBuilders.Response::get_ResponseMessage() -FNDA:629,WireMock.ResponseMessage WireMock.ResponseBuilders.Response::get_ResponseMessage() -DA:49,629 +FNDA:550,WireMock.ResponseMessage WireMock.ResponseBuilders.Response::get_ResponseMessage() +DA:49,550 FN:53,System.Func`2 WireMock.ResponseBuilders.Response::get_Callback() -FNDA:96,System.Func`2 WireMock.ResponseBuilders.Response::get_Callback() -DA:54,96 -FN:62,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::Create(WireMock.ResponseMessage) -FNDA:100,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::Create(WireMock.ResponseMessage) -DA:63,100 -DA:64,100 -DA:65,100 -DA:66,100 -BRDA:64,3,0,100 -BRDA:64,3,1,100 -FN:74,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::Create(System.Func`1) +FNDA:80,System.Func`2 WireMock.ResponseBuilders.Response::get_Callback() +DA:54,80 +FN:58,System.Boolean WireMock.ResponseBuilders.Response::get_WithCallbackUsed() +FNDA:4,System.Boolean WireMock.ResponseBuilders.Response::get_WithCallbackUsed() +DA:59,4 +FN:67,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::Create(WireMock.ResponseMessage) +FNDA:87,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::Create(WireMock.ResponseMessage) +DA:68,87 +DA:69,87 +DA:70,87 +DA:71,87 +BRDA:69,3,0,87 +BRDA:69,3,1,87 +FN:79,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::Create(System.Func`1) FNDA:1,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::Create(System.Func`1) -DA:75,1 -DA:76,1 -DA:78,1 -DA:79,1 -FN:98,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithStatusCode(System.Int32) -FNDA:24,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithStatusCode(System.Int32) -DA:99,24 -DA:100,24 -DA:101,24 -DA:102,24 -FN:110,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithStatusCode(System.Net.HttpStatusCode) +DA:80,1 +DA:81,1 +DA:83,1 +DA:84,1 +FN:103,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithStatusCode(System.Int32) +FNDA:22,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithStatusCode(System.Int32) +DA:104,22 +DA:105,22 +DA:106,22 +DA:107,22 +FN:115,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithStatusCode(System.Net.HttpStatusCode) FNDA:0,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithStatusCode(System.Net.HttpStatusCode) -DA:111,0 -DA:112,0 -DA:113,0 -FN:120,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithSuccess() +DA:116,0 +DA:117,0 +DA:118,0 +FN:125,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithSuccess() FNDA:1,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithSuccess() -DA:121,1 -DA:122,1 -DA:123,1 -FN:130,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithNotFound() +DA:126,1 +DA:127,1 +DA:128,1 +FN:135,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithNotFound() FNDA:0,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithNotFound() -DA:131,0 -DA:132,0 -DA:133,0 -FN:136,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithHeader(System.String,System.String[]) -FNDA:103,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithHeader(System.String,System.String[]) -DA:137,103 -DA:138,103 -DA:140,103 -DA:141,103 -DA:142,103 -FN:145,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithHeaders(System.Collections.Generic.IDictionary`2) +DA:136,0 +DA:137,0 +DA:138,0 +FN:141,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithHeader(System.String,System.String[]) +FNDA:102,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithHeader(System.String,System.String[]) +DA:142,102 +DA:143,102 +DA:145,102 +DA:146,102 +DA:147,102 +FN:150,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithHeaders(System.Collections.Generic.IDictionary`2) FNDA:1,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithHeaders(System.Collections.Generic.IDictionary`2) -DA:146,1 -DA:147,1 -DA:149,3 -DA:150,1 DA:151,1 -BRDA:149,26,0,1 -BRDA:149,26,1,1 -BRDA:149,57,0,1 -BRDA:149,57,1,1 -FN:154,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithHeaders(System.Collections.Generic.IDictionary`2) -FNDA:1,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithHeaders(System.Collections.Generic.IDictionary`2) +DA:152,1 +DA:154,3 DA:155,1 DA:156,1 -DA:158,3 -DA:159,1 +BRDA:154,26,0,1 +BRDA:154,26,1,1 +BRDA:154,57,0,1 +BRDA:154,57,1,1 +FN:159,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithHeaders(System.Collections.Generic.IDictionary`2) +FNDA:1,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithHeaders(System.Collections.Generic.IDictionary`2) DA:160,1 -BRDA:158,26,0,1 -BRDA:158,26,1,1 -BRDA:158,57,0,1 -BRDA:158,57,1,1 -FN:163,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithHeaders(System.Collections.Generic.IDictionary`2>) -FNDA:1,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithHeaders(System.Collections.Generic.IDictionary`2>) +DA:161,1 +DA:163,3 DA:164,1 DA:165,1 -DA:166,1 -DA:167,1 -FN:170,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithBody(System.Func`2,System.String,System.Text.Encoding) -FNDA:2,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithBody(System.Func`2,System.String,System.Text.Encoding) -DA:171,2 -DA:172,2 -DA:174,4 -DA:175,4 -DA:176,4 -DA:177,4 -DA:178,4 -DA:179,4 +BRDA:163,26,0,1 +BRDA:163,26,1,1 +BRDA:163,57,0,1 +BRDA:163,57,1,1 +FN:168,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithHeaders(System.Collections.Generic.IDictionary`2>) +FNDA:1,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithHeaders(System.Collections.Generic.IDictionary`2>) +DA:169,1 +DA:170,1 +DA:171,1 +DA:172,1 +FN:175,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithBody(System.Func`2,System.String,System.Text.Encoding) +FNDA:1,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithBody(System.Func`2,System.String,System.Text.Encoding) +DA:176,1 +DA:177,1 +DA:179,2 DA:180,2 -FN:183,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithBody(System.Byte[],System.String,System.Text.Encoding) -FNDA:3,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithBody(System.Byte[],System.String,System.Text.Encoding) -DA:184,3 -DA:185,3 -DA:187,3 -DA:189,3 -DA:192,1 -DA:193,1 -DA:194,1 -DA:195,1 -DA:196,1 -DA:199,2 -DA:200,2 -DA:201,2 -DA:204,3 -DA:205,3 -BRDA:189,39,1,1 -BRDA:192,45,0,0 -BRDA:192,45,1,1 -BRDA:189,39,0,2 -FN:208,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithBodyFromFile(System.String,System.Boolean) +DA:181,2 +DA:182,2 +DA:183,2 +DA:184,2 +DA:185,1 +FN:188,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithBody(System.Byte[],System.String,System.Text.Encoding) +FNDA:2,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithBody(System.Byte[],System.String,System.Text.Encoding) +DA:189,2 +DA:190,2 +DA:192,2 +DA:194,2 +DA:197,1 +DA:198,1 +DA:199,1 +DA:200,1 +DA:201,1 +DA:204,1 +DA:205,1 +DA:206,1 +DA:209,2 +DA:210,2 +BRDA:194,39,1,1 +BRDA:197,45,0,0 +BRDA:197,45,1,1 +BRDA:194,39,0,1 +FN:213,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithBodyFromFile(System.String,System.Boolean) FNDA:3,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithBodyFromFile(System.String,System.Boolean) -DA:209,3 -DA:210,3 -DA:212,3 -DA:213,3 +DA:214,3 DA:215,3 -DA:216,3 DA:217,3 DA:218,3 -DA:219,3 DA:220,3 -DA:222,0 -DA:223,0 -DA:224,0 -DA:225,0 -DA:226,0 -DA:228,3 -DA:229,3 -BRDA:215,47,0,3 -BRDA:215,47,1,0 -FN:232,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithBody(System.String,System.String,System.Text.Encoding) -FNDA:57,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithBody(System.String,System.String,System.Text.Encoding) -DA:233,57 -DA:234,57 -DA:236,57 -DA:238,57 -DA:239,57 -DA:241,57 -DA:244,1 -DA:245,1 -DA:246,1 -DA:247,1 +DA:221,3 +DA:222,3 +DA:223,3 +DA:224,3 +DA:225,3 +DA:227,0 +DA:228,0 +DA:229,0 +DA:230,0 +DA:231,0 +DA:233,3 +DA:234,3 +BRDA:220,47,0,3 +BRDA:220,47,1,0 +FN:237,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithBody(System.String,System.String,System.Text.Encoding) +FNDA:47,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithBody(System.String,System.String,System.Text.Encoding) +DA:238,47 +DA:239,47 +DA:241,47 +DA:243,47 +DA:244,47 +DA:246,47 +DA:249,1 DA:250,1 DA:251,1 DA:252,1 -DA:253,1 -DA:256,55 -DA:257,55 -DA:258,55 -DA:259,55 -DA:262,57 -DA:263,57 -BRDA:236,15,0,47 -BRDA:236,15,1,57 -BRDA:241,64,0,56 -BRDA:241,64,1,1 -BRDA:241,77,1,1 -BRDA:241,77,0,55 -FN:266,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithBodyAsJson(System.Object,System.Text.Encoding,System.Nullable`1) -FNDA:17,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithBodyAsJson(System.Object,System.Text.Encoding,System.Nullable`1) -DA:267,17 -DA:268,17 -DA:270,17 -DA:271,17 -DA:272,17 -DA:273,17 -DA:275,17 -DA:276,17 -FN:279,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithBodyAsJson(System.Object,System.Boolean) +DA:255,1 +DA:256,1 +DA:257,1 +DA:258,1 +DA:261,45 +DA:262,45 +DA:263,45 +DA:264,45 +DA:267,47 +DA:268,47 +BRDA:241,15,0,37 +BRDA:241,15,1,47 +BRDA:246,64,0,46 +BRDA:246,64,1,1 +BRDA:246,77,1,1 +BRDA:246,77,0,45 +FN:271,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithBodyAsJson(System.Object,System.Text.Encoding,System.Nullable`1) +FNDA:16,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithBodyAsJson(System.Object,System.Text.Encoding,System.Nullable`1) +DA:272,16 +DA:273,16 +DA:275,16 +DA:276,16 +DA:277,16 +DA:278,16 +DA:280,16 +DA:281,16 +FN:284,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithBodyAsJson(System.Object,System.Boolean) FNDA:1,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithBodyAsJson(System.Object,System.Boolean) -DA:280,1 -DA:281,1 -DA:282,1 -FN:285,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithBodyFromBase64(System.String,System.Text.Encoding) -FNDA:1,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithBodyFromBase64(System.String,System.Text.Encoding) +DA:285,1 DA:286,1 DA:287,1 -DA:289,1 +FN:290,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithBodyFromBase64(System.String,System.Text.Encoding) +FNDA:1,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithBodyFromBase64(System.String,System.Text.Encoding) DA:291,1 DA:292,1 -DA:293,1 -DA:295,1 +DA:294,1 DA:296,1 -BRDA:289,15,0,1 -BRDA:289,15,1,1 -FN:299,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithTransformer() +DA:297,1 +DA:298,1 +DA:300,1 +DA:301,1 +BRDA:294,15,0,1 +BRDA:294,15,1,1 +FN:304,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithTransformer() FNDA:32,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithTransformer() -DA:300,32 -DA:301,32 -DA:302,32 -DA:303,32 -FN:306,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithDelay(System.TimeSpan) +DA:305,32 +DA:306,32 +DA:307,32 +DA:308,32 +FN:311,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithDelay(System.TimeSpan) FNDA:1,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithDelay(System.TimeSpan) -DA:307,1 -DA:308,2 -DA:310,1 -DA:311,1 DA:312,1 -BRDA:308,8,0,1 -BRDA:308,8,1,1 -FN:315,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithDelay(System.Int32) +DA:313,2 +DA:315,1 +DA:316,1 +DA:317,1 +BRDA:313,8,0,1 +BRDA:313,8,1,1 +FN:320,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithDelay(System.Int32) FNDA:0,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithDelay(System.Int32) -DA:316,0 -DA:317,0 -DA:318,0 -FN:321,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithProxy(System.String,System.String) -FNDA:0,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithProxy(System.String,System.String) +DA:321,0 DA:322,0 DA:323,0 -DA:325,0 -DA:326,0 +FN:326,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithProxy(System.String,System.String) +FNDA:0,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithProxy(System.String,System.String) DA:327,0 DA:328,0 -DA:329,0 -FN:332,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithProxy(WireMock.Settings.IProxyAndRecordSettings) -FNDA:0,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithProxy(WireMock.Settings.IProxyAndRecordSettings) +DA:330,0 +DA:331,0 +DA:332,0 DA:333,0 DA:334,0 -DA:336,0 -DA:337,0 -FN:340,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithCallback(System.Func`2) -FNDA:3,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithCallback(System.Func`2) -DA:341,3 -DA:342,3 -DA:344,3 -DA:346,3 -DA:347,3 -FN:86,System.Void WireMock.ResponseBuilders.Response::.ctor(WireMock.ResponseMessage) -FNDA:101,System.Void WireMock.ResponseBuilders.Response::.ctor(WireMock.ResponseMessage) -DA:87,101 -DA:88,101 -DA:89,101 -DA:90,101 -FN:354,System.Void WireMock.ResponseBuilders.Response/d__48::MoveNext() -FNDA:90,System.Void WireMock.ResponseBuilders.Response/d__48::MoveNext() -DA:355,90 -DA:356,90 -DA:358,90 -DA:359,1 -DA:360,1 -DA:361,1 -DA:363,90 -DA:364,3 -DA:365,3 -DA:368,3 -DA:371,3 -DA:372,3 -DA:373,3 -DA:374,3 -DA:376,3 -DA:379,87 -DA:380,0 -DA:381,0 -DA:382,0 -DA:383,0 -DA:385,0 -DA:388,87 -DA:389,32 -DA:390,32 -DA:394,55 -DA:395,85 -BRDA:355,14,0,90 -BRDA:358,67,0,1 -BRDA:360,108,0,1 -BRDA:360,108,1,1 -BRDA:358,67,1,90 -BRDA:363,207,0,3 -BRDA:371,289,0,3 -BRDA:371,289,1,3 -BRDA:363,207,1,87 -BRDA:379,344,0,0 -BRDA:379,344,1,87 -BRDA:379,367,0,0 -BRDA:385,492,0,0 -BRDA:355,14,1,0 -BRDA:385,492,1,0 -BRDA:379,367,1,87 -BRDA:388,601,0,32 -BRDA:388,601,1,55 -LF:183 -LH:152 -BRF:46 -BRH:39 -FNF:31 -FNH:25 +FN:337,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithProxy(WireMock.Settings.IProxyAndRecordSettings) +FNDA:0,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithProxy(WireMock.Settings.IProxyAndRecordSettings) +DA:338,0 +DA:339,0 +DA:341,0 +DA:342,0 +FN:345,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithCallback(System.Func`2) +FNDA:1,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithCallback(System.Func`2) +DA:346,1 +DA:347,1 +DA:349,1 +DA:350,1 +FN:353,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithCallbackInternal(System.Boolean,System.Func`2) +FNDA:2,WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithCallbackInternal(System.Boolean,System.Func`2) +DA:354,2 +DA:355,2 +DA:357,2 +DA:358,2 +DA:360,2 +DA:361,2 +FN:91,System.Void WireMock.ResponseBuilders.Response::.ctor(WireMock.ResponseMessage) +FNDA:88,System.Void WireMock.ResponseBuilders.Response::.ctor(WireMock.ResponseMessage) +DA:92,88 +DA:93,88 +DA:94,88 +DA:95,88 +FN:368,System.Void WireMock.ResponseBuilders.Response/d__53::MoveNext() +FNDA:76,System.Void WireMock.ResponseBuilders.Response/d__53::MoveNext() +DA:369,76 +DA:370,76 +DA:372,76 +DA:373,1 +DA:374,1 +DA:375,1 +DA:377,76 +DA:378,2 +DA:379,2 +DA:381,2 +DA:382,1 +DA:384,1 +DA:387,1 +DA:388,1 +DA:389,1 +DA:390,1 +DA:391,1 +DA:393,2 +DA:396,74 +DA:397,0 +DA:398,0 +DA:399,0 +DA:400,0 +DA:402,0 +DA:405,74 +DA:406,32 +DA:407,32 +DA:411,42 +DA:412,71 +BRDA:369,14,0,76 +BRDA:372,67,0,1 +BRDA:374,108,0,1 +BRDA:374,108,1,1 +BRDA:372,67,1,76 +BRDA:377,207,0,2 +BRDA:381,259,0,1 +BRDA:387,313,0,1 +BRDA:387,313,1,1 +BRDA:381,259,1,2 +BRDA:377,207,1,74 +BRDA:396,369,0,0 +BRDA:396,369,1,74 +BRDA:396,392,0,0 +BRDA:402,517,0,0 +BRDA:369,14,1,0 +BRDA:402,517,1,0 +BRDA:396,392,1,74 +BRDA:405,626,0,32 +BRDA:405,626,1,42 +LF:192 +LH:161 +BRF:48 +BRH:41 +FNF:33 +FNH:27 end_of_record SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\RequestBuilders\Request.cs FN:23,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::Create() -FNDA:326,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::Create() -DA:24,326 -DA:25,326 -DA:26,326 +FNDA:312,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::Create() +DA:24,312 +DA:25,312 +DA:26,312 FN:42,System.Collections.Generic.IList`1 WireMock.RequestBuilders.Request::GetRequestMessageMatchers() FNDA:12,System.Collections.Generic.IList`1 WireMock.RequestBuilders.Request::GetRequestMessageMatchers() DA:43,12 @@ -3633,24 +3630,24 @@ DA:86,1 DA:87,1 DA:88,1 FN:91,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::WithPath(WireMock.Matchers.IStringMatcher[]) -FNDA:67,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::WithPath(WireMock.Matchers.IStringMatcher[]) -DA:92,67 -DA:93,67 -DA:95,67 -DA:96,67 -DA:97,67 +FNDA:66,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::WithPath(WireMock.Matchers.IStringMatcher[]) +DA:92,66 +DA:93,66 +DA:95,66 +DA:96,66 +DA:97,66 FN:100,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::WithPath(System.String[]) -FNDA:210,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::WithPath(System.String[]) -DA:101,210 -DA:102,210 -DA:103,210 +FNDA:197,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::WithPath(System.String[]) +DA:101,197 +DA:102,197 +DA:103,197 FN:106,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::WithPath(WireMock.Matchers.MatchBehaviour,System.String[]) -FNDA:210,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::WithPath(WireMock.Matchers.MatchBehaviour,System.String[]) -DA:107,210 -DA:108,210 -DA:110,210 -DA:111,210 -DA:112,210 +FNDA:197,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::WithPath(WireMock.Matchers.MatchBehaviour,System.String[]) +DA:107,197 +DA:108,197 +DA:110,197 +DA:111,197 +DA:112,197 FN:115,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::WithPath(System.Func`2[]) FNDA:1,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::WithPath(System.Func`2[]) DA:116,1 @@ -3691,11 +3688,11 @@ DA:159,56 DA:160,56 DA:161,56 FN:164,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::UsingGet(WireMock.Matchers.MatchBehaviour) -FNDA:95,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::UsingGet(WireMock.Matchers.MatchBehaviour) -DA:165,95 -DA:166,95 -DA:167,95 -DA:168,95 +FNDA:91,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::UsingGet(WireMock.Matchers.MatchBehaviour) +DA:165,91 +DA:166,91 +DA:167,91 +DA:168,91 FN:171,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::UsingHead(WireMock.Matchers.MatchBehaviour) FNDA:1,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::UsingHead(WireMock.Matchers.MatchBehaviour) DA:172,1 @@ -3709,11 +3706,11 @@ DA:180,68 DA:181,68 DA:182,68 FN:185,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::UsingPatch(WireMock.Matchers.MatchBehaviour) -FNDA:1,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::UsingPatch(WireMock.Matchers.MatchBehaviour) -DA:186,1 -DA:187,1 -DA:188,1 -DA:189,1 +FNDA:2,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::UsingPatch(WireMock.Matchers.MatchBehaviour) +DA:186,2 +DA:187,2 +DA:188,2 +DA:189,2 FN:192,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::UsingPut(WireMock.Matchers.MatchBehaviour) FNDA:14,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::UsingPut(WireMock.Matchers.MatchBehaviour) DA:193,14 @@ -3721,41 +3718,41 @@ DA:194,14 DA:195,14 DA:196,14 FN:199,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::UsingAnyMethod() -FNDA:28,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::UsingAnyMethod() -DA:200,28 -DA:201,34 -DA:202,86 +FNDA:26,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::UsingAnyMethod() +DA:200,26 +DA:201,32 +DA:202,80 DA:203,1 DA:204,1 DA:205,1 -DA:207,28 -DA:208,28 +DA:207,26 +DA:208,26 BRDA:201,13,0,1 -BRDA:201,13,1,28 +BRDA:201,13,1,26 BRDA:202,89,1,1 -BRDA:202,89,0,28 +BRDA:202,89,0,26 FN:211,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::UsingAnyVerb() FNDA:0,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::UsingAnyVerb() DA:212,0 DA:213,0 DA:214,0 FN:217,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::UsingMethod(System.String[]) -FNDA:23,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::UsingMethod(System.String[]) -DA:218,23 -DA:219,23 -DA:220,23 +FNDA:22,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::UsingMethod(System.String[]) +DA:218,22 +DA:219,22 +DA:220,22 FN:223,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::UsingVerb(System.String[]) FNDA:0,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::UsingVerb(System.String[]) DA:224,0 DA:225,0 DA:226,0 FN:229,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::UsingMethod(WireMock.Matchers.MatchBehaviour,System.String[]) -FNDA:23,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::UsingMethod(WireMock.Matchers.MatchBehaviour,System.String[]) -DA:230,23 -DA:231,23 -DA:233,23 -DA:234,23 -DA:235,23 +FNDA:22,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::UsingMethod(WireMock.Matchers.MatchBehaviour,System.String[]) +DA:230,22 +DA:231,22 +DA:233,22 +DA:234,22 +DA:235,22 FN:238,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::WithBody(System.String,WireMock.Matchers.MatchBehaviour) FNDA:2,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::WithBody(System.String,WireMock.Matchers.MatchBehaviour) DA:239,2 @@ -3775,12 +3772,12 @@ DA:254,1 DA:255,1 DA:256,1 FN:259,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::WithBody(WireMock.Matchers.IMatcher) -FNDA:20,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::WithBody(WireMock.Matchers.IMatcher) -DA:260,20 -DA:261,20 -DA:263,20 -DA:264,20 -DA:265,20 +FNDA:13,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::WithBody(WireMock.Matchers.IMatcher) +DA:260,13 +DA:261,13 +DA:263,13 +DA:264,13 +DA:265,13 FN:268,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::WithBody(System.Func`2) FNDA:1,WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::WithBody(System.Func`2) DA:269,1 @@ -3902,11 +3899,11 @@ DA:414,1 DA:415,1 DA:416,1 FN:31,System.Void WireMock.RequestBuilders.Request::.ctor(System.Collections.Generic.IList`1) -FNDA:326,System.Void WireMock.RequestBuilders.Request::.ctor(System.Collections.Generic.IList`1) -DA:32,326 -DA:33,326 -DA:34,326 -DA:35,326 +FNDA:312,System.Void WireMock.RequestBuilders.Request::.ctor(System.Collections.Generic.IList`1) +DA:32,312 +DA:33,312 +DA:34,312 +DA:35,312 LF:214 LH:208 BRF:8 @@ -3915,602 +3912,465 @@ FNF:49 FNH:47 end_of_record SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Owin\AspNetCoreSelfHost.cs -FN:26,System.Boolean WireMock.Owin.AspNetCoreSelfHost::get_IsStarted() -FNDA:510,System.Boolean WireMock.Owin.AspNetCoreSelfHost::get_IsStarted() -DA:27,510 -FN:28,System.Collections.Generic.List`1 WireMock.Owin.AspNetCoreSelfHost::get_Urls() -FNDA:110,System.Collections.Generic.List`1 WireMock.Owin.AspNetCoreSelfHost::get_Urls() -DA:29,110 -FN:30,System.Collections.Generic.List`1 WireMock.Owin.AspNetCoreSelfHost::get_Ports() -FNDA:165,System.Collections.Generic.List`1 WireMock.Owin.AspNetCoreSelfHost::get_Ports() -DA:31,165 -FN:32,System.Exception WireMock.Owin.AspNetCoreSelfHost::get_RunningException() -FNDA:396,System.Exception WireMock.Owin.AspNetCoreSelfHost::get_RunningException() -DA:33,396 -FN:54,System.Threading.Tasks.Task WireMock.Owin.AspNetCoreSelfHost::StartAsync() -FNDA:55,System.Threading.Tasks.Task WireMock.Owin.AspNetCoreSelfHost::StartAsync() -DA:55,55 -DA:56,55 -DA:57,55 -DA:58,110 -DA:59,110 -DA:60,55 -DA:61,110 -DA:62,55 -DA:63,110 -DA:64,55 -DA:65,110 -DA:66,110 -DA:67,55 -DA:68,110 -DA:69,55 -DA:70,55 -DA:71,55 -DA:72,55 -DA:73,55 -DA:74,55 -DA:75,55 -DA:76,385 -DA:77,110 -DA:78,110 -DA:79,110 -DA:80,110 -DA:81,55 -DA:82,275 -DA:83,55 -DA:84,55 -DA:85,55 -DA:86,55 -DA:87,55 -DA:88,55 -DA:89,55 -DA:90,55 -DA:91,110 -DA:92,55 -DA:93,55 -DA:94,55 -DA:95,55 -DA:97,55 -DA:98,110 -DA:99,110 -DA:100,57 -DA:101,55 -FN:103,System.Void WireMock.Owin.AspNetCoreSelfHost::StartServers() -FNDA:55,System.Void WireMock.Owin.AspNetCoreSelfHost::StartServers() -DA:104,55 -DA:106,55 -DA:107,55 -DA:108,110 -DA:113,55 -DA:121,55 -DA:123,2 -DA:124,0 -DA:125,0 -DA:126,0 -DA:127,0 -DA:128,0 -DA:130,2 -DA:131,2 +FN:28,System.Boolean WireMock.Owin.AspNetCoreSelfHost::get_IsStarted() +FNDA:531,System.Boolean WireMock.Owin.AspNetCoreSelfHost::get_IsStarted() +DA:29,531 +FN:30,System.Collections.Generic.List`1 WireMock.Owin.AspNetCoreSelfHost::get_Urls() +FNDA:94,System.Collections.Generic.List`1 WireMock.Owin.AspNetCoreSelfHost::get_Urls() +DA:31,94 +FN:32,System.Collections.Generic.List`1 WireMock.Owin.AspNetCoreSelfHost::get_Ports() +FNDA:141,System.Collections.Generic.List`1 WireMock.Owin.AspNetCoreSelfHost::get_Ports() +DA:33,141 +FN:34,System.Exception WireMock.Owin.AspNetCoreSelfHost::get_RunningException() +FNDA:433,System.Exception WireMock.Owin.AspNetCoreSelfHost::get_RunningException() +DA:35,433 +FN:56,System.Threading.Tasks.Task WireMock.Owin.AspNetCoreSelfHost::StartAsync() +FNDA:47,System.Threading.Tasks.Task WireMock.Owin.AspNetCoreSelfHost::StartAsync() +DA:57,47 +DA:58,47 +DA:59,47 +DA:60,94 +DA:61,94 +DA:62,94 +DA:63,94 +DA:64,94 +DA:65,94 +DA:66,47 +DA:67,94 +DA:68,94 +DA:69,47 +DA:70,94 +DA:71,47 +DA:72,94 +DA:73,47 +DA:74,94 +DA:75,94 +DA:76,47 +DA:77,94 +DA:78,47 +DA:79,47 +DA:80,47 +DA:81,47 +DA:82,47 +DA:83,47 +DA:84,47 +DA:85,329 +DA:86,94 +DA:87,94 +DA:88,94 +DA:89,94 +DA:90,47 +DA:91,235 +DA:92,47 +DA:93,47 +DA:94,47 +DA:95,47 +DA:96,47 +DA:97,47 +DA:98,47 +DA:99,47 +DA:100,94 +DA:101,47 +DA:102,47 +DA:103,47 +DA:104,47 +DA:106,47 +DA:107,94 +DA:108,94 +DA:109,49 +DA:110,47 +FN:112,System.Void WireMock.Owin.AspNetCoreSelfHost::StartServers() +FNDA:47,System.Void WireMock.Owin.AspNetCoreSelfHost::StartServers() +DA:113,47 +DA:115,47 +DA:116,47 +DA:117,94 +DA:122,47 +DA:130,47 DA:132,2 -DA:133,2 -FN:135,System.Threading.Tasks.Task WireMock.Owin.AspNetCoreSelfHost::StopAsync() -FNDA:2,System.Threading.Tasks.Task WireMock.Owin.AspNetCoreSelfHost::StopAsync() -DA:136,2 -DA:137,2 +DA:133,0 +DA:134,0 +DA:135,0 +DA:136,0 +DA:137,0 DA:139,2 -DA:143,2 +DA:140,2 +DA:141,2 +DA:142,2 +FN:144,System.Threading.Tasks.Task WireMock.Owin.AspNetCoreSelfHost::StopAsync() +FNDA:2,System.Threading.Tasks.Task WireMock.Owin.AspNetCoreSelfHost::StopAsync() DA:145,2 -FN:18,System.Void WireMock.Owin.AspNetCoreSelfHost::.ctor(WireMock.Owin.WireMockMiddlewareOptions,System.String[]) -FNDA:55,System.Void WireMock.Owin.AspNetCoreSelfHost::.ctor(WireMock.Owin.WireMockMiddlewareOptions,System.String[]) -DA:19,55 -DA:35,55 -DA:36,55 -DA:37,55 -DA:38,55 -DA:40,55 -DA:42,275 -DA:43,55 -DA:44,55 -DA:46,55 -DA:47,55 -DA:48,55 -DA:50,55 -DA:51,55 -DA:52,55 -BRDA:40,73,0,0 -BRDA:40,73,1,55 -BRDA:42,147,1,55 -BRDA:42,147,0,55 -LF:86 -LH:81 +DA:146,2 +DA:148,2 +DA:152,2 +DA:154,2 +FN:20,System.Void WireMock.Owin.AspNetCoreSelfHost::.ctor(WireMock.Owin.IWireMockMiddlewareOptions,System.String[]) +FNDA:47,System.Void WireMock.Owin.AspNetCoreSelfHost::.ctor(WireMock.Owin.IWireMockMiddlewareOptions,System.String[]) +DA:21,47 +DA:37,47 +DA:38,47 +DA:39,47 +DA:40,47 +DA:42,47 +DA:44,235 +DA:45,47 +DA:46,47 +DA:48,47 +DA:49,47 +DA:50,47 +DA:52,47 +DA:53,47 +DA:54,47 +BRDA:42,73,0,0 +BRDA:42,73,1,47 +BRDA:44,147,1,47 +BRDA:44,147,0,47 +LF:93 +LH:88 BRF:18 BRH:12 FNF:8 FNH:8 end_of_record SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Owin\GlobalExceptionMiddleware.cs -FN:33,Microsoft.AspNetCore.Http.RequestDelegate WireMock.Owin.GlobalExceptionMiddleware::get_Next() -FNDA:65,Microsoft.AspNetCore.Http.RequestDelegate WireMock.Owin.GlobalExceptionMiddleware::get_Next() -DA:34,65 -FN:25,System.Void WireMock.Owin.GlobalExceptionMiddleware::.ctor(Microsoft.AspNetCore.Http.RequestDelegate,WireMock.Owin.WireMockMiddlewareOptions) -FNDA:55,System.Void WireMock.Owin.GlobalExceptionMiddleware::.ctor(Microsoft.AspNetCore.Http.RequestDelegate,WireMock.Owin.WireMockMiddlewareOptions) -DA:26,55 -DA:27,55 -DA:28,55 -DA:29,55 -DA:30,55 -DA:37,55 -FN:43,System.Void WireMock.Owin.GlobalExceptionMiddleware/d__6::MoveNext() -FNDA:65,System.Void WireMock.Owin.GlobalExceptionMiddleware/d__6::MoveNext() -DA:44,65 -DA:46,65 -DA:47,65 -DA:48,65 -DA:49,0 -DA:50,0 -DA:51,0 -DA:52,0 -DA:53,0 -DA:54,65 -BRDA:44,14,0,65 -BRDA:44,35,0,65 -BRDA:47,54,0,0 -BRDA:47,54,1,65 -BRDA:47,84,0,2 -BRDA:44,35,1,2 -BRDA:47,84,1,65 -BRDA:49,192,1,0 -BRDA:52,331,0,0 -BRDA:44,14,1,0 -BRDA:52,331,1,0 -BRDA:49,192,0,65 -LF:17 -LH:12 +FN:45,Microsoft.AspNetCore.Http.RequestDelegate WireMock.Owin.GlobalExceptionMiddleware::get_Next() +FNDA:46,Microsoft.AspNetCore.Http.RequestDelegate WireMock.Owin.GlobalExceptionMiddleware::get_Next() +DA:46,46 +FN:53,System.Threading.Tasks.Task WireMock.Owin.GlobalExceptionMiddleware::Invoke(Microsoft.AspNetCore.Http.HttpContext) +FNDA:46,System.Threading.Tasks.Task WireMock.Owin.GlobalExceptionMiddleware::Invoke(Microsoft.AspNetCore.Http.HttpContext) +DA:54,46 +DA:55,46 +DA:56,46 +FN:33,System.Void WireMock.Owin.GlobalExceptionMiddleware::.ctor(Microsoft.AspNetCore.Http.RequestDelegate,WireMock.Owin.IWireMockMiddlewareOptions,WireMock.Owin.Mappers.IOwinResponseMapper) +FNDA:48,System.Void WireMock.Owin.GlobalExceptionMiddleware::.ctor(Microsoft.AspNetCore.Http.RequestDelegate,WireMock.Owin.IWireMockMiddlewareOptions,WireMock.Owin.Mappers.IOwinResponseMapper) +DA:34,48 +DA:35,48 +DA:36,48 +DA:37,48 +DA:39,48 +DA:40,48 +DA:41,48 +DA:42,48 +FN:58,System.Void WireMock.Owin.GlobalExceptionMiddleware/d__7::MoveNext() +FNDA:46,System.Void WireMock.Owin.GlobalExceptionMiddleware/d__7::MoveNext() +DA:59,46 +DA:61,46 +DA:62,46 +DA:63,46 +DA:64,0 +DA:65,0 +DA:66,0 +DA:67,0 +DA:68,0 +DA:69,46 +BRDA:59,14,0,46 +BRDA:59,35,0,46 +BRDA:62,54,0,0 +BRDA:62,54,1,46 +BRDA:62,84,0,2 +BRDA:59,35,1,2 +BRDA:62,84,1,46 +BRDA:64,192,1,0 +BRDA:67,331,0,0 +BRDA:59,14,1,0 +BRDA:67,331,1,0 +BRDA:64,192,0,46 +LF:22 +LH:17 BRF:12 BRH:7 -FNF:3 -FNH:3 +FNF:4 +FNH:4 end_of_record -SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Owin\OwinRequestMapper.cs -FN:74,System.Boolean WireMock.Owin.OwinRequestMapper::ShouldParseBody(System.String) -FNDA:65,System.Boolean WireMock.Owin.OwinRequestMapper::ShouldParseBody(System.String) -DA:75,65 -DA:87,65 -DA:88,65 -FN:31,System.Void WireMock.Owin.OwinRequestMapper/d__0::MoveNext() -FNDA:65,System.Void WireMock.Owin.OwinRequestMapper/d__0::MoveNext() -DA:32,65 -DA:37,65 -DA:38,65 -DA:39,65 -DA:40,65 -DA:41,65 -DA:43,65 -DA:45,65 -DA:46,65 -DA:47,65 -DA:48,65 -DA:49,393 -DA:50,99 -DA:51,99 -DA:52,99 -DA:53,65 -DA:55,65 -DA:56,65 -DA:57,0 -DA:58,0 -DA:59,0 -DA:60,0 -DA:61,0 -DA:62,0 -DA:63,0 -DA:65,65 -DA:66,65 -DA:67,16 -DA:68,16 -DA:69,16 -DA:71,65 -DA:72,65 -BRDA:39,95,0,65 -BRDA:39,95,1,0 -BRDA:46,183,0,65 -BRDA:49,306,1,99 -BRDA:49,306,0,65 -BRDA:46,183,1,65 -BRDA:56,368,0,0 -BRDA:59,486,1,0 -BRDA:59,486,0,0 -BRDA:56,368,1,65 -BRDA:66,541,0,65 -BRDA:66,541,1,0 -BRDA:66,567,0,16 -BRDA:68,614,0,0 -BRDA:68,614,1,16 -BRDA:66,567,1,65 -LF:35 +SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Owin\MappingMatcher.cs +FN:18,System.ValueTuple`2 WireMock.Owin.MappingMatcher::Match(WireMock.RequestMessage) +FNDA:49,System.ValueTuple`2 WireMock.Owin.MappingMatcher::Match(WireMock.RequestMessage) +DA:19,49 +DA:20,49 +DA:21,332 +DA:22,332 +DA:23,332 +DA:24,332 +DA:25,332 +DA:26,49 +DA:28,49 +DA:29,1 +DA:30,1 +DA:31,3 +DA:32,3 +DA:33,3 +DA:34,1 +DA:36,2 +DA:38,1 +DA:41,48 +DA:42,48 +DA:43,85 +DA:44,329 +DA:46,48 +DA:48,49 +BRDA:28,73,0,1 +BRDA:30,86,0,1 +BRDA:30,86,1,1 +BRDA:30,122,0,1 +BRDA:30,122,1,1 +BRDA:30,158,0,1 +BRDA:30,158,1,1 +BRDA:36,201,0,1 +BRDA:36,201,1,1 +BRDA:38,235,0,0 +BRDA:38,235,1,1 +BRDA:38,249,0,0 +BRDA:38,249,1,1 +BRDA:28,73,1,48 +BRDA:42,278,0,1 +BRDA:42,278,1,48 +BRDA:42,314,0,1 +BRDA:42,314,1,48 +BRDA:46,348,0,12 +BRDA:46,348,1,36 +BRDA:46,362,0,12 +BRDA:46,362,1,36 +FN:10,System.Void WireMock.Owin.MappingMatcher::.ctor(WireMock.Owin.IWireMockMiddlewareOptions) +FNDA:50,System.Void WireMock.Owin.MappingMatcher::.ctor(WireMock.Owin.IWireMockMiddlewareOptions) +DA:11,50 +DA:12,50 +DA:13,50 +DA:15,50 +DA:16,50 +LF:28 LH:28 -BRF:16 -BRH:10 +BRF:30 +BRH:26 FNF:2 FNH:2 end_of_record -SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Owin\OwinResponseMapper.cs -FN:41,System.Void WireMock.Owin.OwinResponseMapper::SetResponseHeaders(WireMock.ResponseMessage,Microsoft.AspNetCore.Http.HttpResponse) -FNDA:65,System.Void WireMock.Owin.OwinResponseMapper::SetResponseHeaders(WireMock.ResponseMessage,Microsoft.AspNetCore.Http.HttpResponse) -DA:42,65 -DA:44,247 -DA:45,26 -DA:46,26 -DA:47,22 -DA:48,22 -DA:49,22 -DA:51,4 -DA:60,4 -DA:62,4 -DA:63,26 -DA:64,65 -BRDA:44,131,1,26 -BRDA:46,43,0,22 -BRDA:48,64,0,0 -BRDA:48,64,1,22 -BRDA:46,43,1,4 -BRDA:44,131,0,65 -FN:23,System.Void WireMock.Owin.OwinResponseMapper::.ctor() -FNDA:110,System.Void WireMock.Owin.OwinResponseMapper::.ctor() -DA:24,110 -FN:29,System.Void WireMock.Owin.OwinResponseMapper::.cctor() -FNDA:1,System.Void WireMock.Owin.OwinResponseMapper::.cctor() -DA:30,1 -DA:31,1 -DA:32,23 -DA:33,1 -FN:77,System.Void WireMock.Owin.OwinResponseMapper/d__3::MoveNext() -FNDA:65,System.Void WireMock.Owin.OwinResponseMapper/d__3::MoveNext() -DA:78,65 -DA:79,65 -DA:80,0 -DA:81,0 -DA:84,65 -DA:86,65 -DA:87,65 -DA:88,2 -DA:89,2 -DA:90,2 -DA:91,63 -DA:92,0 -DA:93,0 -DA:94,0 -DA:95,63 -DA:96,19 -DA:97,19 -DA:98,19 -DA:99,19 -DA:100,19 -DA:101,44 -DA:102,30 -DA:103,30 -DA:104,30 -DA:106,65 -DA:108,65 -DA:109,51 -DA:110,51 -DA:111,51 -DA:112,65 -BRDA:79,29,0,0 -BRDA:79,29,1,65 -BRDA:87,83,0,2 -BRDA:87,83,1,63 -BRDA:91,125,0,0 -BRDA:91,125,1,63 -BRDA:95,174,0,19 -BRDA:97,206,0,18 -BRDA:97,206,1,1 -BRDA:97,218,0,18 -BRDA:97,218,1,1 -BRDA:99,290,0,2 -BRDA:99,290,1,19 -BRDA:95,174,1,44 -BRDA:101,348,0,30 -BRDA:103,364,0,0 -BRDA:103,364,1,30 -BRDA:101,348,1,65 -BRDA:108,437,0,51 -BRDA:110,485,0,0 -BRDA:110,485,1,51 -BRDA:108,437,1,65 -LF:47 -LH:42 -BRF:28 -BRH:23 -FNF:4 -FNH:4 -end_of_record SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Owin\WireMockMiddleware.cs -FN:161,System.Void WireMock.Owin.WireMockMiddleware::LogRequest(WireMock.Logging.LogEntry,System.Boolean) -FNDA:65,System.Void WireMock.Owin.WireMockMiddleware::LogRequest(WireMock.Logging.LogEntry,System.Boolean) -DA:162,65 -DA:163,65 -DA:165,65 -DA:166,57 -DA:167,57 -DA:168,57 -DA:170,65 -DA:171,3 -DA:172,3 -DA:173,8 +FN:65,System.Threading.Tasks.Task WireMock.Owin.WireMockMiddleware::Invoke(Microsoft.AspNetCore.Http.HttpContext) +FNDA:50,System.Threading.Tasks.Task WireMock.Owin.WireMockMiddleware::Invoke(Microsoft.AspNetCore.Http.HttpContext) +DA:66,50 +DA:67,50 +DA:68,50 +FN:154,System.Void WireMock.Owin.WireMockMiddleware::LogRequest(WireMock.Logging.LogEntry,System.Boolean) +FNDA:50,System.Void WireMock.Owin.WireMockMiddleware::LogRequest(WireMock.Logging.LogEntry,System.Boolean) +DA:155,50 +DA:156,50 +DA:158,50 +DA:159,40 +DA:160,40 +DA:161,40 +DA:163,50 +DA:164,3 +DA:165,3 +DA:166,8 +DA:167,1 +DA:168,1 +DA:169,1 +DA:170,3 +DA:172,50 +DA:173,1 DA:174,1 -DA:175,1 -DA:176,1 -DA:177,3 -DA:179,65 -DA:180,0 -DA:181,0 -DA:183,0 -DA:184,0 -DA:185,0 -DA:186,0 -DA:187,0 -DA:188,0 -DA:189,0 -DA:190,0 -DA:191,0 -DA:192,65 -BRDA:165,48,0,57 -BRDA:165,48,1,65 -BRDA:170,91,0,3 -BRDA:173,171,1,1 -BRDA:173,171,0,3 -BRDA:170,91,1,65 -BRDA:179,197,0,0 -BRDA:183,348,1,0 -BRDA:186,306,0,0 -BRDA:186,306,1,0 -BRDA:183,348,0,0 -BRDA:179,197,1,65 -FN:28,System.Void WireMock.Owin.WireMockMiddleware::.ctor(Microsoft.AspNetCore.Http.RequestDelegate,WireMock.Owin.WireMockMiddlewareOptions) -FNDA:55,System.Void WireMock.Owin.WireMockMiddleware::.ctor(Microsoft.AspNetCore.Http.RequestDelegate,WireMock.Owin.WireMockMiddlewareOptions) -DA:29,55 -DA:30,55 -DA:38,55 -DA:39,55 -DA:40,55 -DA:41,55 -FN:25,System.Void WireMock.Owin.WireMockMiddleware::.cctor() +DA:176,4 +DA:177,1 +DA:178,1 +DA:179,1 +DA:180,1 +DA:181,1 +DA:182,1 +DA:183,1 +DA:184,1 +DA:185,50 +BRDA:158,48,0,40 +BRDA:158,48,1,50 +BRDA:163,91,0,3 +BRDA:166,171,1,1 +BRDA:166,171,0,3 +BRDA:163,91,1,50 +BRDA:172,197,0,1 +BRDA:176,348,1,1 +BRDA:179,306,0,1 +BRDA:179,306,1,1 +BRDA:176,348,0,1 +BRDA:172,197,1,50 +FN:47,System.Void WireMock.Owin.WireMockMiddleware::.ctor(Microsoft.AspNetCore.Http.RequestDelegate,WireMock.Owin.IWireMockMiddlewareOptions,WireMock.Owin.Mappers.IOwinRequestMapper,WireMock.Owin.Mappers.IOwinResponseMapper,WireMock.Owin.IMappingMatcher) +FNDA:51,System.Void WireMock.Owin.WireMockMiddleware::.ctor(Microsoft.AspNetCore.Http.RequestDelegate,WireMock.Owin.IWireMockMiddlewareOptions,WireMock.Owin.Mappers.IOwinRequestMapper,WireMock.Owin.Mappers.IOwinResponseMapper,WireMock.Owin.IMappingMatcher) +DA:48,51 +DA:49,51 +DA:50,51 +DA:51,51 +DA:52,51 +DA:54,51 +DA:55,51 +DA:56,51 +DA:57,51 +DA:58,51 +FN:27,System.Void WireMock.Owin.WireMockMiddleware::.cctor() FNDA:1,System.Void WireMock.Owin.WireMockMiddleware::.cctor() -DA:26,1 -FN:70,<>f__AnonymousType0`2 WireMock.Owin.WireMockMiddleware/<>c__DisplayClass5_0::b__0(WireMock.Mapping) -FNDA:360,<>f__AnonymousType0`2 WireMock.Owin.WireMockMiddleware/<>c__DisplayClass5_0::b__0(WireMock.Mapping) -DA:71,360 -DA:72,360 -DA:73,360 -DA:74,360 -DA:75,360 -BRDA:71,14,0,30 -BRDA:71,14,1,266 -BRDA:71,43,0,266 -BRDA:71,43,1,29 -FN:57,System.Boolean WireMock.Owin.WireMockMiddleware/<>c::b__5_1(WireMock.Mapping) -FNDA:550,System.Boolean WireMock.Owin.WireMockMiddleware/<>c::b__5_1(WireMock.Mapping) -DA:58,550 -BRDA:58,1,0,0 -BRDA:58,1,1,295 -FN:80,System.Boolean WireMock.Owin.WireMockMiddleware/<>c::b__5_2(<>f__AnonymousType0`2) -FNDA:0,System.Boolean WireMock.Owin.WireMockMiddleware/<>c::b__5_2(<>f__AnonymousType0`2) -DA:81,0 -BRDA:81,11,0,0 -BRDA:81,11,1,0 -BRDA:81,24,0,0 -BRDA:81,24,1,0 -FN:81,WireMock.Matchers.Request.RequestMatchResult WireMock.Owin.WireMockMiddleware/<>c::b__5_3(<>f__AnonymousType0`2) -FNDA:0,WireMock.Matchers.Request.RequestMatchResult WireMock.Owin.WireMockMiddleware/<>c::b__5_3(<>f__AnonymousType0`2) -DA:82,0 -FN:82,System.Int32 WireMock.Owin.WireMockMiddleware/<>c::b__5_4(<>f__AnonymousType0`2) -FNDA:0,System.Int32 WireMock.Owin.WireMockMiddleware/<>c::b__5_4(<>f__AnonymousType0`2) -DA:83,0 -FN:85,System.Boolean WireMock.Owin.WireMockMiddleware/<>c::b__5_5(<>f__AnonymousType0`2) -FNDA:0,System.Boolean WireMock.Owin.WireMockMiddleware/<>c::b__5_5(<>f__AnonymousType0`2) -DA:86,0 -FN:93,System.Int32 WireMock.Owin.WireMockMiddleware/<>c::b__5_6(<>f__AnonymousType0`2) -FNDA:117,System.Int32 WireMock.Owin.WireMockMiddleware/<>c::b__5_6(<>f__AnonymousType0`2) -DA:94,117 -FN:94,System.Boolean WireMock.Owin.WireMockMiddleware/<>c::b__5_7(<>f__AnonymousType0`2) -FNDA:360,System.Boolean WireMock.Owin.WireMockMiddleware/<>c::b__5_7(<>f__AnonymousType0`2) -DA:95,360 -FN:48,System.Void WireMock.Owin.WireMockMiddleware/d__5::MoveNext() -FNDA:65,System.Void WireMock.Owin.WireMockMiddleware/d__5::MoveNext() -DA:49,65 -DA:50,65 -DA:52,65 -DA:53,65 -DA:54,65 -DA:55,65 -DA:57,65 -DA:59,30 -DA:61,30 -DA:62,4 -DA:63,4 -DA:64,4 -DA:65,4 -DA:66,4 -DA:67,4 -DA:68,30 -DA:70,65 -DA:76,65 -DA:78,65 -DA:79,0 -DA:80,0 -DA:84,0 -DA:88,0 -DA:89,0 -DA:90,0 -DA:92,65 -DA:93,65 -DA:97,65 -DA:98,65 -DA:99,65 -DA:101,65 -DA:102,14 -DA:103,14 -DA:104,14 -DA:105,14 -DA:106,14 -DA:109,51 -DA:111,51 -DA:112,0 +DA:28,1 +FN:78,System.Boolean WireMock.Owin.WireMockMiddleware/<>c::b__7_0(WireMock.IMapping) +FNDA:489,System.Boolean WireMock.Owin.WireMockMiddleware/<>c::b__7_0(WireMock.IMapping) +DA:79,489 +BRDA:79,1,0,0 +BRDA:79,1,1,279 +FN:70,System.Void WireMock.Owin.WireMockMiddleware/d__7::MoveNext() +FNDA:50,System.Void WireMock.Owin.WireMockMiddleware/d__7::MoveNext() +DA:71,50 +DA:72,50 +DA:74,50 +DA:75,50 +DA:76,50 +DA:78,50 +DA:80,30 +DA:82,30 +DA:83,4 +DA:84,4 +DA:85,4 +DA:86,4 +DA:87,4 +DA:88,4 +DA:89,30 +DA:91,50 +DA:92,50 +DA:94,50 +DA:95,13 +DA:96,13 +DA:97,13 +DA:98,13 +DA:99,13 +DA:102,37 +DA:104,37 +DA:105,2 +DA:106,2 +DA:107,2 +DA:108,2 +DA:109,2 +DA:110,2 +DA:111,2 DA:113,0 -DA:114,0 -DA:115,0 -DA:116,0 -DA:117,0 -DA:118,0 -DA:120,0 -DA:122,51 -DA:123,1 -DA:124,1 -DA:125,1 -DA:127,51 -DA:129,51 -DA:130,9 -DA:131,9 -DA:132,9 -DA:133,9 -DA:134,9 -DA:135,51 -DA:136,0 -DA:137,0 -DA:138,0 -DA:139,0 -DA:140,0 -DA:142,65 -DA:143,65 -DA:144,65 -DA:145,65 -DA:146,65 -DA:147,65 -DA:148,65 -DA:149,65 -DA:150,65 -DA:151,65 -DA:153,65 -DA:155,65 -DA:156,65 -DA:158,51 -DA:159,65 -BRDA:50,121,0,0 -BRDA:50,121,1,65 -BRDA:55,293,0,67 -BRDA:55,293,1,67 -BRDA:55,302,0,66 -BRDA:55,308,0,65 -BRDA:58,352,0,1 -BRDA:58,352,1,65 -BRDA:58,544,1,30 -BRDA:61,447,0,7 -BRDA:61,447,1,23 -BRDA:61,465,0,4 -BRDA:61,465,1,30 -BRDA:58,544,0,65 -BRDA:78,657,0,0 -BRDA:80,676,0,0 -BRDA:80,676,1,0 -BRDA:80,712,0,0 -BRDA:80,712,1,0 -BRDA:80,748,0,0 -BRDA:80,748,1,0 -BRDA:86,801,0,0 -BRDA:86,801,1,0 -BRDA:88,844,0,0 -BRDA:88,844,1,0 -BRDA:89,868,0,0 -BRDA:89,868,1,0 -BRDA:78,657,1,65 -BRDA:93,918,0,1 -BRDA:93,918,1,65 -BRDA:93,954,0,1 -BRDA:93,954,1,65 -BRDA:97,997,0,14 -BRDA:97,997,1,51 -BRDA:98,1021,0,14 -BRDA:98,1021,1,51 -BRDA:101,1058,0,14 -BRDA:101,1058,1,51 -BRDA:111,1167,0,8 -BRDA:111,1167,1,43 -BRDA:111,1195,0,0 -BRDA:114,1245,0,0 -BRDA:114,1245,1,0 -BRDA:114,1297,0,0 -BRDA:114,1297,1,0 -BRDA:111,1195,1,51 -BRDA:122,1383,0,43 -BRDA:122,1417,0,42 -BRDA:122,1417,1,1 -BRDA:122,1383,1,8 -BRDA:122,1443,0,1 -BRDA:124,1490,0,1 -BRDA:55,302,1,1 -BRDA:124,1490,1,1 -BRDA:122,1443,1,51 -BRDA:127,1606,0,1 -BRDA:55,308,1,1 -BRDA:127,1606,1,51 -BRDA:129,1727,0,9 -BRDA:129,1727,1,51 -BRDA:143,2048,0,14 -BRDA:143,2048,1,51 -BRDA:143,2087,0,14 -BRDA:143,2087,1,51 -BRDA:155,2193,0,0 -BRDA:155,2193,1,65 -BRDA:156,2290,0,0 -BRDA:156,2303,0,0 -BRDA:156,2303,1,0 -BRDA:156,2290,1,65 -BRDA:156,2332,1,14 -BRDA:156,2332,0,51 -BRDA:158,2367,0,0 -BRDA:158,2367,1,51 -LF:124 -LH:90 -BRF:96 -BRH:62 -FNF:12 -FNH:8 +DA:115,35 +DA:116,1 +DA:117,1 +DA:118,1 +DA:120,35 +DA:122,35 +DA:123,9 +DA:124,9 +DA:125,9 +DA:126,9 +DA:127,9 +DA:128,35 +DA:129,0 +DA:130,0 +DA:131,0 +DA:132,0 +DA:133,0 +DA:135,50 +DA:136,50 +DA:137,50 +DA:138,50 +DA:139,50 +DA:140,50 +DA:141,50 +DA:142,50 +DA:143,50 +DA:144,50 +DA:146,50 +DA:148,50 +DA:149,50 +DA:151,35 +DA:152,50 +BRDA:72,93,0,0 +BRDA:72,93,1,50 +BRDA:76,240,0,52 +BRDA:76,240,1,52 +BRDA:76,249,0,51 +BRDA:76,255,0,50 +BRDA:79,299,0,1 +BRDA:79,299,1,50 +BRDA:79,491,1,30 +BRDA:82,394,0,8 +BRDA:82,394,1,22 +BRDA:82,412,0,4 +BRDA:82,412,1,30 +BRDA:79,491,0,50 +BRDA:94,588,0,13 +BRDA:94,588,1,37 +BRDA:104,697,0,10 +BRDA:104,697,1,27 +BRDA:104,725,0,2 +BRDA:107,770,0,0 +BRDA:107,770,1,2 +BRDA:107,822,0,2 +BRDA:107,822,1,0 +BRDA:104,725,1,35 +BRDA:115,908,0,27 +BRDA:115,942,0,26 +BRDA:115,942,1,1 +BRDA:115,908,1,8 +BRDA:115,968,0,1 +BRDA:117,1015,0,1 +BRDA:76,249,1,1 +BRDA:117,1015,1,1 +BRDA:115,968,1,35 +BRDA:120,1126,0,1 +BRDA:76,255,1,1 +BRDA:120,1126,1,35 +BRDA:122,1247,0,9 +BRDA:122,1247,1,35 +BRDA:136,1568,0,13 +BRDA:136,1568,1,37 +BRDA:136,1612,0,13 +BRDA:136,1612,1,37 +BRDA:148,1723,0,0 +BRDA:148,1723,1,50 +BRDA:149,1820,0,0 +BRDA:149,1833,0,0 +BRDA:149,1833,1,0 +BRDA:149,1820,1,50 +BRDA:149,1862,1,15 +BRDA:149,1862,0,35 +BRDA:151,1897,0,0 +BRDA:151,1897,1,35 +LF:107 +LH:101 +BRF:66 +BRH:57 +FNF:6 +FNH:6 end_of_record SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Owin\WireMockMiddlewareOptions.cs FN:16,WireMock.Logging.IWireMockLogger WireMock.Owin.WireMockMiddlewareOptions::get_Logger() -FNDA:189,WireMock.Logging.IWireMockLogger WireMock.Owin.WireMockMiddlewareOptions::get_Logger() -DA:17,189 +FNDA:151,WireMock.Logging.IWireMockLogger WireMock.Owin.WireMockMiddlewareOptions::get_Logger() +DA:17,151 FN:18,System.Nullable`1 WireMock.Owin.WireMockMiddlewareOptions::get_RequestProcessingDelay() -FNDA:46,System.Nullable`1 WireMock.Owin.WireMockMiddlewareOptions::get_RequestProcessingDelay() -DA:19,46 +FNDA:30,System.Nullable`1 WireMock.Owin.WireMockMiddlewareOptions::get_RequestProcessingDelay() +DA:19,30 FN:20,WireMock.Matchers.IStringMatcher WireMock.Owin.WireMockMiddlewareOptions::get_AuthorizationMatcher() FNDA:18,WireMock.Matchers.IStringMatcher WireMock.Owin.WireMockMiddlewareOptions::get_AuthorizationMatcher() DA:21,18 FN:22,System.Boolean WireMock.Owin.WireMockMiddlewareOptions::get_AllowPartialMapping() -FNDA:66,System.Boolean WireMock.Owin.WireMockMiddlewareOptions::get_AllowPartialMapping() -DA:23,66 -FN:24,System.Collections.Concurrent.ConcurrentDictionary`2 WireMock.Owin.WireMockMiddlewareOptions::get_Mappings() -FNDA:753,System.Collections.Concurrent.ConcurrentDictionary`2 WireMock.Owin.WireMockMiddlewareOptions::get_Mappings() -DA:25,753 +FNDA:49,System.Boolean WireMock.Owin.WireMockMiddlewareOptions::get_AllowPartialMapping() +DA:23,49 +FN:24,System.Collections.Concurrent.ConcurrentDictionary`2 WireMock.Owin.WireMockMiddlewareOptions::get_Mappings() +FNDA:661,System.Collections.Concurrent.ConcurrentDictionary`2 WireMock.Owin.WireMockMiddlewareOptions::get_Mappings() +DA:25,661 FN:26,System.Collections.Concurrent.ConcurrentDictionary`2 WireMock.Owin.WireMockMiddlewareOptions::get_Scenarios() -FNDA:188,System.Collections.Concurrent.ConcurrentDictionary`2 WireMock.Owin.WireMockMiddlewareOptions::get_Scenarios() -DA:27,188 +FNDA:180,System.Collections.Concurrent.ConcurrentDictionary`2 WireMock.Owin.WireMockMiddlewareOptions::get_Scenarios() +DA:27,180 FN:28,System.Collections.ObjectModel.ObservableCollection`1 WireMock.Owin.WireMockMiddlewareOptions::get_LogEntries() -FNDA:140,System.Collections.ObjectModel.ObservableCollection`1 WireMock.Owin.WireMockMiddlewareOptions::get_LogEntries() -DA:29,140 +FNDA:102,System.Collections.ObjectModel.ObservableCollection`1 WireMock.Owin.WireMockMiddlewareOptions::get_LogEntries() +DA:29,102 FN:30,System.Nullable`1 WireMock.Owin.WireMockMiddlewareOptions::get_RequestLogExpirationDuration() -FNDA:68,System.Nullable`1 WireMock.Owin.WireMockMiddlewareOptions::get_RequestLogExpirationDuration() -DA:31,68 +FNDA:51,System.Nullable`1 WireMock.Owin.WireMockMiddlewareOptions::get_RequestLogExpirationDuration() +DA:31,51 FN:32,System.Nullable`1 WireMock.Owin.WireMockMiddlewareOptions::get_MaxRequestLogCount() -FNDA:72,System.Nullable`1 WireMock.Owin.WireMockMiddlewareOptions::get_MaxRequestLogCount() -DA:33,72 -FN:39,System.Action`1 WireMock.Owin.WireMockMiddlewareOptions::get_PreWireMockMiddlewareInit() -FNDA:110,System.Action`1 WireMock.Owin.WireMockMiddlewareOptions::get_PreWireMockMiddlewareInit() -DA:40,110 -FN:41,System.Action`1 WireMock.Owin.WireMockMiddlewareOptions::get_PostWireMockMiddlewareInit() -FNDA:110,System.Action`1 WireMock.Owin.WireMockMiddlewareOptions::get_PostWireMockMiddlewareInit() -DA:42,110 +FNDA:53,System.Nullable`1 WireMock.Owin.WireMockMiddlewareOptions::get_MaxRequestLogCount() +DA:33,53 +FN:34,System.Action`1 WireMock.Owin.WireMockMiddlewareOptions::get_PreWireMockMiddlewareInit() +FNDA:94,System.Action`1 WireMock.Owin.WireMockMiddlewareOptions::get_PreWireMockMiddlewareInit() +DA:35,94 +FN:36,System.Action`1 WireMock.Owin.WireMockMiddlewareOptions::get_PostWireMockMiddlewareInit() +FNDA:94,System.Action`1 WireMock.Owin.WireMockMiddlewareOptions::get_PostWireMockMiddlewareInit() +DA:37,94 LF:11 LH:11 BRF:0 @@ -4518,32 +4378,190 @@ BRH:0 FNF:11 FNH:11 end_of_record +SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Owin\Mappers\OwinRequestMapper.cs +FN:58,System.ValueTuple`2 WireMock.Owin.Mappers.OwinRequestMapper::ParseRequest(Microsoft.AspNetCore.Http.HttpRequest) +FNDA:46,System.ValueTuple`2 WireMock.Owin.Mappers.OwinRequestMapper::ParseRequest(Microsoft.AspNetCore.Http.HttpRequest) +DA:59,46 +DA:64,46 +DA:65,46 +DA:66,46 +DA:67,46 +DA:68,46 +DA:70,46 +DA:71,46 +BRDA:66,47,0,46 +BRDA:66,47,1,0 +FN:73,System.Boolean WireMock.Owin.Mappers.OwinRequestMapper::ShouldParseBody(System.String) +FNDA:46,System.Boolean WireMock.Owin.Mappers.OwinRequestMapper::ShouldParseBody(System.String) +DA:74,46 +DA:86,46 +DA:87,46 +FN:23,System.Void WireMock.Owin.Mappers.OwinRequestMapper/d__0::MoveNext() +FNDA:46,System.Void WireMock.Owin.Mappers.OwinRequestMapper/d__0::MoveNext() +DA:24,46 +DA:25,46 +DA:27,46 +DA:29,46 +DA:30,46 +DA:31,46 +DA:32,46 +DA:33,262 +DA:34,62 +DA:35,62 +DA:36,62 +DA:37,46 +DA:39,46 +DA:40,46 +DA:41,0 +DA:42,0 +DA:43,0 +DA:44,0 +DA:45,0 +DA:46,0 +DA:47,0 +DA:49,46 +DA:50,46 +DA:51,7 +DA:52,7 +DA:53,7 +DA:55,46 +DA:56,46 +BRDA:30,102,0,46 +BRDA:33,225,1,62 +BRDA:33,225,0,46 +BRDA:30,102,1,46 +BRDA:40,289,0,0 +BRDA:43,407,1,0 +BRDA:43,407,0,0 +BRDA:40,289,1,46 +BRDA:50,462,0,46 +BRDA:50,462,1,0 +BRDA:50,488,0,7 +BRDA:52,535,0,0 +BRDA:52,535,1,7 +BRDA:50,488,1,46 +LF:39 +LH:32 +BRF:16 +BRH:10 +FNF:3 +FNH:3 +end_of_record +SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Owin\Mappers\OwinResponseMapper.cs +FN:75,System.Void WireMock.Owin.Mappers.OwinResponseMapper::SetResponseHeaders(WireMock.ResponseMessage,Microsoft.AspNetCore.Http.HttpResponse) +FNDA:52,System.Void WireMock.Owin.Mappers.OwinResponseMapper::SetResponseHeaders(WireMock.ResponseMessage,Microsoft.AspNetCore.Http.HttpResponse) +DA:76,52 +DA:78,202 +DA:79,23 +DA:80,23 +DA:81,19 +DA:82,19 +DA:83,19 +DA:85,4 +DA:94,4 +DA:96,4 +DA:97,23 +DA:98,52 +BRDA:78,131,1,23 +BRDA:80,43,0,19 +BRDA:82,64,0,0 +BRDA:82,64,1,19 +BRDA:80,43,1,4 +BRDA:78,131,0,52 +FN:25,System.Void WireMock.Owin.Mappers.OwinResponseMapper::.ctor() +FNDA:54,System.Void WireMock.Owin.Mappers.OwinResponseMapper::.ctor() +DA:26,54 +FN:31,System.Void WireMock.Owin.Mappers.OwinResponseMapper::.cctor() +FNDA:1,System.Void WireMock.Owin.Mappers.OwinResponseMapper::.cctor() +DA:32,1 +DA:33,1 +DA:34,20 +DA:35,1 +FN:38,System.Void WireMock.Owin.Mappers.OwinResponseMapper/d__2::MoveNext() +FNDA:53,System.Void WireMock.Owin.Mappers.OwinResponseMapper/d__2::MoveNext() +DA:39,53 +DA:40,53 +DA:41,1 +DA:42,1 +DA:45,52 +DA:47,52 +DA:48,52 +DA:49,1 +DA:50,1 +DA:51,1 +DA:52,51 +DA:53,0 +DA:54,0 +DA:55,0 +DA:56,51 +DA:57,15 +DA:58,15 +DA:59,15 +DA:60,15 +DA:61,15 +DA:62,36 +DA:63,19 +DA:64,19 +DA:65,19 +DA:67,52 +DA:69,52 +DA:70,35 +DA:71,35 +DA:72,35 +DA:73,53 +BRDA:40,29,0,1 +BRDA:40,29,1,52 +BRDA:48,83,0,1 +BRDA:48,83,1,51 +BRDA:52,125,0,0 +BRDA:52,125,1,51 +BRDA:56,174,0,15 +BRDA:58,216,0,15 +BRDA:58,216,1,0 +BRDA:60,288,0,0 +BRDA:60,288,1,15 +BRDA:56,174,1,36 +BRDA:62,346,0,19 +BRDA:64,362,0,0 +BRDA:64,362,1,19 +BRDA:62,346,1,52 +BRDA:69,435,0,35 +BRDA:71,483,0,0 +BRDA:71,483,1,35 +BRDA:69,435,1,52 +LF:47 +LH:44 +BRF:26 +BRH:20 +FNF:4 +FNH:4 +end_of_record SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Models\UrlDetails.cs FN:13,System.Uri WireMock.Models.UrlDetails::get_Url() -FNDA:1251,System.Uri WireMock.Models.UrlDetails::get_Url() -DA:14,1251 +FNDA:1203,System.Uri WireMock.Models.UrlDetails::get_Url() +DA:14,1203 FN:18,System.Uri WireMock.Models.UrlDetails::get_AbsoluteUrl() -FNDA:419,System.Uri WireMock.Models.UrlDetails::get_AbsoluteUrl() -DA:19,419 +FNDA:403,System.Uri WireMock.Models.UrlDetails::get_AbsoluteUrl() +DA:19,403 FN:24,System.Void WireMock.Models.UrlDetails::.ctor(System.String) -FNDA:141,System.Void WireMock.Models.UrlDetails::.ctor(System.String) -DA:25,141 -DA:26,141 -DA:27,141 +FNDA:152,System.Void WireMock.Models.UrlDetails::.ctor(System.String) +DA:25,152 +DA:26,152 +DA:27,152 FN:32,System.Void WireMock.Models.UrlDetails::.ctor(System.Uri) -FNDA:141,System.Void WireMock.Models.UrlDetails::.ctor(System.Uri) -DA:33,141 -DA:34,141 -DA:35,141 +FNDA:152,System.Void WireMock.Models.UrlDetails::.ctor(System.Uri) +DA:33,152 +DA:34,152 +DA:35,152 FN:41,System.Void WireMock.Models.UrlDetails::.ctor(System.Uri,System.Uri) -FNDA:211,System.Void WireMock.Models.UrlDetails::.ctor(System.Uri,System.Uri) -DA:42,211 -DA:43,211 -DA:44,211 -DA:45,211 -DA:47,211 -DA:48,211 -DA:49,211 +FNDA:203,System.Void WireMock.Models.UrlDetails::.ctor(System.Uri,System.Uri) +DA:42,203 +DA:43,203 +DA:44,203 +DA:45,203 +DA:47,203 +DA:48,203 +DA:49,203 LF:15 LH:15 BRF:0 @@ -4553,13 +4571,13 @@ FNH:5 end_of_record SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Matchers\ExactMatcher.cs FN:15,WireMock.Matchers.MatchBehaviour WireMock.Matchers.ExactMatcher::get_MatchBehaviour() -FNDA:25,WireMock.Matchers.MatchBehaviour WireMock.Matchers.ExactMatcher::get_MatchBehaviour() -DA:16,25 +FNDA:23,WireMock.Matchers.MatchBehaviour WireMock.Matchers.ExactMatcher::get_MatchBehaviour() +DA:16,23 FN:40,System.Double WireMock.Matchers.ExactMatcher::IsMatch(System.String) -FNDA:25,System.Double WireMock.Matchers.ExactMatcher::IsMatch(System.String) -DA:41,25 -DA:42,76 -DA:43,25 +FNDA:23,System.Double WireMock.Matchers.ExactMatcher::IsMatch(System.String) +DA:41,23 +DA:42,70 +DA:43,23 FN:46,System.String[] WireMock.Matchers.ExactMatcher::GetPatterns() FNDA:3,System.String[] WireMock.Matchers.ExactMatcher::GetPatterns() DA:47,3 @@ -4716,48 +4734,48 @@ FNH:8 end_of_record SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Matchers\JSONPathMatcher.cs FN:18,WireMock.Matchers.MatchBehaviour WireMock.Matchers.JsonPathMatcher::get_MatchBehaviour() -FNDA:16,WireMock.Matchers.MatchBehaviour WireMock.Matchers.JsonPathMatcher::get_MatchBehaviour() -DA:19,16 +FNDA:14,WireMock.Matchers.MatchBehaviour WireMock.Matchers.JsonPathMatcher::get_MatchBehaviour() +DA:19,14 FN:43,System.Double WireMock.Matchers.JsonPathMatcher::IsMatch(System.String) -FNDA:6,System.Double WireMock.Matchers.JsonPathMatcher::IsMatch(System.String) -DA:44,6 -DA:45,6 -DA:46,6 -DA:47,5 -DA:49,5 -DA:50,5 -DA:51,3 -DA:52,3 +FNDA:5,System.Double WireMock.Matchers.JsonPathMatcher::IsMatch(System.String) +DA:44,5 +DA:45,5 +DA:46,5 +DA:47,4 +DA:49,4 +DA:50,4 +DA:51,2 +DA:52,2 DA:53,2 DA:54,2 DA:56,2 -DA:57,5 -DA:59,6 -DA:60,6 -BRDA:46,17,0,5 -BRDA:46,17,1,6 +DA:57,4 +DA:59,5 +DA:60,5 +BRDA:46,17,0,4 +BRDA:46,17,1,5 FN:63,System.Double WireMock.Matchers.JsonPathMatcher::IsMatch(System.Object) -FNDA:10,System.Double WireMock.Matchers.JsonPathMatcher::IsMatch(System.Object) -DA:64,10 -DA:65,10 -DA:68,10 -DA:69,8 -DA:71,8 -DA:73,8 -DA:74,8 -DA:75,8 +FNDA:9,System.Double WireMock.Matchers.JsonPathMatcher::IsMatch(System.Object) +DA:64,9 +DA:65,9 +DA:68,9 +DA:69,7 +DA:71,7 +DA:73,7 +DA:74,7 +DA:75,7 DA:76,0 DA:77,0 DA:79,0 -DA:80,8 -DA:82,10 -DA:83,10 -BRDA:68,12,0,9 +DA:80,7 +DA:82,9 +DA:83,9 +BRDA:68,12,0,8 BRDA:68,12,1,1 -BRDA:68,31,0,8 +BRDA:68,31,0,7 BRDA:73,43,0,1 -BRDA:73,43,1,7 -BRDA:68,31,1,10 +BRDA:73,43,1,6 +BRDA:68,31,1,9 FN:86,System.String[] WireMock.Matchers.JsonPathMatcher::GetPatterns() FNDA:1,System.String[] WireMock.Matchers.JsonPathMatcher::GetPatterns() DA:87,1 @@ -4767,26 +4785,26 @@ FN:91,System.String WireMock.Matchers.JsonPathMatcher::get_Name() FNDA:1,System.String WireMock.Matchers.JsonPathMatcher::get_Name() DA:92,1 FN:94,System.Double WireMock.Matchers.JsonPathMatcher::IsMatch(Newtonsoft.Json.Linq.JToken) -FNDA:11,System.Double WireMock.Matchers.JsonPathMatcher::IsMatch(Newtonsoft.Json.Linq.JToken) -DA:95,11 -DA:97,11 -DA:99,33 -DA:100,11 -BRDA:97,14,0,11 +FNDA:9,System.Double WireMock.Matchers.JsonPathMatcher::IsMatch(Newtonsoft.Json.Linq.JToken) +DA:95,9 +DA:97,9 +DA:99,27 +DA:100,9 +BRDA:97,14,0,9 BRDA:97,14,1,0 FN:24,System.Void WireMock.Matchers.JsonPathMatcher::.ctor(System.String[]) -FNDA:17,System.Void WireMock.Matchers.JsonPathMatcher::.ctor(System.String[]) -DA:25,17 -DA:26,17 -DA:27,17 +FNDA:15,System.Void WireMock.Matchers.JsonPathMatcher::.ctor(System.String[]) +DA:25,15 +DA:26,15 +DA:27,15 FN:33,System.Void WireMock.Matchers.JsonPathMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String[]) -FNDA:18,System.Void WireMock.Matchers.JsonPathMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String[]) -DA:34,18 -DA:35,18 -DA:36,18 -DA:38,18 -DA:39,18 -DA:40,18 +FNDA:16,System.Void WireMock.Matchers.JsonPathMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String[]) +DA:34,16 +DA:35,16 +DA:36,16 +DA:38,16 +DA:39,16 +DA:40,16 LF:46 LH:43 BRF:10 @@ -4862,14 +4880,14 @@ FNH:9 end_of_record SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Matchers\MatchBehaviourHelper.cs FN:17,System.Double WireMock.Matchers.MatchBehaviourHelper::Convert(WireMock.Matchers.MatchBehaviour,System.Double) -FNDA:788,System.Double WireMock.Matchers.MatchBehaviourHelper::Convert(WireMock.Matchers.MatchBehaviour,System.Double) -DA:18,788 -DA:19,788 -DA:20,770 -DA:21,770 +FNDA:758,System.Double WireMock.Matchers.MatchBehaviourHelper::Convert(WireMock.Matchers.MatchBehaviour,System.Double) +DA:18,758 +DA:19,758 +DA:20,740 +DA:21,740 DA:24,18 -DA:25,788 -BRDA:19,7,0,770 +DA:25,758 +BRDA:19,7,0,740 BRDA:19,7,1,18 BRDA:24,24,0,13 BRDA:24,24,1,5 @@ -4882,19 +4900,19 @@ FNH:1 end_of_record SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Matchers\MatchScores.cs FN:36,System.Double WireMock.Matchers.MatchScores::ToScore(System.Boolean) -FNDA:748,System.Double WireMock.Matchers.MatchScores::ToScore(System.Boolean) -DA:37,748 -DA:38,748 -DA:39,748 -BRDA:38,2,0,429 -BRDA:38,2,1,319 +FNDA:718,System.Double WireMock.Matchers.MatchScores::ToScore(System.Boolean) +DA:37,718 +DA:38,718 +DA:39,718 +BRDA:38,2,0,428 +BRDA:38,2,1,290 FN:46,System.Double WireMock.Matchers.MatchScores::ToScore(System.Collections.Generic.IEnumerable`1) -FNDA:432,System.Double WireMock.Matchers.MatchScores::ToScore(System.Collections.Generic.IEnumerable`1) -DA:47,432 -DA:48,432 -DA:49,432 +FNDA:408,System.Double WireMock.Matchers.MatchScores::ToScore(System.Collections.Generic.IEnumerable`1) +DA:47,408 +DA:48,408 +DA:49,408 BRDA:48,7,0,0 -BRDA:48,7,1,432 +BRDA:48,7,1,408 FN:56,System.Double WireMock.Matchers.MatchScores::ToScore(System.Collections.Generic.IEnumerable`1) FNDA:4,System.Double WireMock.Matchers.MatchScores::ToScore(System.Collections.Generic.IEnumerable`1) DA:57,4 @@ -4911,25 +4929,25 @@ FNH:3 end_of_record SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Matchers\RegexMatcher.cs FN:19,WireMock.Matchers.MatchBehaviour WireMock.Matchers.RegexMatcher::get_MatchBehaviour() -FNDA:390,WireMock.Matchers.MatchBehaviour WireMock.Matchers.RegexMatcher::get_MatchBehaviour() -DA:20,390 +FNDA:370,WireMock.Matchers.MatchBehaviour WireMock.Matchers.RegexMatcher::get_MatchBehaviour() +DA:20,370 FN:74,System.Double WireMock.Matchers.RegexMatcher::IsMatch(System.String) -FNDA:388,System.Double WireMock.Matchers.RegexMatcher::IsMatch(System.String) -DA:75,388 -DA:76,388 -DA:77,388 -DA:78,387 -DA:80,387 -DA:81,1163 -DA:82,387 +FNDA:368,System.Double WireMock.Matchers.RegexMatcher::IsMatch(System.String) +DA:75,368 +DA:76,368 +DA:77,368 +DA:78,367 +DA:80,367 +DA:81,1103 +DA:82,367 DA:83,0 DA:84,0 DA:86,0 -DA:87,387 -DA:89,388 -DA:90,388 -BRDA:77,35,0,387 -BRDA:77,35,1,388 +DA:87,367 +DA:89,368 +DA:90,368 +BRDA:77,35,0,367 +BRDA:77,35,1,368 FN:93,System.String[] WireMock.Matchers.RegexMatcher::GetPatterns() FNDA:3,System.String[] WireMock.Matchers.RegexMatcher::GetPatterns() DA:94,3 @@ -4942,37 +4960,37 @@ FN:101,System.Boolean WireMock.Matchers.RegexMatcher::get_IgnoreCase() FNDA:3,System.Boolean WireMock.Matchers.RegexMatcher::get_IgnoreCase() DA:102,3 FN:26,System.Void WireMock.Matchers.RegexMatcher::.ctor(System.String,System.Boolean) -FNDA:11,System.Void WireMock.Matchers.RegexMatcher::.ctor(System.String,System.Boolean) -DA:27,11 -DA:28,11 -DA:29,11 +FNDA:8,System.Void WireMock.Matchers.RegexMatcher::.ctor(System.String,System.Boolean) +DA:27,8 +DA:28,8 +DA:29,8 FN:36,System.Void WireMock.Matchers.RegexMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String,System.Boolean) -FNDA:114,System.Void WireMock.Matchers.RegexMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String,System.Boolean) -DA:37,114 -DA:38,114 -DA:39,114 +FNDA:98,System.Void WireMock.Matchers.RegexMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String,System.Boolean) +DA:37,98 +DA:38,98 +DA:39,98 FN:45,System.Void WireMock.Matchers.RegexMatcher::.ctor(System.String[],System.Boolean) -FNDA:11,System.Void WireMock.Matchers.RegexMatcher::.ctor(System.String[],System.Boolean) -DA:46,11 -DA:47,11 -DA:48,11 +FNDA:8,System.Void WireMock.Matchers.RegexMatcher::.ctor(System.String[],System.Boolean) +DA:46,8 +DA:47,8 +DA:48,8 FN:55,System.Void WireMock.Matchers.RegexMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String[],System.Boolean) -FNDA:441,System.Void WireMock.Matchers.RegexMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String[],System.Boolean) -DA:56,441 -DA:57,441 -DA:58,441 -DA:60,441 -DA:61,441 -DA:62,441 -DA:64,441 -DA:65,441 +FNDA:408,System.Void WireMock.Matchers.RegexMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String[],System.Boolean) +DA:56,408 +DA:57,408 +DA:58,408 +DA:60,408 +DA:61,408 +DA:62,408 +DA:64,408 +DA:65,408 DA:66,64 DA:67,64 DA:68,64 -DA:70,884 -DA:71,441 +DA:70,818 +DA:71,408 BRDA:65,57,0,64 -BRDA:65,57,1,441 +BRDA:65,57,1,408 LF:41 LH:38 BRF:4 @@ -5081,28 +5099,28 @@ FN:60,System.String WireMock.Matchers.WildcardMatcher::get_Name() FNDA:2,System.String WireMock.Matchers.WildcardMatcher::get_Name() DA:61,2 FN:19,System.Void WireMock.Matchers.WildcardMatcher::.ctor(System.String,System.Boolean) -FNDA:31,System.Void WireMock.Matchers.WildcardMatcher::.ctor(System.String,System.Boolean) -DA:20,31 -DA:21,31 -DA:22,31 +FNDA:30,System.Void WireMock.Matchers.WildcardMatcher::.ctor(System.String,System.Boolean) +DA:20,30 +DA:21,30 +DA:22,30 FN:29,System.Void WireMock.Matchers.WildcardMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String,System.Boolean) -FNDA:279,System.Void WireMock.Matchers.WildcardMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String,System.Boolean) -DA:30,279 -DA:31,279 -DA:32,279 +FNDA:266,System.Void WireMock.Matchers.WildcardMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String,System.Boolean) +DA:30,266 +DA:31,266 +DA:32,266 FN:38,System.Void WireMock.Matchers.WildcardMatcher::.ctor(System.String[],System.Boolean) -FNDA:31,System.Void WireMock.Matchers.WildcardMatcher::.ctor(System.String[],System.Boolean) -DA:39,31 -DA:40,31 -DA:41,31 +FNDA:30,System.Void WireMock.Matchers.WildcardMatcher::.ctor(System.String[],System.Boolean) +DA:39,30 +DA:40,30 +DA:41,30 FN:48,System.Void WireMock.Matchers.WildcardMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String[],System.Boolean) -FNDA:631,System.Void WireMock.Matchers.WildcardMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String[],System.Boolean) -DA:49,631 -DA:50,315 -DA:51,315 -DA:52,315 +FNDA:603,System.Void WireMock.Matchers.WildcardMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String[],System.Boolean) +DA:49,603 +DA:50,301 +DA:51,301 +DA:52,301 BRDA:49,9,0,1 -BRDA:49,9,1,315 +BRDA:49,9,1,301 LF:17 LH:17 BRF:2 @@ -5162,45 +5180,45 @@ FNH:6 end_of_record SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Matchers\Request\RequestMatchResult.cs FN:16,System.Double WireMock.Matchers.Request.RequestMatchResult::get_TotalScore() -FNDA:1933,System.Double WireMock.Matchers.Request.RequestMatchResult::get_TotalScore() -DA:17,1933 +FNDA:1824,System.Double WireMock.Matchers.Request.RequestMatchResult::get_TotalScore() +DA:17,1824 FN:24,System.Int32 WireMock.Matchers.Request.RequestMatchResult::get_TotalNumber() -FNDA:1987,System.Int32 WireMock.Matchers.Request.RequestMatchResult::get_TotalNumber() -DA:25,1987 +FNDA:1865,System.Int32 WireMock.Matchers.Request.RequestMatchResult::get_TotalNumber() +DA:25,1865 FN:32,System.Boolean WireMock.Matchers.Request.RequestMatchResult::get_IsPerfectMatch() -FNDA:346,System.Boolean WireMock.Matchers.Request.RequestMatchResult::get_IsPerfectMatch() -DA:33,346 +FNDA:316,System.Boolean WireMock.Matchers.Request.RequestMatchResult::get_IsPerfectMatch() +DA:33,316 FN:40,System.Double WireMock.Matchers.Request.RequestMatchResult::get_AverageTotalScore() -FNDA:54,System.Double WireMock.Matchers.Request.RequestMatchResult::get_AverageTotalScore() -DA:41,54 -BRDA:41,6,0,52 -BRDA:41,6,1,2 +FNDA:41,System.Double WireMock.Matchers.Request.RequestMatchResult::get_AverageTotalScore() +DA:41,41 +BRDA:41,6,0,41 +BRDA:41,6,1,0 FN:45,System.Collections.Generic.IList`1> WireMock.Matchers.Request.RequestMatchResult::get_MatchDetails() -FNDA:793,System.Collections.Generic.IList`1> WireMock.Matchers.Request.RequestMatchResult::get_MatchDetails() -DA:46,793 +FNDA:751,System.Collections.Generic.IList`1> WireMock.Matchers.Request.RequestMatchResult::get_MatchDetails() +DA:46,751 FN:59,System.Double WireMock.Matchers.Request.RequestMatchResult::AddScore(System.Type,System.Double) -FNDA:742,System.Double WireMock.Matchers.Request.RequestMatchResult::AddScore(System.Type,System.Double) -DA:60,742 -DA:61,742 -DA:62,742 -DA:63,742 -DA:65,742 -DA:66,742 +FNDA:716,System.Double WireMock.Matchers.Request.RequestMatchResult::AddScore(System.Type,System.Double) +DA:60,716 +DA:61,716 +DA:62,716 +DA:63,716 +DA:65,716 +DA:66,716 FN:75,System.Int32 WireMock.Matchers.Request.RequestMatchResult::CompareTo(System.Object) -FNDA:0,System.Int32 WireMock.Matchers.Request.RequestMatchResult::CompareTo(System.Object) -DA:76,0 -DA:77,0 -DA:79,0 -DA:80,0 +FNDA:1,System.Int32 WireMock.Matchers.Request.RequestMatchResult::CompareTo(System.Object) +DA:76,1 +DA:77,1 +DA:79,1 +DA:80,1 FN:50,System.Void WireMock.Matchers.Request.RequestMatchResult::.ctor() -FNDA:758,System.Void WireMock.Matchers.Request.RequestMatchResult::.ctor() -DA:51,758 +FNDA:730,System.Void WireMock.Matchers.Request.RequestMatchResult::.ctor() +DA:51,730 LF:16 -LH:12 +LH:16 BRF:2 -BRH:2 +BRH:1 FNF:8 -FNH:7 +FNH:8 end_of_record SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Matchers\Request\RequestMessageBodyMatcher.cs FN:14,System.Func`2 WireMock.Matchers.Request.RequestMessageBodyMatcher::get_Func() @@ -5213,34 +5231,34 @@ FN:24,System.Func`2 WireMock.Matchers.Request.Requ FNDA:4,System.Func`2 WireMock.Matchers.Request.RequestMessageBodyMatcher::get_JsonFunc() DA:25,4 FN:29,WireMock.Matchers.IMatcher WireMock.Matchers.Request.RequestMessageBodyMatcher::get_Matcher() -FNDA:52,WireMock.Matchers.IMatcher WireMock.Matchers.Request.RequestMessageBodyMatcher::get_Matcher() -DA:30,52 +FNDA:38,WireMock.Matchers.IMatcher WireMock.Matchers.Request.RequestMessageBodyMatcher::get_Matcher() +DA:30,38 FN:100,System.Double WireMock.Matchers.Request.RequestMessageBodyMatcher::GetMatchingScore(WireMock.RequestMessage,WireMock.Matchers.Request.RequestMatchResult) -FNDA:30,System.Double WireMock.Matchers.Request.RequestMessageBodyMatcher::GetMatchingScore(WireMock.RequestMessage,WireMock.Matchers.Request.RequestMatchResult) -DA:101,30 -DA:102,30 -DA:103,30 -DA:104,30 +FNDA:22,System.Double WireMock.Matchers.Request.RequestMessageBodyMatcher::GetMatchingScore(WireMock.RequestMessage,WireMock.Matchers.Request.RequestMatchResult) +DA:101,22 +DA:102,22 +DA:103,22 +DA:104,22 FN:106,System.Double WireMock.Matchers.Request.RequestMessageBodyMatcher::IsMatch(WireMock.RequestMessage) -FNDA:30,System.Double WireMock.Matchers.Request.RequestMessageBodyMatcher::IsMatch(WireMock.RequestMessage) -DA:107,30 -DA:109,30 -DA:110,11 -DA:112,11 -DA:113,6 -DA:114,6 -DA:118,5 +FNDA:22,System.Double WireMock.Matchers.Request.RequestMessageBodyMatcher::IsMatch(WireMock.RequestMessage) +DA:107,22 +DA:109,22 +DA:110,9 +DA:112,9 +DA:113,5 +DA:114,5 +DA:118,4 DA:119,2 DA:120,2 -DA:122,3 -DA:125,22 -DA:126,19 -DA:128,19 -DA:129,4 -DA:130,4 -DA:134,15 -DA:135,13 -DA:136,13 +DA:122,2 +DA:125,15 +DA:126,12 +DA:128,12 +DA:129,1 +DA:130,1 +DA:134,11 +DA:135,9 +DA:136,9 DA:138,2 DA:140,5 DA:141,1 @@ -5252,19 +5270,19 @@ DA:150,3 DA:151,1 DA:152,1 DA:155,2 -DA:156,30 -BRDA:109,19,0,11 -BRDA:112,33,0,6 -BRDA:112,33,1,5 +DA:156,22 +BRDA:109,19,0,9 +BRDA:112,33,0,5 +BRDA:112,33,1,4 BRDA:118,68,0,2 -BRDA:118,68,1,3 -BRDA:109,19,1,22 -BRDA:125,111,0,19 -BRDA:128,120,0,5 -BRDA:128,120,1,14 -BRDA:128,138,0,4 -BRDA:128,138,1,15 -BRDA:134,173,0,13 +BRDA:118,68,1,2 +BRDA:109,19,1,15 +BRDA:125,111,0,12 +BRDA:128,120,0,2 +BRDA:128,120,1,10 +BRDA:128,138,0,1 +BRDA:128,138,1,11 +BRDA:134,173,0,9 BRDA:134,173,1,2 BRDA:125,111,1,5 BRDA:140,209,0,1 @@ -5316,12 +5334,12 @@ DA:85,1 DA:86,1 DA:87,1 FN:92,System.Void WireMock.Matchers.Request.RequestMessageBodyMatcher::.ctor(WireMock.Matchers.IMatcher) -FNDA:30,System.Void WireMock.Matchers.Request.RequestMessageBodyMatcher::.ctor(WireMock.Matchers.IMatcher) -DA:93,30 -DA:94,30 -DA:95,30 -DA:96,30 -DA:97,30 +FNDA:23,System.Void WireMock.Matchers.Request.RequestMessageBodyMatcher::.ctor(WireMock.Matchers.IMatcher) +DA:93,23 +DA:94,23 +DA:95,23 +DA:96,23 +DA:97,23 LF:67 LH:67 BRF:26 @@ -5387,31 +5405,31 @@ FNH:7 end_of_record SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Matchers\Request\RequestMessageCompositeMatcher.cs FN:20,System.Collections.Generic.IEnumerable`1 WireMock.Matchers.Request.RequestMessageCompositeMatcher::get_RequestMatchers() -FNDA:691,System.Collections.Generic.IEnumerable`1 WireMock.Matchers.Request.RequestMessageCompositeMatcher::get_RequestMatchers() -DA:21,691 +FNDA:657,System.Collections.Generic.IEnumerable`1 WireMock.Matchers.Request.RequestMessageCompositeMatcher::get_RequestMatchers() +DA:21,657 FN:37,System.Double WireMock.Matchers.Request.RequestMessageCompositeMatcher::GetMatchingScore(WireMock.RequestMessage,WireMock.Matchers.Request.RequestMatchResult) -FNDA:347,System.Double WireMock.Matchers.Request.RequestMessageCompositeMatcher::GetMatchingScore(WireMock.RequestMessage,WireMock.Matchers.Request.RequestMatchResult) -DA:38,347 -DA:39,347 -DA:40,3 -DA:41,3 -DA:44,344 -DA:45,343 -DA:46,1024 +FNDA:329,System.Double WireMock.Matchers.Request.RequestMessageCompositeMatcher::GetMatchingScore(WireMock.RequestMessage,WireMock.Matchers.Request.RequestMatchResult) +DA:38,329 +DA:39,329 +DA:40,1 +DA:41,1 +DA:44,328 +DA:45,327 +DA:46,978 DA:49,3 -DA:50,347 -BRDA:39,37,0,3 -BRDA:39,37,1,344 -BRDA:44,63,0,343 +DA:50,329 +BRDA:39,37,0,1 +BRDA:39,37,1,328 +BRDA:44,63,0,327 BRDA:44,63,1,1 FN:27,System.Void WireMock.Matchers.Request.RequestMessageCompositeMatcher::.ctor(System.Collections.Generic.IEnumerable`1,WireMock.Matchers.Request.CompositeMatcherType) -FNDA:329,System.Void WireMock.Matchers.Request.RequestMessageCompositeMatcher::.ctor(System.Collections.Generic.IEnumerable`1,WireMock.Matchers.Request.CompositeMatcherType) -DA:28,329 -DA:29,329 -DA:30,329 -DA:32,329 -DA:33,329 -DA:34,329 +FNDA:315,System.Void WireMock.Matchers.Request.RequestMessageCompositeMatcher::.ctor(System.Collections.Generic.IEnumerable`1,WireMock.Matchers.Request.CompositeMatcherType) +DA:28,315 +DA:29,315 +DA:30,315 +DA:32,315 +DA:33,315 +DA:34,315 LF:16 LH:16 BRF:4 @@ -5590,27 +5608,27 @@ FNH:9 end_of_record SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Matchers\Request\RequestMessageMethodMatcher.cs FN:17,System.String[] WireMock.Matchers.Request.RequestMessageMethodMatcher::get_Methods() -FNDA:292,System.String[] WireMock.Matchers.Request.RequestMessageMethodMatcher::get_Methods() -DA:18,292 +FNDA:287,System.String[] WireMock.Matchers.Request.RequestMessageMethodMatcher::get_Methods() +DA:18,287 FN:34,System.Double WireMock.Matchers.Request.RequestMessageMethodMatcher::GetMatchingScore(WireMock.RequestMessage,WireMock.Matchers.Request.RequestMatchResult) -FNDA:292,System.Double WireMock.Matchers.Request.RequestMessageMethodMatcher::GetMatchingScore(WireMock.RequestMessage,WireMock.Matchers.Request.RequestMatchResult) -DA:35,292 -DA:36,292 -DA:37,292 -DA:38,292 +FNDA:286,System.Double WireMock.Matchers.Request.RequestMessageMethodMatcher::GetMatchingScore(WireMock.RequestMessage,WireMock.Matchers.Request.RequestMatchResult) +DA:35,286 +DA:36,286 +DA:37,286 +DA:38,286 FN:40,System.Double WireMock.Matchers.Request.RequestMessageMethodMatcher::IsMatch(WireMock.RequestMessage) -FNDA:292,System.Double WireMock.Matchers.Request.RequestMessageMethodMatcher::IsMatch(WireMock.RequestMessage) -DA:41,292 -DA:42,292 -DA:43,292 +FNDA:286,System.Double WireMock.Matchers.Request.RequestMessageMethodMatcher::IsMatch(WireMock.RequestMessage) +DA:41,286 +DA:42,286 +DA:43,286 FN:24,System.Void WireMock.Matchers.Request.RequestMessageMethodMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String[]) -FNDA:258,System.Void WireMock.Matchers.Request.RequestMessageMethodMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String[]) -DA:25,258 -DA:26,258 -DA:27,258 -DA:28,258 -DA:30,258 -DA:31,258 +FNDA:254,System.Void WireMock.Matchers.Request.RequestMessageMethodMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String[]) +DA:25,254 +DA:26,254 +DA:27,254 +DA:28,254 +DA:30,254 +DA:31,254 LF:14 LH:14 BRF:0 @@ -5713,46 +5731,46 @@ FNH:9 end_of_record SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Matchers\Request\RequestMessagePathMatcher.cs FN:16,System.Collections.Generic.IReadOnlyList`1 WireMock.Matchers.Request.RequestMessagePathMatcher::get_Matchers() -FNDA:625,System.Collections.Generic.IReadOnlyList`1 WireMock.Matchers.Request.RequestMessagePathMatcher::get_Matchers() -DA:17,625 +FNDA:593,System.Collections.Generic.IReadOnlyList`1 WireMock.Matchers.Request.RequestMessagePathMatcher::get_Matchers() +DA:17,593 FN:21,System.Func`2[] WireMock.Matchers.Request.RequestMessagePathMatcher::get_Funcs() FNDA:2,System.Func`2[] WireMock.Matchers.Request.RequestMessagePathMatcher::get_Funcs() DA:22,2 FN:56,System.Double WireMock.Matchers.Request.RequestMessagePathMatcher::GetMatchingScore(WireMock.RequestMessage,WireMock.Matchers.Request.RequestMatchResult) -FNDA:312,System.Double WireMock.Matchers.Request.RequestMessagePathMatcher::GetMatchingScore(WireMock.RequestMessage,WireMock.Matchers.Request.RequestMatchResult) -DA:57,312 -DA:58,312 -DA:59,312 -DA:60,312 +FNDA:296,System.Double WireMock.Matchers.Request.RequestMessagePathMatcher::GetMatchingScore(WireMock.RequestMessage,WireMock.Matchers.Request.RequestMatchResult) +DA:57,296 +DA:58,296 +DA:59,296 +DA:60,296 FN:62,System.Double WireMock.Matchers.Request.RequestMessagePathMatcher::IsMatch(WireMock.RequestMessage) -FNDA:312,System.Double WireMock.Matchers.Request.RequestMessagePathMatcher::IsMatch(WireMock.RequestMessage) -DA:63,312 -DA:64,312 -DA:65,311 -DA:66,624 +FNDA:296,System.Double WireMock.Matchers.Request.RequestMessagePathMatcher::IsMatch(WireMock.RequestMessage) +DA:63,296 +DA:64,296 +DA:65,295 +DA:66,592 DA:69,1 DA:70,1 DA:71,2 DA:74,0 -DA:75,312 -BRDA:64,25,0,311 +DA:75,296 +BRDA:64,25,0,295 BRDA:64,25,1,1 BRDA:69,65,0,1 BRDA:71,79,0,1 BRDA:71,79,1,0 BRDA:69,65,1,0 FN:28,System.Void WireMock.Matchers.Request.RequestMessagePathMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String[]) -FNDA:421,System.Void WireMock.Matchers.Request.RequestMessagePathMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String[]) -DA:29,421 -DA:30,210 -DA:31,210 +FNDA:395,System.Void WireMock.Matchers.Request.RequestMessagePathMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String[]) +DA:29,395 +DA:30,197 +DA:31,197 FN:36,System.Void WireMock.Matchers.Request.RequestMessagePathMatcher::.ctor(WireMock.Matchers.IStringMatcher[]) -FNDA:277,System.Void WireMock.Matchers.Request.RequestMessagePathMatcher::.ctor(WireMock.Matchers.IStringMatcher[]) -DA:37,277 -DA:38,277 -DA:39,277 -DA:41,277 -DA:42,277 +FNDA:263,System.Void WireMock.Matchers.Request.RequestMessagePathMatcher::.ctor(WireMock.Matchers.IStringMatcher[]) +DA:37,263 +DA:38,263 +DA:39,263 +DA:41,263 +DA:42,263 FN:47,System.Void WireMock.Matchers.Request.RequestMessagePathMatcher::.ctor(System.Func`2[]) FNDA:1,System.Void WireMock.Matchers.Request.RequestMessagePathMatcher::.ctor(System.Func`2[]) DA:48,1 @@ -5853,23 +5871,23 @@ FNH:7 end_of_record SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Logging\LogEntry.cs FN:16,System.Guid WireMock.Logging.LogEntry::get_Guid() -FNDA:134,System.Guid WireMock.Logging.LogEntry::get_Guid() -DA:17,134 +FNDA:104,System.Guid WireMock.Logging.LogEntry::get_Guid() +DA:17,104 FN:24,WireMock.RequestMessage WireMock.Logging.LogEntry::get_RequestMessage() -FNDA:1166,WireMock.RequestMessage WireMock.Logging.LogEntry::get_RequestMessage() -DA:25,1166 +FNDA:893,WireMock.RequestMessage WireMock.Logging.LogEntry::get_RequestMessage() +DA:25,893 FN:32,WireMock.ResponseMessage WireMock.Logging.LogEntry::get_ResponseMessage() -FNDA:950,WireMock.ResponseMessage WireMock.Logging.LogEntry::get_ResponseMessage() -DA:33,950 +FNDA:752,WireMock.ResponseMessage WireMock.Logging.LogEntry::get_ResponseMessage() +DA:33,752 FN:40,WireMock.Matchers.Request.RequestMatchResult WireMock.Logging.LogEntry::get_RequestMatchResult() -FNDA:389,WireMock.Matchers.Request.RequestMatchResult WireMock.Logging.LogEntry::get_RequestMatchResult() -DA:41,389 +FNDA:279,WireMock.Matchers.Request.RequestMatchResult WireMock.Logging.LogEntry::get_RequestMatchResult() +DA:41,279 FN:48,System.Nullable`1 WireMock.Logging.LogEntry::get_MappingGuid() -FNDA:134,System.Nullable`1 WireMock.Logging.LogEntry::get_MappingGuid() -DA:49,134 +FNDA:104,System.Nullable`1 WireMock.Logging.LogEntry::get_MappingGuid() +DA:49,104 FN:56,System.String WireMock.Logging.LogEntry::get_MappingTitle() -FNDA:134,System.String WireMock.Logging.LogEntry::get_MappingTitle() -DA:57,134 +FNDA:104,System.String WireMock.Logging.LogEntry::get_MappingTitle() +DA:57,104 LF:6 LH:6 BRF:0 @@ -5927,25 +5945,25 @@ FNH:0 end_of_record SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Logging\WireMockNullLogger.cs FN:12,System.Void WireMock.Logging.WireMockNullLogger::Debug(System.String,System.Object[]) -FNDA:54,System.Void WireMock.Logging.WireMockNullLogger::Debug(System.String,System.Object[]) -DA:13,54 -DA:15,54 +FNDA:44,System.Void WireMock.Logging.WireMockNullLogger::Debug(System.String,System.Object[]) +DA:13,44 +DA:15,44 FN:18,System.Void WireMock.Logging.WireMockNullLogger::Info(System.String,System.Object[]) -FNDA:115,System.Void WireMock.Logging.WireMockNullLogger::Info(System.String,System.Object[]) -DA:19,115 -DA:21,115 +FNDA:95,System.Void WireMock.Logging.WireMockNullLogger::Info(System.String,System.Object[]) +DA:19,95 +DA:21,95 FN:24,System.Void WireMock.Logging.WireMockNullLogger::Warn(System.String,System.Object[]) -FNDA:14,System.Void WireMock.Logging.WireMockNullLogger::Warn(System.String,System.Object[]) -DA:25,14 -DA:27,14 +FNDA:11,System.Void WireMock.Logging.WireMockNullLogger::Warn(System.String,System.Object[]) +DA:25,11 +DA:27,11 FN:30,System.Void WireMock.Logging.WireMockNullLogger::Error(System.String,System.Object[]) FNDA:0,System.Void WireMock.Logging.WireMockNullLogger::Error(System.String,System.Object[]) DA:31,0 DA:33,0 FN:36,System.Void WireMock.Logging.WireMockNullLogger::DebugRequestResponse(WireMock.Admin.Requests.LogEntryModel,System.Boolean) -FNDA:65,System.Void WireMock.Logging.WireMockNullLogger::DebugRequestResponse(WireMock.Admin.Requests.LogEntryModel,System.Boolean) -DA:37,65 -DA:39,65 +FNDA:46,System.Void WireMock.Logging.WireMockNullLogger::DebugRequestResponse(WireMock.Admin.Requests.LogEntryModel,System.Boolean) +DA:37,46 +DA:39,46 LF:10 LH:8 BRF:0 @@ -6311,23 +6329,23 @@ FNH:0 end_of_record SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Admin\Requests\LogEntryModel.cs FN:12,System.Guid WireMock.Admin.Requests.LogEntryModel::get_Guid() -FNDA:77,System.Guid WireMock.Admin.Requests.LogEntryModel::get_Guid() -DA:13,77 +FNDA:62,System.Guid WireMock.Admin.Requests.LogEntryModel::get_Guid() +DA:13,62 FN:17,WireMock.Admin.Requests.LogRequestModel WireMock.Admin.Requests.LogEntryModel::get_Request() -FNDA:93,WireMock.Admin.Requests.LogRequestModel WireMock.Admin.Requests.LogEntryModel::get_Request() -DA:18,93 +FNDA:78,WireMock.Admin.Requests.LogRequestModel WireMock.Admin.Requests.LogEntryModel::get_Request() +DA:18,78 FN:22,WireMock.Admin.Requests.LogResponseModel WireMock.Admin.Requests.LogEntryModel::get_Response() -FNDA:81,WireMock.Admin.Requests.LogResponseModel WireMock.Admin.Requests.LogEntryModel::get_Response() -DA:23,81 +FNDA:66,WireMock.Admin.Requests.LogResponseModel WireMock.Admin.Requests.LogEntryModel::get_Response() +DA:23,66 FN:27,System.Nullable`1 WireMock.Admin.Requests.LogEntryModel::get_MappingGuid() -FNDA:73,System.Nullable`1 WireMock.Admin.Requests.LogEntryModel::get_MappingGuid() -DA:28,73 +FNDA:58,System.Nullable`1 WireMock.Admin.Requests.LogEntryModel::get_MappingGuid() +DA:28,58 FN:32,System.String WireMock.Admin.Requests.LogEntryModel::get_MappingTitle() -FNDA:73,System.String WireMock.Admin.Requests.LogEntryModel::get_MappingTitle() -DA:33,73 +FNDA:58,System.String WireMock.Admin.Requests.LogEntryModel::get_MappingTitle() +DA:33,58 FN:37,WireMock.Admin.Requests.LogRequestMatchModel WireMock.Admin.Requests.LogEntryModel::get_RequestMatchResult() -FNDA:73,WireMock.Admin.Requests.LogRequestMatchModel WireMock.Admin.Requests.LogEntryModel::get_RequestMatchResult() -DA:38,73 +FNDA:58,WireMock.Admin.Requests.LogRequestMatchModel WireMock.Admin.Requests.LogEntryModel::get_RequestMatchResult() +DA:38,58 LF:6 LH:6 BRF:0 @@ -6337,20 +6355,20 @@ FNH:6 end_of_record SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Admin\Requests\LogRequestMatchModel.cs FN:15,System.Double WireMock.Admin.Requests.LogRequestMatchModel::get_TotalScore() -FNDA:51,System.Double WireMock.Admin.Requests.LogRequestMatchModel::get_TotalScore() -DA:16,51 +FNDA:35,System.Double WireMock.Admin.Requests.LogRequestMatchModel::get_TotalScore() +DA:16,35 FN:23,System.Int32 WireMock.Admin.Requests.LogRequestMatchModel::get_TotalNumber() -FNDA:51,System.Int32 WireMock.Admin.Requests.LogRequestMatchModel::get_TotalNumber() -DA:24,51 +FNDA:35,System.Int32 WireMock.Admin.Requests.LogRequestMatchModel::get_TotalNumber() +DA:24,35 FN:31,System.Boolean WireMock.Admin.Requests.LogRequestMatchModel::get_IsPerfectMatch() -FNDA:51,System.Boolean WireMock.Admin.Requests.LogRequestMatchModel::get_IsPerfectMatch() -DA:32,51 +FNDA:35,System.Boolean WireMock.Admin.Requests.LogRequestMatchModel::get_IsPerfectMatch() +DA:32,35 FN:39,System.Double WireMock.Admin.Requests.LogRequestMatchModel::get_AverageTotalScore() -FNDA:51,System.Double WireMock.Admin.Requests.LogRequestMatchModel::get_AverageTotalScore() -DA:40,51 +FNDA:35,System.Double WireMock.Admin.Requests.LogRequestMatchModel::get_AverageTotalScore() +DA:40,35 FN:47,System.Collections.Generic.IList`1 WireMock.Admin.Requests.LogRequestMatchModel::get_MatchDetails() -FNDA:51,System.Collections.Generic.IList`1 WireMock.Admin.Requests.LogRequestMatchModel::get_MatchDetails() -DA:48,51 +FNDA:35,System.Collections.Generic.IList`1 WireMock.Admin.Requests.LogRequestMatchModel::get_MatchDetails() +DA:48,35 LF:5 LH:5 BRF:0 @@ -6360,47 +6378,47 @@ FNH:5 end_of_record SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Admin\Requests\LogRequestModel.cs FN:15,System.String WireMock.Admin.Requests.LogRequestModel::get_ClientIP() -FNDA:77,System.String WireMock.Admin.Requests.LogRequestModel::get_ClientIP() -DA:16,77 +FNDA:62,System.String WireMock.Admin.Requests.LogRequestModel::get_ClientIP() +DA:16,62 FN:20,System.DateTime WireMock.Admin.Requests.LogRequestModel::get_DateTime() -FNDA:77,System.DateTime WireMock.Admin.Requests.LogRequestModel::get_DateTime() -DA:21,77 +FNDA:62,System.DateTime WireMock.Admin.Requests.LogRequestModel::get_DateTime() +DA:21,62 FN:25,System.String WireMock.Admin.Requests.LogRequestModel::get_Path() -FNDA:79,System.String WireMock.Admin.Requests.LogRequestModel::get_Path() -DA:26,79 +FNDA:64,System.String WireMock.Admin.Requests.LogRequestModel::get_Path() +DA:26,64 FN:30,System.String WireMock.Admin.Requests.LogRequestModel::get_AbsolutePath() -FNDA:77,System.String WireMock.Admin.Requests.LogRequestModel::get_AbsolutePath() -DA:31,77 +FNDA:62,System.String WireMock.Admin.Requests.LogRequestModel::get_AbsolutePath() +DA:31,62 FN:35,System.String WireMock.Admin.Requests.LogRequestModel::get_Url() -FNDA:77,System.String WireMock.Admin.Requests.LogRequestModel::get_Url() -DA:36,77 +FNDA:62,System.String WireMock.Admin.Requests.LogRequestModel::get_Url() +DA:36,62 FN:40,System.String WireMock.Admin.Requests.LogRequestModel::get_AbsoluteUrl() -FNDA:77,System.String WireMock.Admin.Requests.LogRequestModel::get_AbsoluteUrl() -DA:41,77 +FNDA:62,System.String WireMock.Admin.Requests.LogRequestModel::get_AbsoluteUrl() +DA:41,62 FN:45,System.Collections.Generic.IDictionary`2> WireMock.Admin.Requests.LogRequestModel::get_Query() -FNDA:73,System.Collections.Generic.IDictionary`2> WireMock.Admin.Requests.LogRequestModel::get_Query() -DA:46,73 +FNDA:58,System.Collections.Generic.IDictionary`2> WireMock.Admin.Requests.LogRequestModel::get_Query() +DA:46,58 FN:50,System.String WireMock.Admin.Requests.LogRequestModel::get_Method() -FNDA:81,System.String WireMock.Admin.Requests.LogRequestModel::get_Method() -DA:51,81 +FNDA:66,System.String WireMock.Admin.Requests.LogRequestModel::get_Method() +DA:51,66 FN:55,System.Collections.Generic.IDictionary`2> WireMock.Admin.Requests.LogRequestModel::get_Headers() -FNDA:81,System.Collections.Generic.IDictionary`2> WireMock.Admin.Requests.LogRequestModel::get_Headers() -DA:56,81 +FNDA:66,System.Collections.Generic.IDictionary`2> WireMock.Admin.Requests.LogRequestModel::get_Headers() +DA:56,66 FN:60,System.Collections.Generic.IDictionary`2 WireMock.Admin.Requests.LogRequestModel::get_Cookies() -FNDA:73,System.Collections.Generic.IDictionary`2 WireMock.Admin.Requests.LogRequestModel::get_Cookies() -DA:61,73 +FNDA:58,System.Collections.Generic.IDictionary`2 WireMock.Admin.Requests.LogRequestModel::get_Cookies() +DA:61,58 FN:65,System.String WireMock.Admin.Requests.LogRequestModel::get_Body() -FNDA:81,System.String WireMock.Admin.Requests.LogRequestModel::get_Body() -DA:66,81 +FNDA:66,System.String WireMock.Admin.Requests.LogRequestModel::get_Body() +DA:66,66 FN:70,System.Object WireMock.Admin.Requests.LogRequestModel::get_BodyAsJson() -FNDA:77,System.Object WireMock.Admin.Requests.LogRequestModel::get_BodyAsJson() -DA:71,77 +FNDA:62,System.Object WireMock.Admin.Requests.LogRequestModel::get_BodyAsJson() +DA:71,62 FN:75,System.Byte[] WireMock.Admin.Requests.LogRequestModel::get_BodyAsBytes() -FNDA:73,System.Byte[] WireMock.Admin.Requests.LogRequestModel::get_BodyAsBytes() -DA:76,73 +FNDA:58,System.Byte[] WireMock.Admin.Requests.LogRequestModel::get_BodyAsBytes() +DA:76,58 FN:80,WireMock.Admin.Mappings.EncodingModel WireMock.Admin.Requests.LogRequestModel::get_BodyEncoding() -FNDA:77,WireMock.Admin.Mappings.EncodingModel WireMock.Admin.Requests.LogRequestModel::get_BodyEncoding() -DA:81,77 +FNDA:62,WireMock.Admin.Mappings.EncodingModel WireMock.Admin.Requests.LogRequestModel::get_BodyEncoding() +DA:81,62 LF:14 LH:14 BRF:0 @@ -6410,35 +6428,35 @@ FNH:14 end_of_record SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Admin\Requests\LogResponseModel.cs FN:14,System.Int32 WireMock.Admin.Requests.LogResponseModel::get_StatusCode() -FNDA:150,System.Int32 WireMock.Admin.Requests.LogResponseModel::get_StatusCode() -DA:15,150 +FNDA:120,System.Int32 WireMock.Admin.Requests.LogResponseModel::get_StatusCode() +DA:15,120 FN:19,System.Collections.Generic.IDictionary`2> WireMock.Admin.Requests.LogResponseModel::get_Headers() -FNDA:81,System.Collections.Generic.IDictionary`2> WireMock.Admin.Requests.LogResponseModel::get_Headers() -DA:20,81 +FNDA:66,System.Collections.Generic.IDictionary`2> WireMock.Admin.Requests.LogResponseModel::get_Headers() +DA:20,66 FN:24,System.String WireMock.Admin.Requests.LogResponseModel::get_BodyDestination() -FNDA:73,System.String WireMock.Admin.Requests.LogResponseModel::get_BodyDestination() -DA:25,73 +FNDA:58,System.String WireMock.Admin.Requests.LogResponseModel::get_BodyDestination() +DA:25,58 FN:29,System.String WireMock.Admin.Requests.LogResponseModel::get_Body() -FNDA:73,System.String WireMock.Admin.Requests.LogResponseModel::get_Body() -DA:30,73 +FNDA:58,System.String WireMock.Admin.Requests.LogResponseModel::get_Body() +DA:30,58 FN:34,System.Object WireMock.Admin.Requests.LogResponseModel::get_BodyAsJson() -FNDA:81,System.Object WireMock.Admin.Requests.LogResponseModel::get_BodyAsJson() -DA:35,81 +FNDA:66,System.Object WireMock.Admin.Requests.LogResponseModel::get_BodyAsJson() +DA:35,66 FN:39,System.Byte[] WireMock.Admin.Requests.LogResponseModel::get_BodyAsBytes() -FNDA:73,System.Byte[] WireMock.Admin.Requests.LogResponseModel::get_BodyAsBytes() -DA:40,73 +FNDA:58,System.Byte[] WireMock.Admin.Requests.LogResponseModel::get_BodyAsBytes() +DA:40,58 FN:44,System.String WireMock.Admin.Requests.LogResponseModel::get_BodyAsFile() -FNDA:73,System.String WireMock.Admin.Requests.LogResponseModel::get_BodyAsFile() -DA:45,73 +FNDA:58,System.String WireMock.Admin.Requests.LogResponseModel::get_BodyAsFile() +DA:45,58 FN:49,System.Nullable`1 WireMock.Admin.Requests.LogResponseModel::get_BodyAsFileIsCached() -FNDA:73,System.Nullable`1 WireMock.Admin.Requests.LogResponseModel::get_BodyAsFileIsCached() -DA:50,73 +FNDA:58,System.Nullable`1 WireMock.Admin.Requests.LogResponseModel::get_BodyAsFileIsCached() +DA:50,58 FN:54,System.String WireMock.Admin.Requests.LogResponseModel::get_BodyOriginal() -FNDA:73,System.String WireMock.Admin.Requests.LogResponseModel::get_BodyOriginal() -DA:55,73 +FNDA:58,System.String WireMock.Admin.Requests.LogResponseModel::get_BodyOriginal() +DA:55,58 FN:59,WireMock.Admin.Mappings.EncodingModel WireMock.Admin.Requests.LogResponseModel::get_BodyEncoding() -FNDA:81,WireMock.Admin.Mappings.EncodingModel WireMock.Admin.Requests.LogResponseModel::get_BodyEncoding() -DA:60,81 +FNDA:66,WireMock.Admin.Mappings.EncodingModel WireMock.Admin.Requests.LogResponseModel::get_BodyEncoding() +DA:60,66 LF:10 LH:10 BRF:0 @@ -6484,14 +6502,14 @@ FNH:0 end_of_record SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Admin\Mappings\EncodingModel.cs FN:10,System.Int32 WireMock.Admin.Mappings.EncodingModel::get_CodePage() -FNDA:107,System.Int32 WireMock.Admin.Mappings.EncodingModel::get_CodePage() -DA:11,107 +FNDA:87,System.Int32 WireMock.Admin.Mappings.EncodingModel::get_CodePage() +DA:11,87 FN:15,System.String WireMock.Admin.Mappings.EncodingModel::get_EncodingName() -FNDA:101,System.String WireMock.Admin.Mappings.EncodingModel::get_EncodingName() -DA:16,101 +FNDA:81,System.String WireMock.Admin.Mappings.EncodingModel::get_EncodingName() +DA:16,81 FN:20,System.String WireMock.Admin.Mappings.EncodingModel::get_WebName() -FNDA:101,System.String WireMock.Admin.Mappings.EncodingModel::get_WebName() -DA:21,101 +FNDA:81,System.String WireMock.Admin.Mappings.EncodingModel::get_WebName() +DA:21,81 LF:3 LH:3 BRF:0 @@ -6683,11 +6701,11 @@ FNH:16 end_of_record SF:C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Admin\Mappings\StatusModel.cs FN:12,System.Nullable`1 WireMock.Admin.Mappings.StatusModel::get_Guid() -FNDA:40,System.Nullable`1 WireMock.Admin.Mappings.StatusModel::get_Guid() -DA:13,40 +FNDA:36,System.Nullable`1 WireMock.Admin.Mappings.StatusModel::get_Guid() +DA:13,36 FN:17,System.String WireMock.Admin.Mappings.StatusModel::get_Status() -FNDA:44,System.String WireMock.Admin.Mappings.StatusModel::get_Status() -DA:18,44 +FNDA:41,System.String WireMock.Admin.Mappings.StatusModel::get_Status() +DA:18,41 LF:2 LH:2 BRF:0 diff --git a/report/coverage.opencover.xml b/report/coverage.opencover.xml index 36e38b8de..2b226f784 100644 --- a/report/coverage.opencover.xml +++ b/report/coverage.opencover.xml @@ -1,10 +1,10 @@  - + - + C:\Users\azureuser\Documents\Github\WireMock.Net\test\WireMock.Net.Tests\bin\Debug\netcoreapp2.1\WireMock.Net.dll - 2018-09-21T12:00:14 + 2018-09-26T09:51:43 WireMock.Net @@ -46,61 +46,62 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -113,10 +114,10 @@ System.Guid WireMock.Mapping::get_Guid() - + - + @@ -124,10 +125,10 @@ System.String WireMock.Mapping::get_Title() - + - + @@ -135,10 +136,10 @@ System.String WireMock.Mapping::get_Path() - + - + @@ -146,10 +147,10 @@ System.Int32 WireMock.Mapping::get_Priority() - + - + @@ -157,10 +158,10 @@ System.String WireMock.Mapping::get_Scenario() - + - + @@ -168,10 +169,10 @@ System.String WireMock.Mapping::get_ExecutionConditionState() - + - + @@ -179,10 +180,10 @@ System.String WireMock.Mapping::get_NextState() - + - + @@ -190,10 +191,10 @@ WireMock.Matchers.Request.IRequestMatcher WireMock.Mapping::get_RequestMatcher() - + - + @@ -201,10 +202,10 @@ WireMock.ResponseProviders.IResponseProvider WireMock.Mapping::get_Provider() - + - + @@ -212,17 +213,17 @@ System.Boolean WireMock.Mapping::get_IsStartState() - + - - - - - - + + + + + + - + @@ -230,22 +231,22 @@ WireMock.Matchers.Request.RequestMatchResult WireMock.Mapping::GetRequestMatchResult(WireMock.RequestMessage,System.String) - - - - - - - - - - + + + + + + + + + + - - + + - + @@ -253,15 +254,15 @@ System.Boolean WireMock.Mapping::get_IsAdminInterface() - + - - - - + + + + - + @@ -269,21 +270,21 @@ System.Void WireMock.Mapping::.ctor(System.Guid,System.String,System.String,WireMock.Matchers.Request.IRequestMatcher,WireMock.ResponseProviders.IResponseProvider,System.Int32,System.String,System.String,System.String) - - - - - - - - - - - - + + + + + + + + + + + + - + @@ -297,15 +298,15 @@ System.Void WireMock.Mapping/<ResponseToAsync>d__31::MoveNext() - - - + + + - - + + - + @@ -319,7 +320,7 @@ System.String WireMock.RequestMessage::get_ClientIP() - + @@ -330,7 +331,7 @@ System.String WireMock.RequestMessage::get_Url() - + @@ -341,7 +342,7 @@ System.String WireMock.RequestMessage::get_AbsoluteUrl() - + @@ -352,7 +353,7 @@ System.DateTime WireMock.RequestMessage::get_DateTime() - + @@ -363,7 +364,7 @@ System.String WireMock.RequestMessage::get_Path() - + @@ -374,7 +375,7 @@ System.String WireMock.RequestMessage::get_AbsolutePath() - + @@ -407,7 +408,7 @@ System.String WireMock.RequestMessage::get_Method() - + @@ -418,7 +419,7 @@ System.Collections.Generic.IDictionary`2<System.String,WireMock.Util.WireMockList`1<System.String>> WireMock.RequestMessage::get_Headers() - + @@ -429,7 +430,7 @@ System.Collections.Generic.IDictionary`2<System.String,System.String> WireMock.RequestMessage::get_Cookies() - + @@ -440,7 +441,7 @@ System.Collections.Generic.IDictionary`2<System.String,WireMock.Util.WireMockList`1<System.String>> WireMock.RequestMessage::get_Query() - + @@ -451,7 +452,7 @@ System.String WireMock.RequestMessage::get_RawQuery() - + @@ -462,7 +463,7 @@ System.String WireMock.RequestMessage::get_Body() - + @@ -473,7 +474,7 @@ System.Object WireMock.RequestMessage::get_BodyAsJson() - + @@ -484,7 +485,7 @@ System.Byte[] WireMock.RequestMessage::get_BodyAsBytes() - + @@ -495,7 +496,7 @@ System.String WireMock.RequestMessage::get_Host() - + @@ -506,7 +507,7 @@ System.String WireMock.RequestMessage::get_Protocol() - + @@ -517,7 +518,7 @@ System.Int32 WireMock.RequestMessage::get_Port() - + @@ -539,7 +540,7 @@ System.Text.Encoding WireMock.RequestMessage::get_BodyEncoding() - + @@ -550,10 +551,10 @@ System.Collections.Generic.IDictionary`2<System.String,WireMock.Util.WireMockList`1<System.String>> WireMock.RequestMessage::ParseQuery(System.String) - - - - + + + + @@ -577,10 +578,10 @@ - + - + @@ -616,48 +617,48 @@ System.Void WireMock.RequestMessage::.ctor(WireMock.Models.UrlDetails,System.String,System.String,WireMock.Util.BodyData,System.Collections.Generic.IDictionary`2<System.String,System.String[]>,System.Collections.Generic.IDictionary`2<System.String,System.String>) - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - - - + + + - + - + @@ -678,7 +679,7 @@ System.Collections.Generic.IDictionary`2<System.String,WireMock.Util.WireMockList`1<System.String>> WireMock.ResponseMessage::get_Headers() - + @@ -689,7 +690,7 @@ System.Int32 WireMock.ResponseMessage::get_StatusCode() - + @@ -700,7 +701,7 @@ System.String WireMock.ResponseMessage::get_BodyOriginal() - + @@ -711,7 +712,7 @@ System.String WireMock.ResponseMessage::get_BodyDestination() - + @@ -722,7 +723,7 @@ System.String WireMock.ResponseMessage::get_Body() - + @@ -733,7 +734,7 @@ System.Object WireMock.ResponseMessage::get_BodyAsJson() - + @@ -744,7 +745,7 @@ System.Nullable`1<System.Boolean> WireMock.ResponseMessage::get_BodyAsJsonIndented() - + @@ -755,7 +756,7 @@ System.Byte[] WireMock.ResponseMessage::get_BodyAsBytes() - + @@ -766,7 +767,7 @@ System.String WireMock.ResponseMessage::get_BodyAsFile() - + @@ -777,7 +778,7 @@ System.Nullable`1<System.Boolean> WireMock.ResponseMessage::get_BodyAsFileIsCached() - + @@ -788,7 +789,7 @@ System.Text.Encoding WireMock.ResponseMessage::get_BodyEncoding() - + @@ -812,16 +813,16 @@ System.Void WireMock.ResponseMessage::AddHeader(System.String,System.String[]) - - - - - - - + + + + + + + - + @@ -829,28 +830,28 @@ - + WireMock.ResponseMessageBuilder - - + + WireMock.ResponseMessage WireMock.ResponseMessageBuilder::Create(System.String,System.Int32,System.Nullable`1<System.Guid>) - - - - - - - - - + + + + + + + + + - - + + @@ -950,17 +951,17 @@ T WireMock.Validation.Check::NotNull(T,System.String) - - + + - - + + - + @@ -991,18 +992,18 @@ System.Collections.Generic.IList`1<T> WireMock.Validation.Check::NotNullOrEmpty(System.Collections.Generic.IList`1<T>,System.String) - - - + + + - - + + - + @@ -1070,7 +1071,7 @@ - + @@ -1175,7 +1176,7 @@ System.Text.Encoding WireMock.Util.BodyData::get_Encoding() - + @@ -1186,7 +1187,7 @@ System.String WireMock.Util.BodyData::get_BodyAsString() - + @@ -1197,7 +1198,7 @@ System.Object WireMock.Util.BodyData::get_BodyAsJson() - + @@ -1208,7 +1209,7 @@ System.Byte[] WireMock.Util.BodyData::get_BodyAsBytes() - + @@ -1253,18 +1254,18 @@ System.Void WireMock.Util.BodyParser/<ReadStringAsync>d__2::MoveNext() - - - - - - + + + + + + - + - + @@ -1307,7 +1308,7 @@ System.Boolean WireMock.Util.BodyParser/<>c__DisplayClass4_0::<Parse>b__0(System.String) - + @@ -1318,7 +1319,7 @@ System.Boolean WireMock.Util.BodyParser/<>c__DisplayClass4_0::<Parse>b__1(System.String) - + @@ -1335,55 +1336,55 @@ System.Void WireMock.Util.BodyParser/<Parse>d__4::MoveNext() - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - + - - + + - + - - + + - + - - - + + + - + - + @@ -1402,12 +1403,12 @@ System.Void WireMock.Util.ConcurentObservableCollection`1::ClearItems() - - - - - - + + + + + + @@ -1418,12 +1419,12 @@ System.Void WireMock.Util.ConcurentObservableCollection`1::RemoveItem(System.Int32) - - - - - - + + + + + + @@ -1434,12 +1435,12 @@ System.Void WireMock.Util.ConcurentObservableCollection`1::InsertItem(System.Int32,T) - - - - - - + + + + + + @@ -1482,8 +1483,8 @@ System.Void WireMock.Util.ConcurentObservableCollection`1::.ctor() - - + + @@ -2035,21 +2036,21 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + @@ -2065,20 +2066,20 @@ System.Int32 WireMock.Util.PortUtils::FindFreeTcpPort() - - - - - - - - - - + + + + + + + + + + - - + + @@ -2088,21 +2089,21 @@ System.Boolean WireMock.Util.PortUtils::TryExtract(System.String,System.String&,System.String&,System.Int32&) - - - - - - - - - - + + + + + + + + + + - + - + @@ -2163,17 +2164,17 @@ WireMock.Models.UrlDetails WireMock.Util.UrlUtils::Parse(System.Uri,Microsoft.AspNetCore.Http.PathString) - - - - + + + + - + - + @@ -2239,9 +2240,9 @@ System.Void WireMock.Util.WireMockList`1::.ctor(T[]) - - - + + + @@ -2757,7 +2758,7 @@ System.Nullable`1<System.Int32> WireMock.Settings.FluentMockServerSettings::get_Port() - + @@ -2768,7 +2769,7 @@ System.Nullable`1<System.Boolean> WireMock.Settings.FluentMockServerSettings::get_UseSSL() - + @@ -2779,7 +2780,7 @@ System.Nullable`1<System.Boolean> WireMock.Settings.FluentMockServerSettings::get_StartAdminInterface() - + @@ -2790,7 +2791,7 @@ System.Nullable`1<System.Boolean> WireMock.Settings.FluentMockServerSettings::get_ReadStaticMappings() - + @@ -2801,7 +2802,7 @@ System.Nullable`1<System.Boolean> WireMock.Settings.FluentMockServerSettings::get_WatchStaticMappings() - + @@ -2812,7 +2813,7 @@ WireMock.Settings.IProxyAndRecordSettings WireMock.Settings.FluentMockServerSettings::get_ProxyAndRecordSettings() - + @@ -2823,7 +2824,7 @@ System.String[] WireMock.Settings.FluentMockServerSettings::get_Urls() - + @@ -2834,7 +2835,7 @@ System.Int32 WireMock.Settings.FluentMockServerSettings::get_StartTimeout() - + @@ -2845,7 +2846,7 @@ System.Nullable`1<System.Boolean> WireMock.Settings.FluentMockServerSettings::get_AllowPartialMapping() - + @@ -2856,7 +2857,7 @@ System.String WireMock.Settings.FluentMockServerSettings::get_AdminUsername() - + @@ -2867,7 +2868,7 @@ System.String WireMock.Settings.FluentMockServerSettings::get_AdminPassword() - + @@ -2878,7 +2879,7 @@ System.Nullable`1<System.Int32> WireMock.Settings.FluentMockServerSettings::get_RequestLogExpirationDuration() - + @@ -2889,7 +2890,7 @@ System.Nullable`1<System.Int32> WireMock.Settings.FluentMockServerSettings::get_MaxRequestLogCount() - + @@ -2900,7 +2901,7 @@ System.Action`1<System.Object> WireMock.Settings.FluentMockServerSettings::get_PreWireMockMiddlewareInit() - + @@ -2911,7 +2912,7 @@ System.Action`1<System.Object> WireMock.Settings.FluentMockServerSettings::get_PostWireMockMiddlewareInit() - + @@ -2922,7 +2923,7 @@ WireMock.Logging.IWireMockLogger WireMock.Settings.FluentMockServerSettings::get_Logger() - + @@ -2933,7 +2934,7 @@ WireMock.Handlers.IFileSystemHandler WireMock.Settings.FluentMockServerSettings::get_FileSystemHandler() - + @@ -3002,7 +3003,7 @@ - + WireMock.Server.FluentMockServer @@ -3174,7 +3175,7 @@ - + System.Void WireMock.Server.FluentMockServer::InitProxyAndRecord(WireMock.Settings.IFluentMockServerSettings) @@ -3190,17 +3191,15 @@ - - - - + + - WireMock.Mapping WireMock.Server.FluentMockServer::ToMapping(WireMock.RequestMessage,WireMock.ResponseMessage,System.String[]) + WireMock.IMapping WireMock.Server.FluentMockServer::ToMapping(WireMock.RequestMessage,WireMock.ResponseMessage,System.String[]) @@ -3367,7 +3366,7 @@ - System.Void WireMock.Server.FluentMockServer::SaveMappingToFile(WireMock.Mapping,System.String) + System.Void WireMock.Server.FluentMockServer::SaveMappingToFile(WireMock.IMapping,System.String) @@ -3840,8 +3839,8 @@ - - + + WireMock.ResponseBuilders.IResponseBuilder WireMock.Server.FluentMockServer::InitResponseBuilder(WireMock.Admin.Mappings.ResponseModel) @@ -3909,40 +3908,36 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4007,18 +4002,18 @@ System.Void WireMock.Server.FluentMockServer::.ctor(WireMock.Settings.IFluentMockServerSettings) - - - - - - - - - - - - + + + + + + + + + + + + @@ -4082,7 +4077,7 @@ - + WireMock.Server.FluentMockServer @@ -4105,7 +4100,7 @@ System.Collections.Generic.List`1<System.Int32> WireMock.Server.FluentMockServer::get_Ports() - + @@ -4116,7 +4111,7 @@ System.String[] WireMock.Server.FluentMockServer::get_Urls() - + @@ -4124,7 +4119,7 @@ - System.Collections.Generic.IEnumerable`1<WireMock.Mapping> WireMock.Server.FluentMockServer::get_Mappings() + System.Collections.Generic.IEnumerable`1<WireMock.IMapping> WireMock.Server.FluentMockServer::get_Mappings() @@ -4182,10 +4177,10 @@ WireMock.Server.FluentMockServer WireMock.Server.FluentMockServer::Start(WireMock.Settings.IFluentMockServerSettings) - - - - + + + + @@ -4196,13 +4191,13 @@ WireMock.Server.FluentMockServer WireMock.Server.FluentMockServer::Start(System.Nullable`1<System.Int32>,System.Boolean) - - - - - - - + + + + + + + @@ -4285,18 +4280,18 @@ System.Void WireMock.Server.FluentMockServer::Stop() - - - - + + + + - - - - + + + + - + @@ -4304,18 +4299,18 @@ System.Void WireMock.Server.FluentMockServer::AddCatchAllMapping() - - - - - - + + + + + + - - + + - + @@ -4323,13 +4318,13 @@ System.Void WireMock.Server.FluentMockServer::Reset() - - - - + + + + - + @@ -4337,20 +4332,20 @@ System.Void WireMock.Server.FluentMockServer::ResetMappings() - - - - - - + + + + + + - - - - + + + + - + @@ -4358,18 +4353,18 @@ System.Boolean WireMock.Server.FluentMockServer::DeleteMapping(System.Guid) - - - - - - + + + + + + - - + + - + @@ -4377,13 +4372,13 @@ System.Boolean WireMock.Server.FluentMockServer::DeleteMapping(System.String) - - - - + + + + - + @@ -4391,26 +4386,26 @@ System.Void WireMock.Server.FluentMockServer::AddGlobalProcessingDelay(System.TimeSpan) - - - + + + - + - - + + System.Void WireMock.Server.FluentMockServer::AllowPartialMapping(System.Boolean) - - - - + + + + - + @@ -4418,15 +4413,15 @@ System.Void WireMock.Server.FluentMockServer::SetBasicAuthentication(System.String,System.String) - - - - - - + + + + + + - + @@ -4434,12 +4429,12 @@ System.Void WireMock.Server.FluentMockServer::RemoveBasicAuthentication() - - - + + + - + @@ -4447,25 +4442,25 @@ System.Void WireMock.Server.FluentMockServer::SetMaxRequestLogCount(System.Nullable`1<System.Int32>) - - - + + + - + - - + + System.Void WireMock.Server.FluentMockServer::SetRequestLogExpirationDuration(System.Nullable`1<System.Int32>) - - - + + + - + @@ -4473,12 +4468,12 @@ System.Void WireMock.Server.FluentMockServer::ResetScenarios() - - - + + + - + @@ -4486,81 +4481,81 @@ WireMock.Server.IRespondWithAProvider WireMock.Server.FluentMockServer::Given(WireMock.Matchers.Request.IRequestMatcher) - - - + + + - + - System.Void WireMock.Server.FluentMockServer::RegisterMapping(WireMock.Mapping) + System.Void WireMock.Server.FluentMockServer::RegisterMapping(WireMock.IMapping) - - - - - - - - - + + + + + + + + + - - + + - + - - + + System.Void WireMock.Server.FluentMockServer::.ctor(WireMock.Settings.IFluentMockServerSettings) - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - + - - - - - - - - + + + + + + + + @@ -4568,76 +4563,70 @@ - + - + - + - - - - - + + + + + + + + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + WireMock.Server.FluentMockServer @@ -4668,47 +4657,47 @@ System.Collections.Generic.IEnumerable`1<WireMock.Logging.LogEntry> WireMock.Server.FluentMockServer::get_LogEntries() - + - - + + System.Collections.Generic.IEnumerable`1<WireMock.Logging.LogEntry> WireMock.Server.FluentMockServer::FindLogEntries(WireMock.Matchers.Request.IRequestMatcher[]) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4716,9 +4705,9 @@ System.Void WireMock.Server.FluentMockServer::ResetLogEntries() - - - + + + @@ -4756,7 +4745,7 @@ System.Guid WireMock.Server.RespondWithAProvider::get_Guid() - + @@ -4767,9 +4756,9 @@ System.Void WireMock.Server.RespondWithAProvider::RespondWith(WireMock.ResponseProviders.IResponseProvider) - - - + + + @@ -4903,11 +4892,11 @@ System.Void WireMock.Server.RespondWithAProvider::.ctor(WireMock.RegistrationCallback,WireMock.Matchers.Request.IRequestMatcher) - - - - - + + + + + @@ -4915,85 +4904,85 @@ - + WireMock.Serialization.LogEntryMapper - - + + WireMock.Admin.Requests.LogEntryModel WireMock.Serialization.LogEntryMapper::Map(WireMock.Logging.LogEntry) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -5006,7 +4995,7 @@ - WireMock.Admin.Mappings.MappingModel WireMock.Serialization.MappingConverter::ToMappingModel(WireMock.Mapping) + WireMock.Admin.Mappings.MappingModel WireMock.Serialization.MappingConverter::ToMappingModel(WireMock.IMapping) @@ -5214,11 +5203,11 @@ - + WireMock.Serialization.MatcherMapper - - + + WireMock.Matchers.IMatcher WireMock.Serialization.MatcherMapper::Map(WireMock.Admin.Mappings.MatcherModel) @@ -5255,56 +5244,50 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5477,7 +5460,7 @@ - + WireMock.ResponseBuilders.Response @@ -5486,7 +5469,7 @@ System.Nullable`1<System.TimeSpan> WireMock.ResponseBuilders.Response::get_Delay() - + @@ -5497,7 +5480,7 @@ System.Boolean WireMock.ResponseBuilders.Response::get_UseTransformer() - + @@ -5508,7 +5491,7 @@ System.String WireMock.ResponseBuilders.Response::get_ProxyUrl() - + @@ -5530,7 +5513,7 @@ WireMock.ResponseMessage WireMock.ResponseBuilders.Response::get_ResponseMessage() - + @@ -5541,27 +5524,38 @@ System.Func`2<WireMock.RequestMessage,WireMock.ResponseMessage> WireMock.ResponseBuilders.Response::get_Callback() - + + + + + System.Boolean WireMock.ResponseBuilders.Response::get_WithCallbackUsed() + + + + + + + WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::Create(WireMock.ResponseMessage) - - - - + + + + - - + + - + @@ -5569,13 +5563,13 @@ WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::Create(System.Func`1<WireMock.ResponseMessage>) - - - - + + + + - + @@ -5583,13 +5577,13 @@ WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithStatusCode(System.Int32) - - - - + + + + - + @@ -5597,12 +5591,12 @@ WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithStatusCode(System.Net.HttpStatusCode) - - - + + + - + @@ -5610,12 +5604,12 @@ WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithSuccess() - - - + + + - + @@ -5623,12 +5617,12 @@ WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithNotFound() - - - + + + - + @@ -5636,14 +5630,14 @@ WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithHeader(System.String,System.String[]) - - - - - + + + + + - + @@ -5651,19 +5645,19 @@ WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithHeaders(System.Collections.Generic.IDictionary`2<System.String,System.String>) - - - - - + + + + + - - - - + + + + - + @@ -5671,19 +5665,19 @@ WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithHeaders(System.Collections.Generic.IDictionary`2<System.String,System.String[]>) - - - - - + + + + + - - - - + + + + - + @@ -5691,13 +5685,13 @@ WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithHeaders(System.Collections.Generic.IDictionary`2<System.String,WireMock.Util.WireMockList`1<System.String>>) - - - - + + + + - + @@ -5705,18 +5699,18 @@ WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithBody(System.Func`2<WireMock.RequestMessage,System.String>,System.String,System.Text.Encoding) - - - - - - - - - + + + + + + + + + - + @@ -5724,28 +5718,28 @@ WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithBody(System.Byte[],System.String,System.Text.Encoding) - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -5753,29 +5747,29 @@ WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithBodyFromFile(System.String,System.Boolean) - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -5783,36 +5777,36 @@ WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithBody(System.String,System.String,System.Text.Encoding) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5820,17 +5814,17 @@ WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithBodyAsJson(System.Object,System.Text.Encoding,System.Nullable`1<System.Boolean>) - - - - - - - - + + + + + + + + - + @@ -5838,12 +5832,12 @@ WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithBodyAsJson(System.Object,System.Boolean) - - - + + + - + @@ -5851,20 +5845,20 @@ WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithBodyFromBase64(System.String,System.Text.Encoding) - - - - - - - - + + + + + + + + - - + + - + @@ -5872,13 +5866,13 @@ WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithTransformer() - - - - + + + + - + @@ -5886,17 +5880,17 @@ WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithDelay(System.TimeSpan) - - - - - + + + + + - - + + - + @@ -5904,12 +5898,12 @@ WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithDelay(System.Int32) - - - + + + - + @@ -5917,16 +5911,16 @@ WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithProxy(System.String,System.String) - - - - - - - + + + + + + + - + @@ -5934,28 +5928,43 @@ WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithProxy(WireMock.Settings.IProxyAndRecordSettings) - - - - + + + + - + - + WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithCallback(System.Func`2<WireMock.RequestMessage,WireMock.ResponseMessage>) - - - - - + + + + + + + + + + + + WireMock.ResponseBuilders.IResponseBuilder WireMock.ResponseBuilders.Response::WithCallbackInternal(System.Boolean,System.Func`2<WireMock.RequestMessage,WireMock.ResponseMessage>) + + + + + + + + - + @@ -5963,80 +5972,85 @@ System.Void WireMock.ResponseBuilders.Response::.ctor(WireMock.ResponseMessage) - - - - + + + + - + - - WireMock.ResponseBuilders.Response/<ProvideResponseAsync>d__48 + + WireMock.ResponseBuilders.Response/<ProvideResponseAsync>d__53 - - + + - System.Void WireMock.ResponseBuilders.Response/<ProvideResponseAsync>d__48::MoveNext() + System.Void WireMock.ResponseBuilders.Response/<ProvideResponseAsync>d__53::MoveNext() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - WireMock.ResponseBuilders.Response/<>c__DisplayClass35_0 + WireMock.ResponseBuilders.Response/<>c__DisplayClass39_0 @@ -6049,9 +6063,9 @@ WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::Create() - - - + + + @@ -6152,11 +6166,11 @@ WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::WithPath(WireMock.Matchers.IStringMatcher[]) - - - - - + + + + + @@ -6167,9 +6181,9 @@ WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::WithPath(System.String[]) - - - + + + @@ -6180,11 +6194,11 @@ WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::WithPath(WireMock.Matchers.MatchBehaviour,System.String[]) - - - - - + + + + + @@ -6282,10 +6296,10 @@ WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::UsingGet(WireMock.Matchers.MatchBehaviour) - - - - + + + + @@ -6324,10 +6338,10 @@ WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::UsingPatch(WireMock.Matchers.MatchBehaviour) - - - - + + + + @@ -6352,20 +6366,20 @@ WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::UsingAnyMethod() - - - + + + - - + + - + - + @@ -6388,9 +6402,9 @@ WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::UsingMethod(System.String[]) - - - + + + @@ -6414,11 +6428,11 @@ WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::UsingMethod(WireMock.Matchers.MatchBehaviour,System.String[]) - - - - - + + + + + @@ -6471,11 +6485,11 @@ WireMock.RequestBuilders.IRequestBuilder WireMock.RequestBuilders.Request::WithBody(WireMock.Matchers.IMatcher) - - - - - + + + + + @@ -6750,10 +6764,10 @@ System.Void WireMock.RequestBuilders.Request::.ctor(System.Collections.Generic.IList`1<WireMock.Matchers.Request.IRequestMatcher>) - - - - + + + + @@ -6761,7 +6775,7 @@ - + WireMock.Owin.AspNetCoreSelfHost @@ -6770,10 +6784,10 @@ System.Boolean WireMock.Owin.AspNetCoreSelfHost::get_IsStarted() - + - + @@ -6781,10 +6795,10 @@ System.Collections.Generic.List`1<System.String> WireMock.Owin.AspNetCoreSelfHost::get_Urls() - + - + @@ -6792,10 +6806,10 @@ System.Collections.Generic.List`1<System.Int32> WireMock.Owin.AspNetCoreSelfHost::get_Ports() - + - + @@ -6803,66 +6817,73 @@ System.Exception WireMock.Owin.AspNetCoreSelfHost::get_RunningException() - + - + - + System.Threading.Tasks.Task WireMock.Owin.AspNetCoreSelfHost::StartAsync() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6870,25 +6891,25 @@ System.Void WireMock.Owin.AspNetCoreSelfHost::StartServers() - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + @@ -6896,49 +6917,49 @@ System.Threading.Tasks.Task WireMock.Owin.AspNetCoreSelfHost::StopAsync() - - - - - + + + + + - + - System.Void WireMock.Owin.AspNetCoreSelfHost::.ctor(WireMock.Owin.WireMockMiddlewareOptions,System.String[]) + System.Void WireMock.Owin.AspNetCoreSelfHost::.ctor(WireMock.Owin.IWireMockMiddlewareOptions,System.String[]) - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - + WireMock.Owin.GlobalExceptionMiddleware @@ -6947,774 +6968,774 @@ Microsoft.AspNetCore.Http.RequestDelegate WireMock.Owin.GlobalExceptionMiddleware::get_Next() - + - + - - + + - System.Void WireMock.Owin.GlobalExceptionMiddleware::.ctor(Microsoft.AspNetCore.Http.RequestDelegate,WireMock.Owin.WireMockMiddlewareOptions) + System.Threading.Tasks.Task WireMock.Owin.GlobalExceptionMiddleware::Invoke(Microsoft.AspNetCore.Http.HttpContext) - - - - - - + + + - + - - - - - WireMock.Owin.GlobalExceptionMiddleware/<Invoke>d__6 - - - + + - System.Void WireMock.Owin.GlobalExceptionMiddleware/<Invoke>d__6::MoveNext() + System.Void WireMock.Owin.GlobalExceptionMiddleware::.ctor(Microsoft.AspNetCore.Http.RequestDelegate,WireMock.Owin.IWireMockMiddlewareOptions,WireMock.Owin.Mappers.IOwinResponseMapper) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - WireMock.Owin.OwinRequestMapper - - - - - System.Boolean WireMock.Owin.OwinRequestMapper::ShouldParseBody(System.String) - - - - - + + + + + + + + - + - - WireMock.Owin.OwinRequestMapper/<MapAsync>d__0 + + WireMock.Owin.GlobalExceptionMiddleware/<InvokeInternal>d__7 - - + + - System.Void WireMock.Owin.OwinRequestMapper/<MapAsync>d__0::MoveNext() - + System.Void WireMock.Owin.GlobalExceptionMiddleware/<InvokeInternal>d__7::MoveNext() + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - WireMock.Owin.OwinResponseMapper + + WireMock.Owin.MappingMatcher - - - - System.Void WireMock.Owin.OwinResponseMapper::SetResponseHeaders(WireMock.ResponseMessage,Microsoft.AspNetCore.Http.HttpResponse) - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - System.Void WireMock.Owin.OwinResponseMapper::.ctor() - + System.ValueTuple`2<WireMock.IMapping,WireMock.Matchers.Request.RequestMatchResult> WireMock.Owin.MappingMatcher::Match(WireMock.RequestMessage) + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - System.Void WireMock.Owin.OwinResponseMapper::.cctor() - + System.Void WireMock.Owin.MappingMatcher::.ctor(WireMock.Owin.IWireMockMiddlewareOptions) + - - - - + + + + + - + - - WireMock.Owin.OwinResponseMapper/<MapAsync>d__3 + + WireMock.Owin.MappingMatcher/<>c__DisplayClass2_0 + + + + + WireMock.Owin.MappingMatcher/<>c + + + + + WireMock.Owin.WireMockMiddleware - - + + - System.Void WireMock.Owin.OwinResponseMapper/<MapAsync>d__3::MoveNext() + System.Threading.Tasks.Task WireMock.Owin.WireMockMiddleware::Invoke(Microsoft.AspNetCore.Http.HttpContext) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - WireMock.Owin.WireMockMiddleware - - - + + System.Void WireMock.Owin.WireMockMiddleware::LogRequest(WireMock.Logging.LogEntry,System.Boolean) - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - System.Void WireMock.Owin.WireMockMiddleware::.ctor(Microsoft.AspNetCore.Http.RequestDelegate,WireMock.Owin.WireMockMiddlewareOptions) - + System.Void WireMock.Owin.WireMockMiddleware::.ctor(Microsoft.AspNetCore.Http.RequestDelegate,WireMock.Owin.IWireMockMiddlewareOptions,WireMock.Owin.Mappers.IOwinRequestMapper,WireMock.Owin.Mappers.IOwinResponseMapper,WireMock.Owin.IMappingMatcher) + - - - - - - + + + + + + + + + + - + System.Void WireMock.Owin.WireMockMiddleware::.cctor() - + - + - + - - WireMock.Owin.WireMockMiddleware/<>c__DisplayClass5_0 + + WireMock.Owin.WireMockMiddleware/<>c - - + + - <>f__AnonymousType0`2<WireMock.Mapping,WireMock.Matchers.Request.RequestMatchResult> WireMock.Owin.WireMockMiddleware/<>c__DisplayClass5_0::<Invoke>b__0(WireMock.Mapping) - + System.Boolean WireMock.Owin.WireMockMiddleware/<>c::<InvokeInternal>b__7_0(WireMock.IMapping) + - - - - - + - - - - + + - + - - WireMock.Owin.WireMockMiddleware/<>c + + WireMock.Owin.WireMockMiddleware/<InvokeInternal>d__7 - - + + - System.Boolean WireMock.Owin.WireMockMiddleware/<>c::<Invoke>b__5_1(WireMock.Mapping) - + System.Void WireMock.Owin.WireMockMiddleware/<InvokeInternal>d__7::MoveNext() + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + WireMock.Owin.WireMockMiddlewareOptions + + + - System.Boolean WireMock.Owin.WireMockMiddleware/<>c::<Invoke>b__5_2(<>f__AnonymousType0`2<WireMock.Mapping,WireMock.Matchers.Request.RequestMatchResult>) + WireMock.Logging.IWireMockLogger WireMock.Owin.WireMockMiddlewareOptions::get_Logger() - + - - - - - - - + + - - + + - WireMock.Matchers.Request.RequestMatchResult WireMock.Owin.WireMockMiddleware/<>c::<Invoke>b__5_3(<>f__AnonymousType0`2<WireMock.Mapping,WireMock.Matchers.Request.RequestMatchResult>) + System.Nullable`1<System.TimeSpan> WireMock.Owin.WireMockMiddlewareOptions::get_RequestProcessingDelay() - + - + - - + + - System.Int32 WireMock.Owin.WireMockMiddleware/<>c::<Invoke>b__5_4(<>f__AnonymousType0`2<WireMock.Mapping,WireMock.Matchers.Request.RequestMatchResult>) + WireMock.Matchers.IStringMatcher WireMock.Owin.WireMockMiddlewareOptions::get_AuthorizationMatcher() - + - + - - + + - System.Boolean WireMock.Owin.WireMockMiddleware/<>c::<Invoke>b__5_5(<>f__AnonymousType0`2<WireMock.Mapping,WireMock.Matchers.Request.RequestMatchResult>) + System.Boolean WireMock.Owin.WireMockMiddlewareOptions::get_AllowPartialMapping() - + - + - + - System.Int32 WireMock.Owin.WireMockMiddleware/<>c::<Invoke>b__5_6(<>f__AnonymousType0`2<WireMock.Mapping,WireMock.Matchers.Request.RequestMatchResult>) + System.Collections.Concurrent.ConcurrentDictionary`2<System.Guid,WireMock.IMapping> WireMock.Owin.WireMockMiddlewareOptions::get_Mappings() - + - + - + - System.Boolean WireMock.Owin.WireMockMiddleware/<>c::<Invoke>b__5_7(<>f__AnonymousType0`2<WireMock.Mapping,WireMock.Matchers.Request.RequestMatchResult>) + System.Collections.Concurrent.ConcurrentDictionary`2<System.String,WireMock.ScenarioState> WireMock.Owin.WireMockMiddlewareOptions::get_Scenarios() - + - - - - - - - WireMock.Owin.WireMockMiddleware/<Invoke>d__5 - - - - - System.Void WireMock.Owin.WireMockMiddleware/<Invoke>d__5::MoveNext() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - WireMock.Owin.WireMockMiddlewareOptions - - WireMock.Logging.IWireMockLogger WireMock.Owin.WireMockMiddlewareOptions::get_Logger() - + System.Collections.ObjectModel.ObservableCollection`1<WireMock.Logging.LogEntry> WireMock.Owin.WireMockMiddlewareOptions::get_LogEntries() + - + - + - System.Nullable`1<System.TimeSpan> WireMock.Owin.WireMockMiddlewareOptions::get_RequestProcessingDelay() - + System.Nullable`1<System.Int32> WireMock.Owin.WireMockMiddlewareOptions::get_RequestLogExpirationDuration() + - + - + - WireMock.Matchers.IStringMatcher WireMock.Owin.WireMockMiddlewareOptions::get_AuthorizationMatcher() - + System.Nullable`1<System.Int32> WireMock.Owin.WireMockMiddlewareOptions::get_MaxRequestLogCount() + - + - + - System.Boolean WireMock.Owin.WireMockMiddlewareOptions::get_AllowPartialMapping() - + System.Action`1<Microsoft.AspNetCore.Builder.IApplicationBuilder> WireMock.Owin.WireMockMiddlewareOptions::get_PreWireMockMiddlewareInit() + - + - + - System.Collections.Concurrent.ConcurrentDictionary`2<System.Guid,WireMock.Mapping> WireMock.Owin.WireMockMiddlewareOptions::get_Mappings() - + System.Action`1<Microsoft.AspNetCore.Builder.IApplicationBuilder> WireMock.Owin.WireMockMiddlewareOptions::get_PostWireMockMiddlewareInit() + - + - + - - + + + + + WireMock.Owin.Mappers.OwinRequestMapper + + + - System.Collections.Concurrent.ConcurrentDictionary`2<System.String,WireMock.ScenarioState> WireMock.Owin.WireMockMiddlewareOptions::get_Scenarios() + System.ValueTuple`2<WireMock.Models.UrlDetails,System.String> WireMock.Owin.Mappers.OwinRequestMapper::ParseRequest(Microsoft.AspNetCore.Http.HttpRequest) - + + + + + + + + - - + + + + + - - + + - System.Collections.ObjectModel.ObservableCollection`1<WireMock.Logging.LogEntry> WireMock.Owin.WireMockMiddlewareOptions::get_LogEntries() + System.Boolean WireMock.Owin.Mappers.OwinRequestMapper::ShouldParseBody(System.String) - + + + - + - - + + + + + WireMock.Owin.Mappers.OwinRequestMapper/<MapAsync>d__0 + + + - System.Nullable`1<System.Int32> WireMock.Owin.WireMockMiddlewareOptions::get_RequestLogExpirationDuration() + System.Void WireMock.Owin.Mappers.OwinRequestMapper/<MapAsync>d__0::MoveNext() - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + WireMock.Owin.Mappers.OwinResponseMapper + + + - System.Nullable`1<System.Int32> WireMock.Owin.WireMockMiddlewareOptions::get_MaxRequestLogCount() - + System.Void WireMock.Owin.Mappers.OwinResponseMapper::SetResponseHeaders(WireMock.ResponseMessage,Microsoft.AspNetCore.Http.HttpResponse) + - - - - + + + + + + + + + + + + + + + + + + + + + + - + - System.Action`1<Microsoft.AspNetCore.Builder.IApplicationBuilder> WireMock.Owin.WireMockMiddlewareOptions::get_PreWireMockMiddlewareInit() - + System.Void WireMock.Owin.Mappers.OwinResponseMapper::.ctor() + - + - + - - + + - System.Action`1<Microsoft.AspNetCore.Builder.IApplicationBuilder> WireMock.Owin.WireMockMiddlewareOptions::get_PostWireMockMiddlewareInit() - + System.Void WireMock.Owin.Mappers.OwinResponseMapper::.cctor() + - + + + + - + + + + + + + WireMock.Owin.Mappers.OwinResponseMapper/<MapAsync>d__2 + + + + + System.Void WireMock.Owin.Mappers.OwinResponseMapper/<MapAsync>d__2::MoveNext() + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7726,66 +7747,66 @@ System.Uri WireMock.Models.UrlDetails::get_Url() - + - + - + System.Uri WireMock.Models.UrlDetails::get_AbsoluteUrl() - + - + - + System.Void WireMock.Models.UrlDetails::.ctor(System.String) - + - - - + + + - + System.Void WireMock.Models.UrlDetails::.ctor(System.Uri) - + - - - + + + - + System.Void WireMock.Models.UrlDetails::.ctor(System.Uri,System.Uri) - + - - - - - - - + + + + + + + - + @@ -7797,78 +7818,78 @@ WireMock.Matchers.MatchBehaviour WireMock.Matchers.ExactMatcher::get_MatchBehaviour() - + - + - + System.Double WireMock.Matchers.ExactMatcher::IsMatch(System.String) - + - - - + + + - + System.String[] WireMock.Matchers.ExactMatcher::GetPatterns() - + - - - + + + - + System.String WireMock.Matchers.ExactMatcher::get_Name() - + - + - + System.Void WireMock.Matchers.ExactMatcher::.ctor(System.String[]) - + - - - + + + - + System.Void WireMock.Matchers.ExactMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String[]) - + - - - - - - + + + + + + - + @@ -7880,98 +7901,98 @@ WireMock.Matchers.MatchBehaviour WireMock.Matchers.ExactObjectMatcher::get_MatchBehaviour() - + - + - + System.Double WireMock.Matchers.ExactObjectMatcher::IsMatch(System.Object) - + - - - - + + + + - - + + - + System.String WireMock.Matchers.ExactObjectMatcher::get_Name() - + - + - + System.Void WireMock.Matchers.ExactObjectMatcher::.ctor(System.Object) - + - - - + + + - + System.Void WireMock.Matchers.ExactObjectMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.Object) - + - - - - - - + + + + + + - + System.Void WireMock.Matchers.ExactObjectMatcher::.ctor(System.Byte[]) - + - - - + + + - + System.Void WireMock.Matchers.ExactObjectMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.Byte[]) - + - - - - - - + + + + + + - + @@ -7983,136 +8004,136 @@ System.Object WireMock.Matchers.JsonMatcher::get_Value() - + - + - + System.String WireMock.Matchers.JsonMatcher::get_Name() - + - + - + WireMock.Matchers.MatchBehaviour WireMock.Matchers.JsonMatcher::get_MatchBehaviour() - + - + - + System.Double WireMock.Matchers.JsonMatcher::IsMatch(System.Object) - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + System.Void WireMock.Matchers.JsonMatcher::.ctor(System.String) - + - - - + + + - + System.Void WireMock.Matchers.JsonMatcher::.ctor(System.Object) - + - - - + + + - + System.Void WireMock.Matchers.JsonMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String) - + - - - - - - + + + + + + - + System.Void WireMock.Matchers.JsonMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.Object) - + - - - - - - + + + + + + - + @@ -8124,140 +8145,140 @@ WireMock.Matchers.MatchBehaviour WireMock.Matchers.JsonPathMatcher::get_MatchBehaviour() - + - + - + System.Double WireMock.Matchers.JsonPathMatcher::IsMatch(System.String) - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - + + - + System.Double WireMock.Matchers.JsonPathMatcher::IsMatch(System.Object) - + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + System.String[] WireMock.Matchers.JsonPathMatcher::GetPatterns() - + - - - + + + - + System.String WireMock.Matchers.JsonPathMatcher::get_Name() - + - + - + System.Double WireMock.Matchers.JsonPathMatcher::IsMatch(Newtonsoft.Json.Linq.JToken) - + - - - - + + + + - - + + - + System.Void WireMock.Matchers.JsonPathMatcher::.ctor(System.String[]) - + - - - + + + - + System.Void WireMock.Matchers.JsonPathMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String[]) - + - - - - - - + + + + + + - + @@ -8269,132 +8290,132 @@ WireMock.Matchers.MatchBehaviour WireMock.Matchers.LinqMatcher::get_MatchBehaviour() - + - + - + System.Double WireMock.Matchers.LinqMatcher::IsMatch(System.String) - + - - - - - + + + + + - + System.Double WireMock.Matchers.LinqMatcher::IsMatch(System.Object) - + - - - - - - - - - - - - + + + + + + + + + + + + - - - - + + + + - + System.String[] WireMock.Matchers.LinqMatcher::GetPatterns() - + - - - + + + - + System.String WireMock.Matchers.LinqMatcher::get_Name() - + - + - + System.Void WireMock.Matchers.LinqMatcher::.ctor(System.String) - + - - - + + + - + System.Void WireMock.Matchers.LinqMatcher::.ctor(System.String[]) - + - - - + + + - + System.Void WireMock.Matchers.LinqMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String) - + - - - + + + - + System.Void WireMock.Matchers.LinqMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String[]) - + - - - - - + + + + + - + @@ -8406,22 +8427,22 @@ System.Double WireMock.Matchers.MatchBehaviourHelper::Convert(WireMock.Matchers.MatchBehaviour,System.Double) - + - - - - - - + + + + + + - - - - + + + + - + @@ -8433,49 +8454,49 @@ System.Double WireMock.Matchers.MatchScores::ToScore(System.Boolean) - + - - - + + + - - + + - + System.Double WireMock.Matchers.MatchScores::ToScore(System.Collections.Generic.IEnumerable`1<System.Boolean>) - + - - - + + + - - + + - + System.Double WireMock.Matchers.MatchScores::ToScore(System.Collections.Generic.IEnumerable`1<System.Double>) - + - - - + + + - - + + - + @@ -8487,138 +8508,138 @@ WireMock.Matchers.MatchBehaviour WireMock.Matchers.RegexMatcher::get_MatchBehaviour() - + - + - + System.Double WireMock.Matchers.RegexMatcher::IsMatch(System.String) - + - - - - - - - - - - - - - + + + + + + + + + + + + + - - + + - + System.String[] WireMock.Matchers.RegexMatcher::GetPatterns() - + - - - + + + - + System.String WireMock.Matchers.RegexMatcher::get_Name() - + - + - + System.Boolean WireMock.Matchers.RegexMatcher::get_IgnoreCase() - + - + - + System.Void WireMock.Matchers.RegexMatcher::.ctor(System.String,System.Boolean) - + - - - + + + - + System.Void WireMock.Matchers.RegexMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String,System.Boolean) - + - - - + + + - + System.Void WireMock.Matchers.RegexMatcher::.ctor(System.String[],System.Boolean) - + - - - + + + - + System.Void WireMock.Matchers.RegexMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String[],System.Boolean) - + - - - - - - - - - - - - - + + + + + + + + + + + + + - - + + - + @@ -8630,157 +8651,157 @@ WireMock.Matchers.MatchBehaviour WireMock.Matchers.SimMetricsMatcher::get_MatchBehaviour() - + - + - + System.Double WireMock.Matchers.SimMetricsMatcher::IsMatch(System.String) - + - - - - + + + + - + SimMetrics.Net.API.IStringMetric WireMock.Matchers.SimMetricsMatcher::GetStringMetricType() - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + System.String[] WireMock.Matchers.SimMetricsMatcher::GetPatterns() - + - - - + + + - + System.String WireMock.Matchers.SimMetricsMatcher::get_Name() - + - + - + System.Void WireMock.Matchers.SimMetricsMatcher::.ctor(System.String,SimMetrics.Net.SimMetricType) - + - - - + + + - + System.Void WireMock.Matchers.SimMetricsMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String,SimMetrics.Net.SimMetricType) - + - - - + + + - + System.Void WireMock.Matchers.SimMetricsMatcher::.ctor(System.String[],SimMetrics.Net.SimMetricType) - + - - - + + + - + System.Void WireMock.Matchers.SimMetricsMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String[],SimMetrics.Net.SimMetricType) - + - - - - - - - + + + + + + + - + @@ -8792,81 +8813,81 @@ System.String[] WireMock.Matchers.WildcardMatcher::GetPatterns() - + - - - + + + - + System.String WireMock.Matchers.WildcardMatcher::get_Name() - + - + - + System.Void WireMock.Matchers.WildcardMatcher::.ctor(System.String,System.Boolean) - + - - - + + + - + System.Void WireMock.Matchers.WildcardMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String,System.Boolean) - + - - - + + + - + System.Void WireMock.Matchers.WildcardMatcher::.ctor(System.String[],System.Boolean) - + - - - + + + - + System.Void WireMock.Matchers.WildcardMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String[],System.Boolean) - + - - - - + + + + - - + + - + @@ -8878,197 +8899,197 @@ WireMock.Matchers.MatchBehaviour WireMock.Matchers.XPathMatcher::get_MatchBehaviour() - + - + - + System.Double WireMock.Matchers.XPathMatcher::IsMatch(System.String) - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - + + - + System.String[] WireMock.Matchers.XPathMatcher::GetPatterns() - + - - - + + + - + System.String WireMock.Matchers.XPathMatcher::get_Name() - + - + - + System.Void WireMock.Matchers.XPathMatcher::.ctor(System.String[]) - + - - - + + + - + System.Void WireMock.Matchers.XPathMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String[]) - + - - - - - - + + + + + + - + - + WireMock.Matchers.Request.RequestMatchResult System.Double WireMock.Matchers.Request.RequestMatchResult::get_TotalScore() - + - + - + System.Int32 WireMock.Matchers.Request.RequestMatchResult::get_TotalNumber() - + - + - + System.Boolean WireMock.Matchers.Request.RequestMatchResult::get_IsPerfectMatch() - + - + - + - - + + System.Double WireMock.Matchers.Request.RequestMatchResult::get_AverageTotalScore() - + - + - - + + - + System.Collections.Generic.IList`1<System.Collections.Generic.KeyValuePair`2<System.Type,System.Double>> WireMock.Matchers.Request.RequestMatchResult::get_MatchDetails() - + - + - + System.Double WireMock.Matchers.Request.RequestMatchResult::AddScore(System.Type,System.Double) - + - - - - - - + + + + + + - + - - + + System.Int32 WireMock.Matchers.Request.RequestMatchResult::CompareTo(System.Object) - + - - - - + + + + - + System.Void WireMock.Matchers.Request.RequestMatchResult::.ctor() - + - + - + @@ -9080,225 +9101,225 @@ System.Func`2<System.String,System.Boolean> WireMock.Matchers.Request.RequestMessageBodyMatcher::get_Func() - + - + - + System.Func`2<System.Byte[],System.Boolean> WireMock.Matchers.Request.RequestMessageBodyMatcher::get_DataFunc() - + - + - + System.Func`2<System.Object,System.Boolean> WireMock.Matchers.Request.RequestMessageBodyMatcher::get_JsonFunc() - + - + - + WireMock.Matchers.IMatcher WireMock.Matchers.Request.RequestMessageBodyMatcher::get_Matcher() - + - + - + System.Double WireMock.Matchers.Request.RequestMessageBodyMatcher::GetMatchingScore(WireMock.RequestMessage,WireMock.Matchers.Request.RequestMatchResult) - + - - - - + + + + - + System.Double WireMock.Matchers.Request.RequestMessageBodyMatcher::IsMatch(WireMock.RequestMessage) - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + System.Void WireMock.Matchers.Request.RequestMessageBodyMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String) - + - - - + + + - + System.Void WireMock.Matchers.Request.RequestMessageBodyMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.Byte[]) - + - - - + + + - + System.Void WireMock.Matchers.Request.RequestMessageBodyMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.Object) - + - - - + + + - + System.Void WireMock.Matchers.Request.RequestMessageBodyMatcher::.ctor(System.Func`2<System.String,System.Boolean>) - + - - - - - + + + + + - + System.Void WireMock.Matchers.Request.RequestMessageBodyMatcher::.ctor(System.Func`2<System.Byte[],System.Boolean>) - + - - - - - + + + + + - + System.Void WireMock.Matchers.Request.RequestMessageBodyMatcher::.ctor(System.Func`2<System.Object,System.Boolean>) - + - - - - - + + + + + - + System.Void WireMock.Matchers.Request.RequestMessageBodyMatcher::.ctor(WireMock.Matchers.IMatcher) - + - - - - - + + + + + - + @@ -9310,106 +9331,106 @@ System.Collections.Generic.IReadOnlyList`1<WireMock.Matchers.IStringMatcher> WireMock.Matchers.Request.RequestMessageClientIPMatcher::get_Matchers() - + - + - + System.Func`2<System.String,System.Boolean>[] WireMock.Matchers.Request.RequestMessageClientIPMatcher::get_Funcs() - + - + - + System.Double WireMock.Matchers.Request.RequestMessageClientIPMatcher::GetMatchingScore(WireMock.RequestMessage,WireMock.Matchers.Request.RequestMatchResult) - + - - - - + + + + - + System.Double WireMock.Matchers.Request.RequestMessageClientIPMatcher::IsMatch(WireMock.RequestMessage) - + - - - - - - - - - + + + + + + + + + - - - - - - + + + + + + - + System.Void WireMock.Matchers.Request.RequestMessageClientIPMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String[]) - + - - - + + + - + System.Void WireMock.Matchers.Request.RequestMessageClientIPMatcher::.ctor(WireMock.Matchers.IStringMatcher[]) - + - - - - - + + + + + - + System.Void WireMock.Matchers.Request.RequestMessageClientIPMatcher::.ctor(System.Func`2<System.String,System.Boolean>[]) - + - - - - - + + + + + - + @@ -9421,52 +9442,52 @@ System.Collections.Generic.IEnumerable`1<WireMock.Matchers.Request.IRequestMatcher> WireMock.Matchers.Request.RequestMessageCompositeMatcher::get_RequestMatchers() - + - + - + System.Double WireMock.Matchers.Request.RequestMessageCompositeMatcher::GetMatchingScore(WireMock.RequestMessage,WireMock.Matchers.Request.RequestMatchResult) - + - - - - - - - - - + + + + + + + + + - - - - + + + + - + System.Void WireMock.Matchers.Request.RequestMessageCompositeMatcher::.ctor(System.Collections.Generic.IEnumerable`1<WireMock.Matchers.Request.IRequestMatcher>,WireMock.Matchers.Request.CompositeMatcherType) - + - - - - - - + + + + + + - + @@ -9478,137 +9499,137 @@ System.Func`2<System.Collections.Generic.IDictionary`2<System.String,System.String>,System.Boolean>[] WireMock.Matchers.Request.RequestMessageCookieMatcher::get_Funcs() - + - + - + System.String WireMock.Matchers.Request.RequestMessageCookieMatcher::get_Name() - + - + - + WireMock.Matchers.IStringMatcher[] WireMock.Matchers.Request.RequestMessageCookieMatcher::get_Matchers() - + - + - + System.Double WireMock.Matchers.Request.RequestMessageCookieMatcher::GetMatchingScore(WireMock.RequestMessage,WireMock.Matchers.Request.RequestMatchResult) - + - - - - + + + + - + System.Double WireMock.Matchers.Request.RequestMessageCookieMatcher::IsMatch(WireMock.RequestMessage) - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + System.Void WireMock.Matchers.Request.RequestMessageCookieMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String,System.String,System.Boolean) - + - - - - - - - - - + + + + + + + + + - + System.Void WireMock.Matchers.Request.RequestMessageCookieMatcher::.ctor(System.String,WireMock.Matchers.IStringMatcher[]) - + - - - - - - - + + + + + + + - + System.Void WireMock.Matchers.Request.RequestMessageCookieMatcher::.ctor(System.Func`2<System.Collections.Generic.IDictionary`2<System.String,System.String>,System.Boolean>[]) - + - - - - - + + + + + - + @@ -9620,156 +9641,156 @@ System.Func`2<System.Collections.Generic.IDictionary`2<System.String,System.String[]>,System.Boolean>[] WireMock.Matchers.Request.RequestMessageHeaderMatcher::get_Funcs() - + - + - + System.String WireMock.Matchers.Request.RequestMessageHeaderMatcher::get_Name() - + - + - + WireMock.Matchers.IStringMatcher[] WireMock.Matchers.Request.RequestMessageHeaderMatcher::get_Matchers() - + - + - + System.Double WireMock.Matchers.Request.RequestMessageHeaderMatcher::GetMatchingScore(WireMock.RequestMessage,WireMock.Matchers.Request.RequestMatchResult) - + - - - - + + + + - + System.Double WireMock.Matchers.Request.RequestMessageHeaderMatcher::IsMatch(WireMock.RequestMessage) - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + System.Void WireMock.Matchers.Request.RequestMessageHeaderMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String,System.String,System.Boolean) - + - - - - - - - - - + + + + + + + + + - + System.Void WireMock.Matchers.Request.RequestMessageHeaderMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String,System.String[],System.Boolean) - + - - - - - - - - - + + + + + + + + + - + System.Void WireMock.Matchers.Request.RequestMessageHeaderMatcher::.ctor(System.String,WireMock.Matchers.IStringMatcher[]) - + - - - - - - - + + + + + + + - + System.Void WireMock.Matchers.Request.RequestMessageHeaderMatcher::.ctor(System.Func`2<System.Collections.Generic.IDictionary`2<System.String,System.String[]>,System.Boolean>[]) - + - - - - - + + + + + - + @@ -9786,55 +9807,55 @@ System.String[] WireMock.Matchers.Request.RequestMessageMethodMatcher::get_Methods() - + - + - + System.Double WireMock.Matchers.Request.RequestMessageMethodMatcher::GetMatchingScore(WireMock.RequestMessage,WireMock.Matchers.Request.RequestMatchResult) - + - - - - + + + + - + System.Double WireMock.Matchers.Request.RequestMessageMethodMatcher::IsMatch(WireMock.RequestMessage) - + - - - + + + - + System.Void WireMock.Matchers.Request.RequestMessageMethodMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String[]) - + - - - - - - + + + + + + - + @@ -9846,160 +9867,160 @@ System.Func`2<System.Collections.Generic.IDictionary`2<System.String,WireMock.Util.WireMockList`1<System.String>>,System.Boolean>[] WireMock.Matchers.Request.RequestMessageParamMatcher::get_Funcs() - + - + - + System.String WireMock.Matchers.Request.RequestMessageParamMatcher::get_Key() - + - + - + System.Collections.Generic.IReadOnlyList`1<WireMock.Matchers.IStringMatcher> WireMock.Matchers.Request.RequestMessageParamMatcher::get_Matchers() - + - + - + System.Double WireMock.Matchers.Request.RequestMessageParamMatcher::GetMatchingScore(WireMock.RequestMessage,WireMock.Matchers.Request.RequestMatchResult) - + - - - - + + + + - + System.Double WireMock.Matchers.Request.RequestMessageParamMatcher::IsMatch(WireMock.RequestMessage) - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + System.Void WireMock.Matchers.Request.RequestMessageParamMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String) - + - - - + + + - + System.Void WireMock.Matchers.Request.RequestMessageParamMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String,System.String[]) - + - - - + + + - - + + - + System.Void WireMock.Matchers.Request.RequestMessageParamMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String,WireMock.Matchers.IStringMatcher[]) - + - - - - - - - + + + + + + + - + System.Void WireMock.Matchers.Request.RequestMessageParamMatcher::.ctor(System.Func`2<System.Collections.Generic.IDictionary`2<System.String,WireMock.Util.WireMockList`1<System.String>>,System.Boolean>[]) - + - - - - - + + + + + - + @@ -10011,106 +10032,106 @@ System.Collections.Generic.IReadOnlyList`1<WireMock.Matchers.IStringMatcher> WireMock.Matchers.Request.RequestMessagePathMatcher::get_Matchers() - + - + - + System.Func`2<System.String,System.Boolean>[] WireMock.Matchers.Request.RequestMessagePathMatcher::get_Funcs() - + - + - + System.Double WireMock.Matchers.Request.RequestMessagePathMatcher::GetMatchingScore(WireMock.RequestMessage,WireMock.Matchers.Request.RequestMatchResult) - + - - - - + + + + - + System.Double WireMock.Matchers.Request.RequestMessagePathMatcher::IsMatch(WireMock.RequestMessage) - + - - - - - - - - - + + + + + + + + + - - - - - - + + + + + + - + System.Void WireMock.Matchers.Request.RequestMessagePathMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String[]) - + - - - + + + - + System.Void WireMock.Matchers.Request.RequestMessagePathMatcher::.ctor(WireMock.Matchers.IStringMatcher[]) - + - - - - - + + + + + - + System.Void WireMock.Matchers.Request.RequestMessagePathMatcher::.ctor(System.Func`2<System.String,System.Boolean>[]) - + - - - - - + + + + + - + @@ -10122,46 +10143,46 @@ System.Double WireMock.Matchers.Request.RequestMessageScenarioAndStateMatcher::GetMatchingScore(WireMock.RequestMessage,WireMock.Matchers.Request.RequestMatchResult) - + - - - - + + + + - + System.Double WireMock.Matchers.Request.RequestMessageScenarioAndStateMatcher::IsMatch() - + - - - + + + - - + + - + System.Void WireMock.Matchers.Request.RequestMessageScenarioAndStateMatcher::.ctor(System.String,System.String) - + - - - - - + + + + + - + @@ -10173,106 +10194,106 @@ System.Collections.Generic.IReadOnlyList`1<WireMock.Matchers.IStringMatcher> WireMock.Matchers.Request.RequestMessageUrlMatcher::get_Matchers() - + - + - + System.Func`2<System.String,System.Boolean>[] WireMock.Matchers.Request.RequestMessageUrlMatcher::get_Funcs() - + - + - + System.Double WireMock.Matchers.Request.RequestMessageUrlMatcher::GetMatchingScore(WireMock.RequestMessage,WireMock.Matchers.Request.RequestMatchResult) - + - - - - + + + + - + System.Double WireMock.Matchers.Request.RequestMessageUrlMatcher::IsMatch(WireMock.RequestMessage) - + - - - - - - - - - + + + + + + + + + - - - - - - + + + + + + - + System.Void WireMock.Matchers.Request.RequestMessageUrlMatcher::.ctor(WireMock.Matchers.MatchBehaviour,System.String[]) - + - - - + + + - + System.Void WireMock.Matchers.Request.RequestMessageUrlMatcher::.ctor(WireMock.Matchers.IStringMatcher[]) - + - - - - - + + + + + - + System.Void WireMock.Matchers.Request.RequestMessageUrlMatcher::.ctor(System.Func`2<System.String,System.Boolean>[]) - + - - - - - + + + + + - + @@ -10284,67 +10305,67 @@ System.Guid WireMock.Logging.LogEntry::get_Guid() - + - + - + WireMock.RequestMessage WireMock.Logging.LogEntry::get_RequestMessage() - + - + - + WireMock.ResponseMessage WireMock.Logging.LogEntry::get_ResponseMessage() - + - + - + WireMock.Matchers.Request.RequestMatchResult WireMock.Logging.LogEntry::get_RequestMatchResult() - + - + - + System.Nullable`1<System.Guid> WireMock.Logging.LogEntry::get_MappingGuid() - + - + - + System.String WireMock.Logging.LogEntry::get_MappingTitle() - + - + - + @@ -10356,98 +10377,98 @@ System.Void WireMock.Logging.WireMockConsoleLogger::Debug(System.String,System.Object[]) - + - - - + + + - + System.Void WireMock.Logging.WireMockConsoleLogger::Info(System.String,System.Object[]) - + - - - + + + - + System.Void WireMock.Logging.WireMockConsoleLogger::Warn(System.String,System.Object[]) - + - - - + + + - + System.Void WireMock.Logging.WireMockConsoleLogger::Error(System.String,System.Object[]) - + - - - + + + - + System.Void WireMock.Logging.WireMockConsoleLogger::DebugRequestResponse(WireMock.Admin.Requests.LogEntryModel,System.Boolean) - + - - - - + + + + - + System.String WireMock.Logging.WireMockConsoleLogger::Format(System.String,System.String,System.Object[]) - + - - - - + + + + - - + + - + System.Void WireMock.Logging.WireMockConsoleLogger::.ctor() - + - - - - + + + + - + @@ -10459,61 +10480,61 @@ System.Void WireMock.Logging.WireMockNullLogger::Debug(System.String,System.Object[]) - + - - + + - + System.Void WireMock.Logging.WireMockNullLogger::Info(System.String,System.Object[]) - + - - + + - + System.Void WireMock.Logging.WireMockNullLogger::Warn(System.String,System.Object[]) - + - - + + - + System.Void WireMock.Logging.WireMockNullLogger::Error(System.String,System.Object[]) - + - - + + - + System.Void WireMock.Logging.WireMockNullLogger::DebugRequestResponse(WireMock.Admin.Requests.LogEntryModel,System.Boolean) - + - - + + - + @@ -10525,35 +10546,35 @@ System.Net.Http.HttpClient WireMock.Http.HttpClientHelper::CreateHttpClient(System.String) - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -10565,27 +10586,27 @@ System.Void WireMock.Http.HttpClientHelper/<SendAsync>d__1::MoveNext() - + - - - - - - - - - + + + + + + + + + - - - - - - + + + + + + - + @@ -10597,103 +10618,103 @@ System.Net.Http.HttpRequestMessage WireMock.Http.HttpRequestMessageHelper::Create(WireMock.RequestMessage,System.String) - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -10705,23 +10726,23 @@ System.Boolean WireMock.Http.HttpResponseMessageHelper/<>c::<Create>b__0_1(System.Collections.Generic.KeyValuePair`2<System.String,System.Collections.Generic.IEnumerable`1<System.String>>) - + - + - + System.Boolean WireMock.Http.HttpResponseMessageHelper/<>c::<Create>b__0_0(System.Collections.Generic.KeyValuePair`2<System.String,System.Collections.Generic.IEnumerable`1<System.String>>) - + - + - + @@ -10733,69 +10754,69 @@ System.Void WireMock.Http.HttpResponseMessageHelper/<Create>d__0::MoveNext() - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -10807,33 +10828,33 @@ System.Security.Cryptography.X509Certificates.X509Certificate2 WireMock.HttpsCertificate.ClientCertificateHelper::GetCertificate(System.String) - + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -10845,15 +10866,15 @@ System.Security.Cryptography.X509Certificates.X509Certificate2 WireMock.HttpsCertificate.PublicCertificateHelper::GetX509Certificate2() - + - - - - + + + + - + @@ -10865,96 +10886,96 @@ System.Boolean WireMock.Handlers.LocalFileSystemHandler::FolderExists(System.String) - + - - - - + + + + - + System.Void WireMock.Handlers.LocalFileSystemHandler::CreateFolder(System.String) - + - - - - + + + + - + System.Collections.Generic.IEnumerable`1<System.String> WireMock.Handlers.LocalFileSystemHandler::EnumerateFiles(System.String) - + - - - - + + + + - + System.String WireMock.Handlers.LocalFileSystemHandler::GetMappingFolder() - + - - - + + + - + System.String WireMock.Handlers.LocalFileSystemHandler::ReadMappingFile(System.String) - + - - - - + + + + - + System.Void WireMock.Handlers.LocalFileSystemHandler::WriteMappingFile(System.String,System.String) - + - - - - - + + + + + - + System.Void WireMock.Handlers.LocalFileSystemHandler::.cctor() - + - + - + @@ -10966,45 +10987,45 @@ System.Nullable`1<System.Int32> WireMock.Admin.Settings.SettingsModel::get_GlobalProcessingDelay() - + - + - + System.Nullable`1<System.Boolean> WireMock.Admin.Settings.SettingsModel::get_AllowPartialMapping() - + - + - + System.Nullable`1<System.Int32> WireMock.Admin.Settings.SettingsModel::get_RequestLogExpirationDuration() - + - + - + System.Nullable`1<System.Int32> WireMock.Admin.Settings.SettingsModel::get_MaxRequestLogCount() - + - + - + @@ -11016,45 +11037,45 @@ System.String WireMock.Admin.Scenarios.ScenarioStateModel::get_Name() - + - + - + System.String WireMock.Admin.Scenarios.ScenarioStateModel::get_NextState() - + - + - + System.Boolean WireMock.Admin.Scenarios.ScenarioStateModel::get_Started() - + - + - + System.Boolean WireMock.Admin.Scenarios.ScenarioStateModel::get_Finished() - + - + - + @@ -11066,67 +11087,67 @@ System.Guid WireMock.Admin.Requests.LogEntryModel::get_Guid() - + - + - + WireMock.Admin.Requests.LogRequestModel WireMock.Admin.Requests.LogEntryModel::get_Request() - + - + - + WireMock.Admin.Requests.LogResponseModel WireMock.Admin.Requests.LogEntryModel::get_Response() - + - + - + System.Nullable`1<System.Guid> WireMock.Admin.Requests.LogEntryModel::get_MappingGuid() - + - + - + System.String WireMock.Admin.Requests.LogEntryModel::get_MappingTitle() - + - + - + WireMock.Admin.Requests.LogRequestMatchModel WireMock.Admin.Requests.LogEntryModel::get_RequestMatchResult() - + - + - + @@ -11138,56 +11159,56 @@ System.Double WireMock.Admin.Requests.LogRequestMatchModel::get_TotalScore() - + - + - + System.Int32 WireMock.Admin.Requests.LogRequestMatchModel::get_TotalNumber() - + - + - + System.Boolean WireMock.Admin.Requests.LogRequestMatchModel::get_IsPerfectMatch() - + - + - + System.Double WireMock.Admin.Requests.LogRequestMatchModel::get_AverageTotalScore() - + - + - + System.Collections.Generic.IList`1<System.Object> WireMock.Admin.Requests.LogRequestMatchModel::get_MatchDetails() - + - + - + @@ -11199,155 +11220,155 @@ System.String WireMock.Admin.Requests.LogRequestModel::get_ClientIP() - + - + - + System.DateTime WireMock.Admin.Requests.LogRequestModel::get_DateTime() - + - + - + System.String WireMock.Admin.Requests.LogRequestModel::get_Path() - + - + - + System.String WireMock.Admin.Requests.LogRequestModel::get_AbsolutePath() - + - + - + System.String WireMock.Admin.Requests.LogRequestModel::get_Url() - + - + - + System.String WireMock.Admin.Requests.LogRequestModel::get_AbsoluteUrl() - + - + - + System.Collections.Generic.IDictionary`2<System.String,WireMock.Util.WireMockList`1<System.String>> WireMock.Admin.Requests.LogRequestModel::get_Query() - + - + - + System.String WireMock.Admin.Requests.LogRequestModel::get_Method() - + - + - + System.Collections.Generic.IDictionary`2<System.String,WireMock.Util.WireMockList`1<System.String>> WireMock.Admin.Requests.LogRequestModel::get_Headers() - + - + - + System.Collections.Generic.IDictionary`2<System.String,System.String> WireMock.Admin.Requests.LogRequestModel::get_Cookies() - + - + - + System.String WireMock.Admin.Requests.LogRequestModel::get_Body() - + - + - + System.Object WireMock.Admin.Requests.LogRequestModel::get_BodyAsJson() - + - + - + System.Byte[] WireMock.Admin.Requests.LogRequestModel::get_BodyAsBytes() - + - + - + WireMock.Admin.Mappings.EncodingModel WireMock.Admin.Requests.LogRequestModel::get_BodyEncoding() - + - + - + @@ -11359,111 +11380,111 @@ System.Int32 WireMock.Admin.Requests.LogResponseModel::get_StatusCode() - + - + - + System.Collections.Generic.IDictionary`2<System.String,WireMock.Util.WireMockList`1<System.String>> WireMock.Admin.Requests.LogResponseModel::get_Headers() - + - + - + System.String WireMock.Admin.Requests.LogResponseModel::get_BodyDestination() - + - + - + System.String WireMock.Admin.Requests.LogResponseModel::get_Body() - + - + - + System.Object WireMock.Admin.Requests.LogResponseModel::get_BodyAsJson() - + - + - + System.Byte[] WireMock.Admin.Requests.LogResponseModel::get_BodyAsBytes() - + - + - + System.String WireMock.Admin.Requests.LogResponseModel::get_BodyAsFile() - + - + - + System.Nullable`1<System.Boolean> WireMock.Admin.Requests.LogResponseModel::get_BodyAsFileIsCached() - + - + - + System.String WireMock.Admin.Requests.LogResponseModel::get_BodyOriginal() - + - + - + WireMock.Admin.Mappings.EncodingModel WireMock.Admin.Requests.LogResponseModel::get_BodyEncoding() - + - + - + @@ -11475,12 +11496,12 @@ WireMock.Admin.Mappings.MatcherModel WireMock.Admin.Mappings.BodyModel::get_Matcher() - + - + - + @@ -11492,12 +11513,12 @@ WireMock.Admin.Mappings.MatcherModel[] WireMock.Admin.Mappings.ClientIPModel::get_Matchers() - + - + - + @@ -11509,23 +11530,23 @@ System.String WireMock.Admin.Mappings.CookieModel::get_Name() - + - + - + System.Collections.Generic.IList`1<WireMock.Admin.Mappings.MatcherModel> WireMock.Admin.Mappings.CookieModel::get_Matchers() - + - + - + @@ -11537,34 +11558,34 @@ System.Int32 WireMock.Admin.Mappings.EncodingModel::get_CodePage() - + - + - + System.String WireMock.Admin.Mappings.EncodingModel::get_EncodingName() - + - + - + System.String WireMock.Admin.Mappings.EncodingModel::get_WebName() - + - + - + @@ -11576,23 +11597,23 @@ System.String WireMock.Admin.Mappings.HeaderModel::get_Name() - + - + - + System.Collections.Generic.IList`1<WireMock.Admin.Mappings.MatcherModel> WireMock.Admin.Mappings.HeaderModel::get_Matchers() - + - + - + @@ -11604,89 +11625,89 @@ System.Nullable`1<System.Guid> WireMock.Admin.Mappings.MappingModel::get_Guid() - + - + - + System.String WireMock.Admin.Mappings.MappingModel::get_Title() - + - + - + System.Nullable`1<System.Int32> WireMock.Admin.Mappings.MappingModel::get_Priority() - + - + - + System.String WireMock.Admin.Mappings.MappingModel::get_Scenario() - + - + - + System.String WireMock.Admin.Mappings.MappingModel::get_WhenStateIs() - + - + - + System.String WireMock.Admin.Mappings.MappingModel::get_SetStateTo() - + - + - + WireMock.Admin.Mappings.RequestModel WireMock.Admin.Mappings.MappingModel::get_Request() - + - + - + WireMock.Admin.Mappings.ResponseModel WireMock.Admin.Mappings.MappingModel::get_Response() - + - + - + @@ -11698,56 +11719,56 @@ System.String WireMock.Admin.Mappings.MatcherModel::get_Name() - + - + - + System.Object WireMock.Admin.Mappings.MatcherModel::get_Pattern() - + - + - + System.Object[] WireMock.Admin.Mappings.MatcherModel::get_Patterns() - + - + - + System.Nullable`1<System.Boolean> WireMock.Admin.Mappings.MatcherModel::get_IgnoreCase() - + - + - + System.Nullable`1<System.Boolean> WireMock.Admin.Mappings.MatcherModel::get_RejectOnMatch() - + - + - + @@ -11759,23 +11780,23 @@ System.String WireMock.Admin.Mappings.ParamModel::get_Name() - + - + - + WireMock.Admin.Mappings.MatcherModel[] WireMock.Admin.Mappings.ParamModel::get_Matchers() - + - + - + @@ -11787,12 +11808,12 @@ WireMock.Admin.Mappings.MatcherModel[] WireMock.Admin.Mappings.PathModel::get_Matchers() - + - + - + @@ -11804,89 +11825,89 @@ System.Object WireMock.Admin.Mappings.RequestModel::get_ClientIP() - + - + - + System.Object WireMock.Admin.Mappings.RequestModel::get_Path() - + - + - + System.Object WireMock.Admin.Mappings.RequestModel::get_Url() - + - + - + System.String[] WireMock.Admin.Mappings.RequestModel::get_Methods() - + - + - + System.Collections.Generic.IList`1<WireMock.Admin.Mappings.HeaderModel> WireMock.Admin.Mappings.RequestModel::get_Headers() - + - + - + System.Collections.Generic.IList`1<WireMock.Admin.Mappings.CookieModel> WireMock.Admin.Mappings.RequestModel::get_Cookies() - + - + - + System.Collections.Generic.IList`1<WireMock.Admin.Mappings.ParamModel> WireMock.Admin.Mappings.RequestModel::get_Params() - + - + - + WireMock.Admin.Mappings.BodyModel WireMock.Admin.Mappings.RequestModel::get_Body() - + - + - + @@ -11898,177 +11919,177 @@ System.Nullable`1<System.Int32> WireMock.Admin.Mappings.ResponseModel::get_StatusCode() - + - + - + System.String WireMock.Admin.Mappings.ResponseModel::get_BodyDestination() - + - + - + System.String WireMock.Admin.Mappings.ResponseModel::get_Body() - + - + - + System.String WireMock.Admin.Mappings.ResponseModel::get_BodyFromBase64() - + - + - + System.Object WireMock.Admin.Mappings.ResponseModel::get_BodyAsJson() - + - + - + System.Nullable`1<System.Boolean> WireMock.Admin.Mappings.ResponseModel::get_BodyAsJsonIndented() - + - + - + System.Byte[] WireMock.Admin.Mappings.ResponseModel::get_BodyAsBytes() - + - + - + System.String WireMock.Admin.Mappings.ResponseModel::get_BodyAsFile() - + - + - + System.Nullable`1<System.Boolean> WireMock.Admin.Mappings.ResponseModel::get_BodyAsFileIsCached() - + - + - + WireMock.Admin.Mappings.EncodingModel WireMock.Admin.Mappings.ResponseModel::get_BodyEncoding() - + - + - + System.Boolean WireMock.Admin.Mappings.ResponseModel::get_UseTransformer() - + - + - + System.Collections.Generic.IDictionary`2<System.String,System.Object> WireMock.Admin.Mappings.ResponseModel::get_Headers() - + - + - + System.String WireMock.Admin.Mappings.ResponseModel::get_HeadersRaw() - + - + - + System.Nullable`1<System.Int32> WireMock.Admin.Mappings.ResponseModel::get_Delay() - + - + - + System.String WireMock.Admin.Mappings.ResponseModel::get_ProxyUrl() - + - + - + System.String WireMock.Admin.Mappings.ResponseModel::get_X509Certificate2ThumbprintOrSubjectName() - + - + - + @@ -12080,23 +12101,23 @@ System.Nullable`1<System.Guid> WireMock.Admin.Mappings.StatusModel::get_Guid() - + - + - + System.String WireMock.Admin.Mappings.StatusModel::get_Status() - + - + - + @@ -12108,24 +12129,24 @@ WireMock.Admin.Mappings.MatcherModel[] WireMock.Admin.Mappings.UrlModel::get_Matchers() - + - + - + - + C:\Users\azureuser\Documents\Github\WireMock.Net\test\WireMock.Net.Tests\bin\Debug\netcoreapp2.1\WireMock.Net.StandAlone.dll - 2018-09-21T12:00:14 + 2018-09-26T09:51:43 WireMock.Net.StandAlone - - + + @@ -12136,152 +12157,152 @@ System.Collections.Generic.IDictionary`2<System.String,System.String[]> WireMock.Net.StandAlone.SimpleCommandLineParser::get_Arguments() - + - + - + System.Void WireMock.Net.StandAlone.SimpleCommandLineParser::Parse(System.String[]) - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + System.Boolean WireMock.Net.StandAlone.SimpleCommandLineParser::Contains(System.String) - + - - - + + + - + System.String[] WireMock.Net.StandAlone.SimpleCommandLineParser::GetValues(System.String,System.String[]) - + - - - + + + - - + + - + T WireMock.Net.StandAlone.SimpleCommandLineParser::GetValue(System.String,System.Func`2<System.String[],T>,T) - + - - - + + + - - + + - + System.Boolean WireMock.Net.StandAlone.SimpleCommandLineParser::GetBoolValue(System.String,System.Boolean) - + - - - - - - - + + + + + + + - + System.Nullable`1<System.Int32> WireMock.Net.StandAlone.SimpleCommandLineParser::GetIntValue(System.String,System.Nullable`1<System.Int32>) - + - - - - - - - + + + + + + + - + System.String WireMock.Net.StandAlone.SimpleCommandLineParser::GetStringValue(System.String,System.String) - + - - - + + + - + @@ -12308,78 +12329,78 @@ WireMock.Server.FluentMockServer WireMock.Net.StandAlone.StandAloneApp::Start(WireMock.Settings.IFluentMockServerSettings) - + - - - - - - + + + + + + - + WireMock.Server.FluentMockServer WireMock.Net.StandAlone.StandAloneApp::Start(System.String[],WireMock.Logging.IWireMockLogger) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/report/coverlet/WireMock.Net.StandAlone_SimpleCommandLineParser.htm b/report/coverlet/WireMock.Net.StandAlone_SimpleCommandLineParser.htm index d5c7a18fb..d9f172122 100644 --- a/report/coverlet/WireMock.Net.StandAlone_SimpleCommandLineParser.htm +++ b/report/coverlet/WireMock.Net.StandAlone_SimpleCommandLineParser.htm @@ -128,7 +128,7 @@

 83} - +

Methods/Properties

diff --git a/report/coverlet/WireMock.Net.StandAlone_StandAloneApp.htm b/report/coverlet/WireMock.Net.StandAlone_StandAloneApp.htm index ba129a475..5209e0c34 100644 --- a/report/coverlet/WireMock.Net.StandAlone_StandAloneApp.htm +++ b/report/coverlet/WireMock.Net.StandAlone_StandAloneApp.htm @@ -130,7 +130,7 @@

 90} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_AspNetCoreSelfHost.htm b/report/coverlet/WireMock.Net_AspNetCoreSelfHost.htm index 014658ac8..0bbee9d7b 100644 --- a/report/coverlet/WireMock.Net_AspNetCoreSelfHost.htm +++ b/report/coverlet/WireMock.Net_AspNetCoreSelfHost.htm @@ -17,11 +17,11 @@

Summary

Class:WireMock.Owin.AspNetCoreSelfHost Assembly:WireMock.Net File(s):C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Owin\AspNetCoreSelfHost.cs -Covered lines:81 +Covered lines:88 Uncovered lines:5 -Coverable lines:86 -Total lines:148 -Line coverage:94.1% +Coverable lines:93 +Total lines:157 +Line coverage:94.6% Branch coverage:75% @@ -32,7 +32,7 @@

Metrics

StartAsync()0010 StartServers()000.6880 StopAsync()0010 -.ctor(...)0010.75 +.ctor(...)0010.75

File(s)

@@ -49,159 +49,168 @@

 7using JetBrains.Annotations;  8using Microsoft.AspNetCore.Builder;  9using Microsoft.AspNetCore.Hosting;10using WireMock.HttpsCertificate;11using WireMock.Logging;12using WireMock.Util;13using WireMock.Validation;1415namespace WireMock.Owin16{17    internal class AspNetCoreSelfHost : IOwinSelfHost18    { - 5519        private readonly CancellationTokenSource _cts = new CancellationTokenSource();20        private readonly WireMockMiddlewareOptions _options;21        private readonly string[] _urls;22        private readonly IWireMockLogger _logger;23        private Exception _runningException;2425        private IWebHost _host;10using Microsoft.Extensions.DependencyInjection;11using WireMock.HttpsCertificate;12using WireMock.Logging;13using WireMock.Owin.Mappers;14using WireMock.Util;15using WireMock.Validation;1617namespace WireMock.Owin18{19    internal class AspNetCoreSelfHost : IOwinSelfHost20    { + 4721        private readonly CancellationTokenSource _cts = new CancellationTokenSource();22        private readonly IWireMockMiddlewareOptions _options;23        private readonly string[] _urls;24        private readonly IWireMockLogger _logger;25        private Exception _runningException;  26 - 51027        public bool IsStarted { get; private set; }27        private IWebHost _host;  28 - 11029        public List<string> Urls { get; } = new List<string>(); + 53129        public bool IsStarted { get; private set; }  30 - 16531        public List<int> Ports { get; } = new List<int>(); + 9431        public List<string> Urls { get; } = new List<string>();  32 - 39633        public Exception RunningException => _runningException; + 14133        public List<int> Ports { get; } = new List<int>();  34 - 5535        public AspNetCoreSelfHost([NotNull] WireMockMiddlewareOptions options, [NotNull] params string[] uriPrefixes) - 5536        { - 5537            Check.NotNull(options, nameof(options)); - 5538            Check.NotNullOrEmpty(uriPrefixes, nameof(uriPrefixes));39 - 5540            _logger = options.Logger ?? new WireMockConsoleLogger(); + 43335        public Exception RunningException => _runningException;36 + 4737        public AspNetCoreSelfHost([NotNull] IWireMockMiddlewareOptions options, [NotNull] params string[] uriPrefixes) + 4738        { + 4739            Check.NotNull(options, nameof(options)); + 4740            Check.NotNullOrEmpty(uriPrefixes, nameof(uriPrefixes));  41 - 27542            foreach (string uriPrefix in uriPrefixes) - 5543            { - 5544                Urls.Add(uriPrefix);45 - 5546                PortUtils.TryExtract(uriPrefix, out string protocol, out string host, out int port); - 5547                Ports.Add(port); - 5548            }49 - 5550            _options = options; - 5551            _urls = uriPrefixes; - 5552        }5354        public Task StartAsync() - 5555        { - 5556            _host = new WebHostBuilder() - 5557                .Configure(appBuilder => - 11058                { - 11059                    appBuilder.UseMiddleware<GlobalExceptionMiddleware>(_options); - 5560 - 11061                    _options.PreWireMockMiddlewareInit?.Invoke(appBuilder); - 5562 - 11063                    appBuilder.UseMiddleware<WireMockMiddleware>(_options); - 5564 - 11065                    _options.PostWireMockMiddlewareInit?.Invoke(appBuilder); - 11066                }) - 5567                .UseKestrel(options => - 11068                { - 5569#if NETSTANDARD1_3 - 5570                    if (_urls.Any(u => u.StartsWith("https://", StringComparison.OrdinalIgnoreCase))) - 5571                    { - 5572                        options.UseHttps(PublicCertificateHelper.GetX509Certificate2()); - 5573                    } - 5574#else - 5575                    // https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel?tabs=aspnetcore2x - 38576                    foreach (string url in _urls.Where(u => u.StartsWith("http://", StringComparison.OrdinalIgnoreCase)) - 11077                    { - 11078                        PortUtils.TryExtract(url, out string protocol, out string host, out int port); - 11079                        options.Listen(System.Net.IPAddress.Any, port); - 11080                    } - 5581 - 27582                    foreach (string url in _urls.Where(u => u.StartsWith("https://", StringComparison.OrdinalIgnoreCase) - 5583                    { - 5584                        PortUtils.TryExtract(url, out string protocol, out string host, out int port); - 5585                        options.Listen(System.Net.IPAddress.Any, port, listenOptions => - 5586                        { - 5587                            listenOptions.UseHttps(PublicCertificateHelper.GetX509Certificate2()); - 5588                        }); - 5589                    } - 5590#endif - 11091                }) - 5592#if NETSTANDARD1_3 - 5593                .UseUrls(_urls) - 5594#endif - 5595                .Build();96 - 5597            return Task.Run(() => - 11098            { - 11099                StartServers(); - 57100            }, _cts.Token); - 55101        }102103        private void StartServers() - 55104        {105            try - 55106            { - 55107                var appLifetime = (IApplicationLifetime) _host.Services.GetService(typeof(IApplicationLifetime)); - 110108                appLifetime.ApplicationStarted.Register(() => IsStarted = true);109110#if NETSTANDARD1_3111                _logger.Info("WireMock.Net server using netstandard1.3");112#elif NETSTANDARD2_0 - 55113                _logger.Info("WireMock.Net server using netstandard2.0");114#elif NET46115                _logger.Info("WireMock.Net server using .net 4.6.1 or higher");116#endif117118#if NETSTANDARD1_3119                _host.Run(_cts.Token);120#else - 55121                _host.RunAsync(_cts.Token).Wait();122#endif - 2123            } - 0124            catch (Exception e) - 0125            { - 0126                _runningException = e; - 0127                _logger.Error(e.ToString()); - 0128            }129            finally - 2130            { - 2131                IsStarted = false; + 4742            _logger = options.Logger ?? new WireMockConsoleLogger();43 + 23544            foreach (string uriPrefix in uriPrefixes) + 4745            { + 4746                Urls.Add(uriPrefix);47 + 4748                PortUtils.TryExtract(uriPrefix, out string protocol, out string host, out int port); + 4749                Ports.Add(port); + 4750            }51 + 4752            _options = options; + 4753            _urls = uriPrefixes; + 4754        }5556        public Task StartAsync() + 4757        { + 4758            _host = new WebHostBuilder() + 4759                .ConfigureServices(services => + 9460                { + 9461                    services.AddSingleton<IWireMockMiddlewareOptions>(_options); + 9462                    services.AddSingleton<IMappingMatcher, MappingMatcher>(); + 9463                    services.AddSingleton<IOwinRequestMapper, OwinRequestMapper>(); + 9464                    services.AddSingleton<IOwinResponseMapper, OwinResponseMapper>(); + 9465                }) + 4766                .Configure(appBuilder => + 9467                { + 9468                    appBuilder.UseMiddleware<GlobalExceptionMiddleware>(); + 4769 + 9470                    _options.PreWireMockMiddlewareInit?.Invoke(appBuilder); + 4771 + 9472                    appBuilder.UseMiddleware<WireMockMiddleware>(); + 4773 + 9474                    _options.PostWireMockMiddlewareInit?.Invoke(appBuilder); + 9475                }) + 4776                .UseKestrel(options => + 9477                { + 4778#if NETSTANDARD1_3 + 4779                    if (_urls.Any(u => u.StartsWith("https://", StringComparison.OrdinalIgnoreCase))) + 4780                    { + 4781                        options.UseHttps(PublicCertificateHelper.GetX509Certificate2()); + 4782                    } + 4783#else + 4784                    // https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel?tabs=aspnetcore2x + 32985                    foreach (string url in _urls.Where(u => u.StartsWith("http://", StringComparison.OrdinalIgnoreCase)) + 9486                    { + 9487                        PortUtils.TryExtract(url, out string protocol, out string host, out int port); + 9488                        options.Listen(System.Net.IPAddress.Any, port); + 9489                    } + 4790 + 23591                    foreach (string url in _urls.Where(u => u.StartsWith("https://", StringComparison.OrdinalIgnoreCase) + 4792                    { + 4793                        PortUtils.TryExtract(url, out string protocol, out string host, out int port); + 4794                        options.Listen(System.Net.IPAddress.Any, port, listenOptions => + 4795                        { + 4796                            listenOptions.UseHttps(PublicCertificateHelper.GetX509Certificate2()); + 4797                        }); + 4798                    } + 4799#endif + 94100                }) + 47101#if NETSTANDARD1_3 + 47102                .UseUrls(_urls) + 47103#endif + 47104                .Build();105 + 47106            return Task.Run(() => + 94107            { + 94108                StartServers(); + 49109            }, _cts.Token); + 47110        }111112        private void StartServers() + 47113        {114            try + 47115            { + 47116                var appLifetime = (IApplicationLifetime)_host.Services.GetService(typeof(IApplicationLifetime)); + 94117                appLifetime.ApplicationStarted.Register(() => IsStarted = true);118119#if NETSTANDARD1_3120                _logger.Info("WireMock.Net server using netstandard1.3");121#elif NETSTANDARD2_0 + 47122                _logger.Info("WireMock.Net server using netstandard2.0");123#elif NET46124                _logger.Info("WireMock.Net server using .net 4.6.1 or higher");125#endif126127#if NETSTANDARD1_3128                _host.Run(_cts.Token);129#else + 47130                _host.RunAsync(_cts.Token).Wait();131#endif  2132            } - 2133        }134135        public Task StopAsync() - 2136        { - 2137            _cts.Cancel();138 - 2139            IsStarted = false;140#if NETSTANDARD1_3141            return Task.FromResult(true);142#else - 2143            return _host.StopAsync();144#endif - 2145        }146    }147}148#endif + 0133            catch (Exception e) + 0134            { + 0135                _runningException = e; + 0136                _logger.Error(e.ToString()); + 0137            }138            finally + 2139            { + 2140                IsStarted = false; + 2141            } + 2142        }143144        public Task StopAsync() + 2145        { + 2146            _cts.Cancel();147 + 2148            IsStarted = false;149#if NETSTANDARD1_3150            return Task.FromResult(true);151#else + 2152            return _host.StopAsync();153#endif + 2154        }155    }156}157#endif -

+
diff --git a/report/coverlet/WireMock.Net_BodyData.htm b/report/coverlet/WireMock.Net_BodyData.htm index 87ba53f02..a10e1dc9b 100644 --- a/report/coverlet/WireMock.Net_BodyData.htm +++ b/report/coverlet/WireMock.Net_BodyData.htm @@ -41,27 +41,27 @@

C  10        /// <summary>  11        /// The body encoding.  12        /// </summary> - 11013        public Encoding Encoding { get; set; } + 9313        public Encoding Encoding { get; set; }  14  15        /// <summary>  16        /// The body as string, this is defined when BodyAsString or BodyAsJson are not null.  17        /// </summary> - 15118        public string BodyAsString { get; set; } + 13518        public string BodyAsString { get; set; }  19  20        /// <summary>  21        /// The body (as JSON object).  22        /// </summary> - 12223        public object BodyAsJson { get; set; } + 11023        public object BodyAsJson { get; set; }  24  25        /// <summary>  26        /// The body (as bytearray).  27        /// </summary> - 9428        public byte[] BodyAsBytes { get; set; } + 8628        public byte[] BodyAsBytes { get; set; }  29    }  30} - +

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_BodyModel.htm b/report/coverlet/WireMock.Net_BodyModel.htm index 15f8fe59e..af77c3592 100644 --- a/report/coverlet/WireMock.Net_BodyModel.htm +++ b/report/coverlet/WireMock.Net_BodyModel.htm @@ -44,7 +44,7 @@

 13} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_BodyParser.htm b/report/coverlet/WireMock.Net_BodyParser.htm index 1cbfb1052..372fc9d52 100644 --- a/report/coverlet/WireMock.Net_BodyParser.htm +++ b/report/coverlet/WireMock.Net_BodyParser.htm @@ -67,14 +67,14 @@

 125        };  26  27        private static async Task<Tuple<string, Encoding>> ReadStringAsync(Stream stream) - 1928        { - 1929            using (var streamReader = new StreamReader(stream)) - 1930            { - 1931                string content = await streamReader.ReadToEndAsync(); + 1028        { + 1029            using (var streamReader = new StreamReader(stream)) + 1030            { + 1031                string content = await streamReader.ReadToEndAsync();  32 - 1933                return new Tuple<string, Encoding>(content, streamReader.CurrentEncoding); + 1033                return new Tuple<string, Encoding>(content, streamReader.CurrentEncoding);  34            } - 1935        } + 1035        }  36  37        private static async Task<byte[]> ReadBytesAsync(Stream stream)  038        { @@ -86,51 +86,51 @@

 044        }  45  46        public static async Task<BodyData> Parse([NotNull] Stream stream, [CanBeNull] string contentTypeHeaderValue) - 1947        { - 1948            var data = new BodyData(); + 1047        { + 1048            var data = new BodyData();  49 - 10150            if (contentTypeHeaderValue != null && TextContentTypes.Any(text => contentTypeHeaderValue.StartsWith(text, S - 751            { + 6350            if (contentTypeHeaderValue != null && TextContentTypes.Any(text => contentTypeHeaderValue.StartsWith(text, S + 251            {  52                try - 753                { - 754                    var stringData = await ReadStringAsync(stream); - 755                    data.BodyAsString = stringData.Item1; - 756                    data.Encoding = stringData.Item2; - 757                } + 253                { + 254                    var stringData = await ReadStringAsync(stream); + 255                    data.BodyAsString = stringData.Item1; + 256                    data.Encoding = stringData.Item2; + 257                }  058                catch  059                {  60                    // Reading as string failed, just get the ByteArray.  061                    data.BodyAsBytes = await ReadBytesAsync(stream);  062                } - 763            } - 2664            else if (contentTypeHeaderValue != null && JsonContentTypes.Any(json => contentTypeHeaderValue.StartsWith(js - 1265            { - 1266                var stringData = await ReadStringAsync(stream); - 1267                data.BodyAsString = stringData.Item1; - 1268                data.Encoding = stringData.Item2; + 263            } + 1864            else if (contentTypeHeaderValue != null && JsonContentTypes.Any(json => contentTypeHeaderValue.StartsWith(js + 865            { + 866                var stringData = await ReadStringAsync(stream); + 867                data.BodyAsString = stringData.Item1; + 868                data.Encoding = stringData.Item2;  69  70                try - 1271                { - 1272                    data.BodyAsJson = JsonConvert.DeserializeObject(stringData.Item1, new JsonSerializerSettings { Forma - 1273                } + 871                { + 872                    data.BodyAsJson = JsonConvert.DeserializeObject(stringData.Item1, new JsonSerializerSettings { Forma + 873                }  074                catch  075                {  76                    // JsonConvert failed, just set the Body as string.  077                    data.BodyAsString = stringData.Item1;  078                } - 1279            } + 879            }  80            else  081            {  082                data.BodyAsBytes = await ReadBytesAsync(stream);  083            }  84 - 1985            return data; - 1986        } + 1085            return data; + 1086        }  87    }  88} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_Check.htm b/report/coverlet/WireMock.Net_Check.htm index fc6968878..98b95002f 100644 --- a/report/coverlet/WireMock.Net_Check.htm +++ b/report/coverlet/WireMock.Net_Check.htm @@ -79,16 +79,16 @@

 33  34        [ContractAnnotation("value:null => halt")]  35        public static T NotNull<T>([NoEnumeration] T value, [InvokerParameterName] [NotNull] string parameterName) - 388436        { - 388437            if (ReferenceEquals(value, null)) + 400436        { + 400437            if (ReferenceEquals(value, null))  238            {  239                NotNullOrEmpty(parameterName, nameof(parameterName));  40  241                throw new ArgumentNullException(parameterName);  42            }  43 - 388244            return value; - 388245        } + 400244            return value; + 400245        }  46  47        [ContractAnnotation("value:null => halt")]  48        public static T NotNull<T>([NoEnumeration] T value, [InvokerParameterName] [NotNull] string parameterName, [NotN @@ -106,18 +106,18 @@

 60  61        [ContractAnnotation("value:null => halt")]  62        public static IList<T> NotNullOrEmpty<T>(IList<T> value, [InvokerParameterName] [NotNull] string parameterName) - 48063        { - 48064            NotNull(value, parameterName); + 45663        { + 45664            NotNull(value, parameterName);  65 - 48066            if (value.Count == 0) + 45666            if (value.Count == 0)  067            {  068                NotNullOrEmpty(parameterName, nameof(parameterName));  69  070                throw new ArgumentException(CoreStrings.CollectionArgumentIsEmpty(parameterName));  71            }  72 - 48073            return value; - 48074        } + 45673            return value; + 45674        }  75  76        [ContractAnnotation("value:null => halt")]  77        public static string NotNullOrEmpty(string value, [InvokerParameterName] [NotNull] string parameterName) @@ -160,7 +160,7 @@

 39114        {  39115            NotNull(value, parameterName);  116 - 80117            if (value.Any(e => e == null)) + 78117            if (value.Any(e => e == null))  0118            {  0119                NotNullOrEmpty(parameterName, nameof(parameterName));  120 @@ -185,7 +185,7 @@

 139} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_ClientCertificateHelper.htm b/report/coverlet/WireMock.Net_ClientCertificateHelper.htm index 6cec66c70..dfde38f11 100644 --- a/report/coverlet/WireMock.Net_ClientCertificateHelper.htm +++ b/report/coverlet/WireMock.Net_ClientCertificateHelper.htm @@ -81,7 +81,7 @@

 42} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_ClientIPModel.htm b/report/coverlet/WireMock.Net_ClientIPModel.htm index 4e77d47b4..f67f283b4 100644 --- a/report/coverlet/WireMock.Net_ClientIPModel.htm +++ b/report/coverlet/WireMock.Net_ClientIPModel.htm @@ -44,7 +44,7 @@

 13} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_ConcurentObservableCollection_1.htm b/report/coverlet/WireMock.Net_ConcurentObservableCollection_1.htm index 43a13363f..4e604a2fe 100644 --- a/report/coverlet/WireMock.Net_ConcurentObservableCollection_1.htm +++ b/report/coverlet/WireMock.Net_ConcurentObservableCollection_1.htm @@ -55,12 +55,12 @@

 10    /// <inheritdoc cref="ObservableCollection{T}" />  11    public class ConcurentObservableCollection<T> : ObservableCollection<T>  12    { - 5513        private readonly object _lockObject = new object(); + 5413        private readonly object _lockObject = new object();  14  15        /// <summary>  16        /// Initializes a new instance of the <see cref="T:WireMock.Util.ConcurentObservableCollection`1" /> class.  17        /// </summary> - 16518        public ConcurentObservableCollection() { } + 16218        public ConcurentObservableCollection() { }  19  20        /// <summary>  21        /// Initializes a new instance of the <see cref="ConcurentObservableCollection{T}"/> class that contains element @@ -76,30 +76,30 @@

 31  32        /// <inheritdoc cref="ObservableCollection{T}.ClearItems"/>  33        protected override void ClearItems() - 934        { - 935            lock (_lockObject) - 936            { - 937                base.ClearItems(); - 938            } - 939        } + 134        { + 135            lock (_lockObject) + 136            { + 137                base.ClearItems(); + 138            } + 139        }  40  41        /// <inheritdoc cref="ObservableCollection{T}.RemoveItem"/>  42        protected override void RemoveItem(int index) - 143        { - 144            lock (_lockObject) - 145            { - 146                base.RemoveItem(index); - 147            } - 148        } + 243        { + 244            lock (_lockObject) + 245            { + 246                base.RemoveItem(index); + 247            } + 248        }  49  50        /// <inheritdoc cref="ObservableCollection{T}.InsertItem"/>  51        protected override void InsertItem(int index, T item) - 5752        { - 5753            lock (_lockObject) - 5754            { - 5755                base.InsertItem(index, item); - 5756            } - 5757        } + 4052        { + 4053            lock (_lockObject) + 4054            { + 4055                base.InsertItem(index, item); + 4056            } + 4057        }  58  59        /// <inheritdoc cref="ObservableCollection{T}.SetItem"/>  60        protected override void SetItem(int index, T item) @@ -122,7 +122,7 @@

 77} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_CookieModel.htm b/report/coverlet/WireMock.Net_CookieModel.htm index a7ea3762a..20719bfd6 100644 --- a/report/coverlet/WireMock.Net_CookieModel.htm +++ b/report/coverlet/WireMock.Net_CookieModel.htm @@ -51,7 +51,7 @@

 20} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_CoreStrings.htm b/report/coverlet/WireMock.Net_CoreStrings.htm index 27ee02296..629dcda87 100644 --- a/report/coverlet/WireMock.Net_CoreStrings.htm +++ b/report/coverlet/WireMock.Net_CoreStrings.htm @@ -82,7 +82,7 @@

 41} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_DictionaryExtensions.htm b/report/coverlet/WireMock.Net_DictionaryExtensions.htm index 92badaa1e..51408467b 100644 --- a/report/coverlet/WireMock.Net_DictionaryExtensions.htm +++ b/report/coverlet/WireMock.Net_DictionaryExtensions.htm @@ -72,7 +72,7 @@

 33} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_DynamicAsyncResponseProvider.htm b/report/coverlet/WireMock.Net_DynamicAsyncResponseProvider.htm index 8a186842f..e75d38c1d 100644 --- a/report/coverlet/WireMock.Net_DynamicAsyncResponseProvider.htm +++ b/report/coverlet/WireMock.Net_DynamicAsyncResponseProvider.htm @@ -63,7 +63,7 @@

 24} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_DynamicResponseProvider.htm b/report/coverlet/WireMock.Net_DynamicResponseProvider.htm index 9e381167d..f6193c661 100644 --- a/report/coverlet/WireMock.Net_DynamicResponseProvider.htm +++ b/report/coverlet/WireMock.Net_DynamicResponseProvider.htm @@ -63,7 +63,7 @@

 24} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_EncodingModel.htm b/report/coverlet/WireMock.Net_EncodingModel.htm index d26f5853d..ff93b067e 100644 --- a/report/coverlet/WireMock.Net_EncodingModel.htm +++ b/report/coverlet/WireMock.Net_EncodingModel.htm @@ -39,22 +39,22 @@

 8        /// <summary>  9        /// Encoding CodePage  10        /// </summary> - 10711        public int CodePage { get; set; } + 8711        public int CodePage { get; set; }  12  13        /// <summary>  14        /// Encoding EncodingName  15        /// </summary> - 10116        public string EncodingName { get; set; } + 8116        public string EncodingName { get; set; }  17  18        /// <summary>  19        /// Encoding WebName  20        /// </summary> - 10121        public string WebName { get; set; } + 8121        public string WebName { get; set; }  22    }  23} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_EnhancedFileSystemWatcher.htm b/report/coverlet/WireMock.Net_EnhancedFileSystemWatcher.htm index 4b6e5f2b3..d2cfa41b9 100644 --- a/report/coverlet/WireMock.Net_EnhancedFileSystemWatcher.htm +++ b/report/coverlet/WireMock.Net_EnhancedFileSystemWatcher.htm @@ -305,7 +305,7 @@

 254} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_ExactMatcher.htm b/report/coverlet/WireMock.Net_ExactMatcher.htm index 8a120a5aa..e7338b871 100644 --- a/report/coverlet/WireMock.Net_ExactMatcher.htm +++ b/report/coverlet/WireMock.Net_ExactMatcher.htm @@ -54,7 +54,7 @@

 13        private readonly string[] _values;  14  15        /// <inheritdoc cref="IMatcher.MatchBehaviour"/> - 2516        public MatchBehaviour MatchBehaviour { get; } + 2316        public MatchBehaviour MatchBehaviour { get; }  17  18        /// <summary>  19        /// Initializes a new instance of the <see cref="ExactMatcher"/> class. @@ -79,9 +79,9 @@

 38  39        /// <inheritdoc cref="IStringMatcher.IsMatch"/>  40        public double IsMatch(string input) - 2541        { - 7642            return MatchBehaviourHelper.Convert(MatchBehaviour, MatchScores.ToScore(_values.Select(value => value.Equals - 2543        } + 2341        { + 7042            return MatchBehaviourHelper.Convert(MatchBehaviour, MatchScores.ToScore(_values.Select(value => value.Equals + 2343        }  44  45        /// <inheritdoc cref="IStringMatcher.GetPatterns"/>  46        public string[] GetPatterns() @@ -95,7 +95,7 @@

 54} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_ExactObjectMatcher.htm b/report/coverlet/WireMock.Net_ExactObjectMatcher.htm index b0c945103..827484a1b 100644 --- a/report/coverlet/WireMock.Net_ExactObjectMatcher.htm +++ b/report/coverlet/WireMock.Net_ExactObjectMatcher.htm @@ -114,7 +114,7 @@

 71} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_FileHelper.htm b/report/coverlet/WireMock.Net_FileHelper.htm index b8a097f7b..9466a26c3 100644 --- a/report/coverlet/WireMock.Net_FileHelper.htm +++ b/report/coverlet/WireMock.Net_FileHelper.htm @@ -73,7 +73,7 @@

 34} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_FluentMockServer.htm b/report/coverlet/WireMock.Net_FluentMockServer.htm index 799fa2453..398399477 100644 --- a/report/coverlet/WireMock.Net_FluentMockServer.htm +++ b/report/coverlet/WireMock.Net_FluentMockServer.htm @@ -17,12 +17,12 @@

Summary

Class:WireMock.Server.FluentMockServer Assembly:WireMock.Net File(s):C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Server\FluentMockServer.Admin.cs
C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Server\FluentMockServer.cs
C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Server\FluentMockServer.LogEntries.cs -Covered lines:399 -Uncovered lines:333 -Coverable lines:732 -Total lines:1311 -Line coverage:54.5% -Branch coverage:58% +Covered lines:397 +Uncovered lines:339 +Coverable lines:736 +Total lines:1316 +Line coverage:53.9% +Branch coverage:54.5%

Metrics

@@ -35,14 +35,14 @@

Metrics

WatchStaticMappings(...)000.250.75 ReadStaticMappingAndAddOrUpdate(...)0011 InitProxyAndRecord(...)0011 -ToMapping(...)0000 +ToMapping(...)0000 SettingsGet(...)0010.5 SettingsUpdate(...)000.5710.5 MappingGet(...)0000 MappingPut(...)0000 MappingDelete(...)0000 MappingsSave(...)0000 -SaveMappingToFile(...)000.80.667 +SaveMappingToFile(...)000.80.667 SanitizeFileName(...)0000 MappingsGet(...)0000 MappingsPost(...)000.4670 @@ -56,7 +56,7 @@

Metrics

ScenariosGet(...)0000 ScenariosReset(...)0000 InitRequestBuilder(...)000.4240.404 -InitResponseBuilder(...)000.5740.618 +InitResponseBuilder(...)000.5740.633 ToJson(...)0010.5 ToEncoding(...)0011 DeserializeObject(...)0010.5 @@ -77,18 +77,18 @@

Metrics

DeleteMapping(...)0000 DeleteMapping(...)0000 AddGlobalProcessingDelay(...)0010 -AllowPartialMapping(...)0000 +AllowPartialMapping(...)0010 SetBasicAuthentication(...)0010 RemoveBasicAuthentication()0010 SetMaxRequestLogCount(...)0010 -SetRequestLogExpirationDuration(...)0000 +SetRequestLogExpirationDuration(...)0010 ResetScenarios()0000 Given(...)0010 -RegisterMapping(...)0011 -.ctor(...)000.750.659 +RegisterMapping(...)0011 +.ctor(...)000.8090.735 add_LogEntriesChanged(...)0010 remove_LogEntriesChanged(...)0000 -FindLogEntries(...)0011 +FindLogEntries(...)0000 ResetLogEntries()0010 DeleteLogEntry(...)0000 @@ -139,20 +139,20 @@

 39        private const string AdminSettings = "/__admin/settings";  40        private const string AdminScenarios = "/__admin/scenarios";  41 - 5542        private readonly RegexMatcher _adminMappingsGuidPathMatcher = new RegexMatcher(MatchBehaviour.AcceptOnMatch, @"^ - 5543        private readonly RegexMatcher _adminRequestsGuidPathMatcher = new RegexMatcher(MatchBehaviour.AcceptOnMatch, @"^ + 4742        private readonly RegexMatcher _adminMappingsGuidPathMatcher = new RegexMatcher(MatchBehaviour.AcceptOnMatch, @"^ + 4743        private readonly RegexMatcher _adminRequestsGuidPathMatcher = new RegexMatcher(MatchBehaviour.AcceptOnMatch, @"^  44 - 5545        private readonly JsonSerializerSettings _settings = new JsonSerializerSettings - 5546        { - 5547            Formatting = Formatting.Indented, - 5548            NullValueHandling = NullValueHandling.Ignore - 5549        }; + 4745        private readonly JsonSerializerSettings _settings = new JsonSerializerSettings + 4746        { + 4747            Formatting = Formatting.Indented, + 4748            NullValueHandling = NullValueHandling.Ignore + 4749        };  50 - 5551        private readonly JsonSerializerSettings _settingsIncludeNullValues = new JsonSerializerSettings - 5552        { - 5553            Formatting = Formatting.Indented, - 5554            NullValueHandling = NullValueHandling.Include - 5555        }; + 4751        private readonly JsonSerializerSettings _settingsIncludeNullValues = new JsonSerializerSettings + 4752        { + 4753            Formatting = Formatting.Indented, + 4754            NullValueHandling = NullValueHandling.Include + 4755        };  56  57        #region InitAdmin  58        private void InitAdmin() @@ -326,7 +326,7 @@

 2226            _httpClientForProxy = HttpClientHelper.CreateHttpClient(settings.ProxyAndRecordSettings.ClientX509Certificat  227  2228            var respondProvider = Given(Request.Create().WithPath("/*").UsingAnyMethod()); - 2229            if (settings.StartAdminInterface == true) + 2229            if (settings.StartAdminInterface == true)  1230            {  1231                respondProvider.AtPriority(ProxyPriority);  1232            } @@ -356,7 +356,7 @@

 0256            return responseMessage;  0257        }  258259        private Mapping ToMapping(RequestMessage requestMessage, ResponseMessage responseMessage, string[] blacklistedHe259        private IMapping ToMapping(RequestMessage requestMessage, ResponseMessage responseMessage, string[] blacklistedH  0260        {  0261            var request = Request.Create();  0262            request.WithPath(requestMessage.Path); @@ -471,7 +471,7 @@

 0371            return ResponseMessageBuilder.Create("Mappings saved to disk");  0372        }  373374        private void SaveMappingToFile(Mapping mapping, string folder = null)374        private void SaveMappingToFile(IMapping mapping, string folder = null)  1375        {  1376            if (folder == null)  1377            { @@ -791,7 +791,7 @@

 11691        {  11692            IResponseBuilder responseBuilder = Response.Create();  693 - 11694            if (responseModel.Delay > 0) + 11694            if (responseModel.Delay > 0)  0695            {  0696                responseBuilder = responseBuilder.WithDelay(responseModel.Delay.Value);  0697            } @@ -841,7 +841,7 @@

 7741            }  4742            else if (responseModel.BodyAsJson != null)  1743            { - 1744                responseBuilder = responseBuilder.WithBodyAsJson(responseModel.BodyAsJson, ToEncoding(responseModel.Body + 1744                responseBuilder = responseBuilder.WithBodyAsJson(responseModel.BodyAsJson, ToEncoding(responseModel.Body  1745            }  3746            else if (responseModel.BodyFromBase64 != null)  0747            { @@ -920,7 +920,7 @@

 29  30        private const int ServerStartDelay = 100;  31        private readonly IOwinSelfHost _httpServer; - 5532        private readonly WireMockMiddlewareOptions _options = new WireMockMiddlewareOptions(); + 4732        private readonly IWireMockMiddlewareOptions _options = new WireMockMiddlewareOptions();  33  34        /// <summary>  35        /// Gets a value indicating whether this server is started. @@ -932,19 +932,19 @@

 41        /// Gets the ports.  42        /// </summary>  43        [PublicAPI] - 4044        public List<int> Ports { get; } + 2044        public List<int> Ports { get; }  45  46        /// <summary>  47        /// Gets the urls.  48        /// </summary>  49        [PublicAPI] - 7250        public string[] Urls { get; } + 6450        public string[] Urls { get; }  51  52        /// <summary>  53        /// Gets the mappings.  54        /// </summary>  55        [PublicAPI] - 1856        public IEnumerable<Mapping> Mappings => _options.Mappings.Values.ToArray(); + 1856        public IEnumerable<IMapping> Mappings => _options.Mappings.Values.ToArray();  57  58        /// <summary>  59        /// Gets the scenarios. @@ -983,11 +983,11 @@

 92        /// <returns>The <see cref="FluentMockServer"/>.</returns>  93        [PublicAPI]  94        public static FluentMockServer Start(IFluentMockServerSettings settings) - 1495        { - 1496            Check.NotNull(settings, nameof(settings)); + 1695        { + 1696            Check.NotNull(settings, nameof(settings));  97 - 1498            return new FluentMockServer(settings); - 1499        } + 1698            return new FluentMockServer(settings); + 1699        }  100  101        /// <summary>  102        /// Start this FluentMockServer. @@ -997,13 +997,13 @@

 106        /// <returns>The <see cref="FluentMockServer"/>.</returns>  107        [PublicAPI]  108        public static FluentMockServer Start([CanBeNull] int? port = 0, bool ssl = false) - 36109        { - 36110            return new FluentMockServer(new FluentMockServerSettings - 36111            { - 36112                Port = port, - 36113                UseSSL = ssl - 36114            }); - 36115        } + 26109        { + 26110            return new FluentMockServer(new FluentMockServerSettings + 26111            { + 26112                Port = port, + 26113                UseSSL = ssl + 26114            }); + 26115        }  116  117        /// <summary>  118        /// Start this FluentMockServer. @@ -1073,65 +1073,65 @@

 0182            });  0183        }  184 - 55185        private FluentMockServer(IFluentMockServerSettings settings) - 55186        { - 55187            settings.Logger = settings.Logger ?? new WireMockConsoleLogger(); + 47185        private FluentMockServer(IFluentMockServerSettings settings) + 47186        { + 47187            settings.Logger = settings.Logger ?? new WireMockConsoleLogger();  188 - 55189            _logger = settings.Logger; - 55190            _fileSystemHandler = settings.FileSystemHandler ?? new LocalFileSystemHandler(); + 47189            _logger = settings.Logger; + 47190            _fileSystemHandler = settings.FileSystemHandler ?? new LocalFileSystemHandler();  191 - 55192            _logger.Info("WireMock.Net by Stef Heyenrath (https://github.com/WireMock-Net/WireMock.Net)"); - 55193            _logger.Debug("WireMock.Net server settings {0}", JsonConvert.SerializeObject(settings, Formatting.Indented) + 47192            _logger.Info("WireMock.Net by Stef Heyenrath (https://github.com/WireMock-Net/WireMock.Net)"); + 47193            _logger.Debug("WireMock.Net server settings {0}", JsonConvert.SerializeObject(settings, Formatting.Indented)  194 - 55195            if (settings.Urls != null) + 47195            if (settings.Urls != null)  1196            {  1197                Urls = settings.Urls.ToArray();  1198            }  199            else - 54200            { - 54201                int port = settings.Port > 0 ? settings.Port.Value : PortUtils.FindFreeTcpPort(); - 54202                Urls = new[] { $"{(settings.UseSSL == true ? "https" : "http")}://localhost:{port}" }; - 54203            } + 46200            { + 46201                int port = settings.Port > 0 ? settings.Port.Value : PortUtils.FindFreeTcpPort(); + 46202                Urls = new[] { $"{(settings.UseSSL == true ? "https" : "http")}://localhost:{port}" }; + 46203            }  204 - 55205            _options.PreWireMockMiddlewareInit = settings.PreWireMockMiddlewareInit; - 55206            _options.PostWireMockMiddlewareInit = settings.PostWireMockMiddlewareInit; - 55207            _options.Logger = _logger; + 47205            _options.PreWireMockMiddlewareInit = settings.PreWireMockMiddlewareInit; + 47206            _options.PostWireMockMiddlewareInit = settings.PostWireMockMiddlewareInit; + 47207            _options.Logger = _logger;  208  209#if USE_ASPNETCORE - 55210            _httpServer = new AspNetCoreSelfHost(_options, Urls); + 47210            _httpServer = new AspNetCoreSelfHost(_options, Urls);  211#else  212            _httpServer = new OwinSelfHost(_options, Urls);  213#endif - 55214            Ports = _httpServer.Ports; + 47214            Ports = _httpServer.Ports;  215 - 55216            _httpServer.StartAsync(); + 47216            _httpServer.StartAsync();  217 - 55218            using (var ctsStartTimeout = new CancellationTokenSource(settings.StartTimeout)) - 55219            { - 451220                while (!_httpServer.IsStarted) - 396221                { + 47218            using (var ctsStartTimeout = new CancellationTokenSource(settings.StartTimeout)) + 47219            { + 480220                while (!_httpServer.IsStarted) + 433221                {  222                    // Throw out exception if service start fails - 396223                    if (_httpServer.RunningException != null) + 433223                    if (_httpServer.RunningException != null)  0224                    {  0225                        throw new Exception($"Service start failed with error: {_httpServer.RunningException.Message}",   226                    }  227  228                    // Respect start timeout setting by throwing TimeoutException - 396229                    if (ctsStartTimeout.IsCancellationRequested) + 433229                    if (ctsStartTimeout.IsCancellationRequested)  0230                    {  0231                        throw new TimeoutException($"Service start timed out after {TimeSpan.FromMilliseconds(settings.S  232                    }  233 - 396234                    ctsStartTimeout.Token.WaitHandle.WaitOne(ServerStartDelay); - 396235                } - 55236            } + 433234                    ctsStartTimeout.Token.WaitHandle.WaitOne(ServerStartDelay); + 433235                } + 47236            }  237 - 55238            if (settings.AllowPartialMapping == true) - 0239            { - 0240                AllowPartialMapping(); - 0241            } + 47238            if (settings.AllowPartialMapping == true) + 1239            { + 1240                AllowPartialMapping(); + 1241            }  242 - 55243            if (settings.StartAdminInterface == true) + 47243            if (settings.StartAdminInterface == true)  11244            {  11245                if (!string.IsNullOrEmpty(settings.AdminUsername) && !string.IsNullOrEmpty(settings.AdminPassword))  1246                { @@ -1141,194 +1141,199 @@

 11250                InitAdmin();  11251            }  252 - 55253            if (settings.ReadStaticMappings == true) + 47253            if (settings.ReadStaticMappings == true)  0254            {  0255                ReadStaticMappings();  0256            }  257 - 55258            if (settings.WatchStaticMappings == true) + 47258            if (settings.WatchStaticMappings == true)  0259            {  0260                WatchStaticMappings();  0261            }  262 - 55263            if (settings.ProxyAndRecordSettings != null) + 47263            if (settings.ProxyAndRecordSettings != null)  2264            {  2265                InitProxyAndRecord(settings);  2266            }  267 - 55268            if (settings.MaxRequestLogCount != null) - 0269            { - 0270                SetMaxRequestLogCount(settings.MaxRequestLogCount); - 0271            } - 55272        }273274        /// <summary>275        /// Stop this server.276        /// </summary>277        [PublicAPI]278        public void Stop() - 2279        { - 2280            var result = _httpServer?.StopAsync(); - 2281            result?.Wait(); // wait for stop to actually happen - 2282        }283        #endregion284285        /// <summary>286        /// Adds the catch all mapping.287        /// </summary>288        [PublicAPI]289        public void AddCatchAllMapping() - 0290        { - 0291            Given(Request.Create().WithPath("/*").UsingAnyMethod()) - 0292                .WithGuid(Guid.Parse("90008000-0000-4444-a17e-669cd84f1f05")) - 0293                .AtPriority(1000) - 0294                .RespondWith(new DynamicResponseProvider(request => ResponseMessageBuilder.Create("No matching mapping f - 0295        }296297        /// <summary>298        /// Resets LogEntries and Mappings.299        /// </summary>300        [PublicAPI]301        public void Reset() - 0302        { - 0303            ResetLogEntries();304 - 0305            ResetMappings(); - 0306        }307308        /// <summary>309        /// Resets the Mappings.310        /// </summary>311        [PublicAPI]312        public void ResetMappings() - 10313        { - 66314            foreach (var nonAdmin in _options.Mappings.ToArray().Where(m => !m.Value.IsAdminInterface)) - 12315            { - 12316                _options.Mappings.TryRemove(nonAdmin.Key, out _); - 12317            } - 10318        }319320        /// <summary>321        /// Deletes the mapping.322        /// </summary>323        /// <param name="guid">The unique identifier.</param>324        [PublicAPI]325        public bool DeleteMapping(Guid guid) - 0326        {327            // Check a mapping exists with the same GUID, if so, remove it. - 0328            if (_options.Mappings.ContainsKey(guid)) - 0329            { - 0330                return _options.Mappings.TryRemove(guid, out _);331            }332 - 0333            return false; - 0334        }335336        private bool DeleteMapping(string path) - 0337        {338            // Check a mapping exists with the same path, if so, remove it. - 0339            var mapping = _options.Mappings.ToArray().FirstOrDefault(entry => string.Equals(entry.Value.Path, path, Stri - 0340            return DeleteMapping(mapping.Key); - 0341        }342343        /// <summary>344        /// The add request processing delay.345        /// </summary>346        /// <param name="delay">The delay.</param>347        [PublicAPI]348        public void AddGlobalProcessingDelay(TimeSpan delay) - 1349        { - 1350            _options.RequestProcessingDelay = delay; - 1351        }352353        /// <summary>354        /// Allows the partial mapping.355        /// </summary>356        [PublicAPI]357        public void AllowPartialMapping(bool allow = true) - 0358        { - 0359            _logger.Info("AllowPartialMapping is set to {0}", allow); - 0360            _options.AllowPartialMapping = allow; - 0361        }362363        /// <summary>364        /// Sets the basic authentication.365        /// </summary>366        /// <param name="username">The username.</param>367        /// <param name="password">The password.</param>368        [PublicAPI]369        public void SetBasicAuthentication([NotNull] string username, [NotNull] string password) - 3370        { - 3371            Check.NotNull(username, nameof(username)); - 3372            Check.NotNull(password, nameof(password));373 - 3374            string authorization = Convert.ToBase64String(Encoding.GetEncoding("ISO-8859-1").GetBytes(username + ":" + p - 3375            _options.AuthorizationMatcher = new RegexMatcher(MatchBehaviour.AcceptOnMatch, "^(?i)BASIC " + authorization - 3376        }377378        /// <summary>379        /// Removes the basic authentication.380        /// </summary>381        [PublicAPI]382        public void RemoveBasicAuthentication() - 1383        { - 1384            _options.AuthorizationMatcher = null; - 1385        }386387        /// <summary>388        /// Sets the maximum RequestLog count.389        /// </summary>390        /// <param name="maxRequestLogCount">The maximum RequestLog count.</param>391        [PublicAPI]392        public void SetMaxRequestLogCount([CanBeNull] int? maxRequestLogCount) - 1393        { - 1394            _options.MaxRequestLogCount = maxRequestLogCount; - 1395        }396397        /// <summary>398        /// Sets RequestLog expiration in hours.399        /// </summary>400        /// <param name="requestLogExpirationDuration">The RequestLog expiration in hours.</param>401        [PublicAPI]402        public void SetRequestLogExpirationDuration([CanBeNull] int? requestLogExpirationDuration) - 0403        { - 0404            _options.RequestLogExpirationDuration = requestLogExpirationDuration; - 0405        }406407        /// <summary>408        /// Resets the Scenarios.409        /// </summary>410        [PublicAPI]411        public void ResetScenarios() - 0412        { - 0413            _options.Scenarios.Clear(); - 0414        }415416        /// <summary>417        /// The given.418        /// </summary>419        /// <param name="requestMatcher">The request matcher.</param>420        /// <returns>The <see cref="IRespondWithAProvider"/>.</returns>421        [PublicAPI]422        public IRespondWithAProvider Given(IRequestMatcher requestMatcher) - 264423        { - 264424            return new RespondWithAProvider(RegisterMapping, requestMatcher); - 264425        }426427        private void RegisterMapping(Mapping mapping) - 264428        {429            // Check a mapping exists with the same Guid, if so, replace it. - 264430            if (_options.Mappings.ContainsKey(mapping.Guid)) - 1431            { - 1432                _options.Mappings[mapping.Guid] = mapping; - 1433            }434            else - 263435            { - 263436                _options.Mappings.TryAdd(mapping.Guid, mapping); - 263437            } - 264438        }439    }440} + 47268            if (settings.RequestLogExpirationDuration != null) + 1269            { + 1270                SetRequestLogExpirationDuration(settings.RequestLogExpirationDuration); + 1271            }272 + 47273            if (settings.MaxRequestLogCount != null) + 0274            { + 0275                SetMaxRequestLogCount(settings.MaxRequestLogCount); + 0276            } + 47277        }278279        /// <summary>280        /// Stop this server.281        /// </summary>282        [PublicAPI]283        public void Stop() + 2284        { + 2285            var result = _httpServer?.StopAsync(); + 2286            result?.Wait(); // wait for stop to actually happen + 2287        }288        #endregion289290        /// <summary>291        /// Adds the catch all mapping.292        /// </summary>293        [PublicAPI]294        public void AddCatchAllMapping() + 0295        { + 0296            Given(Request.Create().WithPath("/*").UsingAnyMethod()) + 0297                .WithGuid(Guid.Parse("90008000-0000-4444-a17e-669cd84f1f05")) + 0298                .AtPriority(1000) + 0299                .RespondWith(new DynamicResponseProvider(request => ResponseMessageBuilder.Create("No matching mapping f + 0300        }301302        /// <summary>303        /// Resets LogEntries and Mappings.304        /// </summary>305        [PublicAPI]306        public void Reset() + 0307        { + 0308            ResetLogEntries();309 + 0310            ResetMappings(); + 0311        }312313        /// <summary>314        /// Resets the Mappings.315        /// </summary>316        [PublicAPI]317        public void ResetMappings() + 2318        { + 18319            foreach (var nonAdmin in _options.Mappings.ToArray().Where(m => !m.Value.IsAdminInterface)) + 4320            { + 4321                _options.Mappings.TryRemove(nonAdmin.Key, out _); + 4322            } + 2323        }324325        /// <summary>326        /// Deletes the mapping.327        /// </summary>328        /// <param name="guid">The unique identifier.</param>329        [PublicAPI]330        public bool DeleteMapping(Guid guid) + 0331        {332            // Check a mapping exists with the same GUID, if so, remove it. + 0333            if (_options.Mappings.ContainsKey(guid)) + 0334            { + 0335                return _options.Mappings.TryRemove(guid, out _);336            }337 + 0338            return false; + 0339        }340341        private bool DeleteMapping(string path) + 0342        {343            // Check a mapping exists with the same path, if so, remove it. + 0344            var mapping = _options.Mappings.ToArray().FirstOrDefault(entry => string.Equals(entry.Value.Path, path, Stri + 0345            return DeleteMapping(mapping.Key); + 0346        }347348        /// <summary>349        /// The add request processing delay.350        /// </summary>351        /// <param name="delay">The delay.</param>352        [PublicAPI]353        public void AddGlobalProcessingDelay(TimeSpan delay) + 1354        { + 1355            _options.RequestProcessingDelay = delay; + 1356        }357358        /// <summary>359        /// Allows the partial mapping.360        /// </summary>361        [PublicAPI]362        public void AllowPartialMapping(bool allow = true) + 1363        { + 1364            _logger.Info("AllowPartialMapping is set to {0}", allow); + 1365            _options.AllowPartialMapping = allow; + 1366        }367368        /// <summary>369        /// Sets the basic authentication.370        /// </summary>371        /// <param name="username">The username.</param>372        /// <param name="password">The password.</param>373        [PublicAPI]374        public void SetBasicAuthentication([NotNull] string username, [NotNull] string password) + 3375        { + 3376            Check.NotNull(username, nameof(username)); + 3377            Check.NotNull(password, nameof(password));378 + 3379            string authorization = Convert.ToBase64String(Encoding.GetEncoding("ISO-8859-1").GetBytes(username + ":" + p + 3380            _options.AuthorizationMatcher = new RegexMatcher(MatchBehaviour.AcceptOnMatch, "^(?i)BASIC " + authorization + 3381        }382383        /// <summary>384        /// Removes the basic authentication.385        /// </summary>386        [PublicAPI]387        public void RemoveBasicAuthentication() + 1388        { + 1389            _options.AuthorizationMatcher = null; + 1390        }391392        /// <summary>393        /// Sets the maximum RequestLog count.394        /// </summary>395        /// <param name="maxRequestLogCount">The maximum RequestLog count.</param>396        [PublicAPI]397        public void SetMaxRequestLogCount([CanBeNull] int? maxRequestLogCount) + 1398        { + 1399            _options.MaxRequestLogCount = maxRequestLogCount; + 1400        }401402        /// <summary>403        /// Sets RequestLog expiration in hours.404        /// </summary>405        /// <param name="requestLogExpirationDuration">The RequestLog expiration in hours.</param>406        [PublicAPI]407        public void SetRequestLogExpirationDuration([CanBeNull] int? requestLogExpirationDuration) + 1408        { + 1409            _options.RequestLogExpirationDuration = requestLogExpirationDuration; + 1410        }411412        /// <summary>413        /// Resets the Scenarios.414        /// </summary>415        [PublicAPI]416        public void ResetScenarios() + 0417        { + 0418            _options.Scenarios.Clear(); + 0419        }420421        /// <summary>422        /// The given.423        /// </summary>424        /// <param name="requestMatcher">The request matcher.</param>425        /// <returns>The <see cref="IRespondWithAProvider"/>.</returns>426        [PublicAPI]427        public IRespondWithAProvider Given(IRequestMatcher requestMatcher) + 249428        { + 249429            return new RespondWithAProvider(RegisterMapping, requestMatcher); + 249430        }431432        private void RegisterMapping(IMapping mapping) + 249433        {434            // Check a mapping exists with the same Guid, if so, replace it. + 249435            if (_options.Mappings.ContainsKey(mapping.Guid)) + 1436            { + 1437                _options.Mappings[mapping.Guid] = mapping; + 1438            }439            else + 248440            { + 248441                _options.Mappings.TryAdd(mapping.Guid, mapping); + 248442            } + 249443        }444    }445}

C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Server\FluentMockServer.LogEntries.cs

@@ -1364,7 +1369,7 @@

 27        /// Gets the request logs.  28        /// </summary>  29        [PublicAPI] - 1230        public IEnumerable<LogEntry> LogEntries => new ReadOnlyCollection<LogEntry>(_options.LogEntries); + 1030        public IEnumerable<LogEntry> LogEntries => new ReadOnlyCollection<LogEntry>(_options.LogEntries);  31  32        /// <summary>  33        /// The search log-entries based on matchers. @@ -1373,34 +1378,34 @@

 36        /// <returns>The <see cref="IEnumerable"/>.</returns>  37        [PublicAPI]  38        public IEnumerable<LogEntry> FindLogEntries([NotNull] params IRequestMatcher[] matchers) - 139        { - 140            var results = new Dictionary<LogEntry, RequestMatchResult>(); + 039        { + 040            var results = new Dictionary<LogEntry, RequestMatchResult>();  41 - 742            foreach (var log in _options.LogEntries) - 243            { - 244                var requestMatchResult = new RequestMatchResult(); - 1045                foreach (var matcher in matchers) - 246                { - 247                    matcher.GetMatchingScore(log.RequestMessage, requestMatchResult); - 248                } + 042            foreach (var log in _options.LogEntries) + 043            { + 044                var requestMatchResult = new RequestMatchResult(); + 045                foreach (var matcher in matchers) + 046                { + 047                    matcher.GetMatchingScore(log.RequestMessage, requestMatchResult); + 048                }  49 - 250                if (requestMatchResult.AverageTotalScore > MatchScores.AlmostPerfect) - 151                { - 152                    results.Add(log, requestMatchResult); - 153                } - 254            } + 050                if (requestMatchResult.AverageTotalScore > MatchScores.AlmostPerfect) + 051                { + 052                    results.Add(log, requestMatchResult); + 053                } + 054            }  55 - 356            return new ReadOnlyCollection<LogEntry>(results.OrderBy(x => x.Value).Select(x => x.Key).ToList()); - 157        } + 056            return new ReadOnlyCollection<LogEntry>(results.OrderBy(x => x.Value).Select(x => x.Key).ToList()); + 057        }  58  59        /// <summary>  60        /// Resets the LogEntries.  61        /// </summary>  62        [PublicAPI]  63        public void ResetLogEntries() - 964        { - 965            _options.LogEntries.Clear(); - 966        } + 164        { + 165            _options.LogEntries.Clear(); + 166        }  67  68        /// <summary>  69        /// Deletes a LogEntry. @@ -1423,7 +1428,7 @@

 86} -

+

Methods/Properties

@@ -1442,7 +1447,7 @@

Methods/Properties

MappingPut(WireMock.RequestMessage)
MappingDelete(WireMock.RequestMessage)
MappingsSave(WireMock.RequestMessage)
-SaveMappingToFile(WireMock.Mapping,System.String)
+SaveMappingToFile(WireMock.IMapping,System.String)
SanitizeFileName(System.String,System.Char)
MappingsGet(WireMock.RequestMessage)
MappingsPost(WireMock.RequestMessage)
@@ -1474,21 +1479,21 @@

Methods/Properties

StartWithAdminInterface(System.Nullable`1<System.Int32>,System.Boolean)
StartWithAdminInterface(System.String[])
StartWithAdminInterfaceAndReadStaticMappings(System.String[])
-Stop()
-AddCatchAllMapping()
-Reset()
-ResetMappings()
-DeleteMapping(System.Guid)
-DeleteMapping(System.String)
-AddGlobalProcessingDelay(System.TimeSpan)
-AllowPartialMapping(System.Boolean)
-SetBasicAuthentication(System.String,System.String)
-RemoveBasicAuthentication()
-SetMaxRequestLogCount(System.Nullable`1<System.Int32>)
-SetRequestLogExpirationDuration(System.Nullable`1<System.Int32>)
-ResetScenarios()
-Given(WireMock.Matchers.Request.IRequestMatcher)
-RegisterMapping(WireMock.Mapping)
+Stop()
+AddCatchAllMapping()
+Reset()
+ResetMappings()
+DeleteMapping(System.Guid)
+DeleteMapping(System.String)
+AddGlobalProcessingDelay(System.TimeSpan)
+AllowPartialMapping(System.Boolean)
+SetBasicAuthentication(System.String,System.String)
+RemoveBasicAuthentication()
+SetMaxRequestLogCount(System.Nullable`1<System.Int32>)
+SetRequestLogExpirationDuration(System.Nullable`1<System.Int32>)
+ResetScenarios()
+Given(WireMock.Matchers.Request.IRequestMatcher)
+RegisterMapping(WireMock.IMapping)
add_LogEntriesChanged(System.Collections.Specialized.NotifyCollectionChangedEventHandler)
remove_LogEntriesChanged(System.Collections.Specialized.NotifyCollectionChangedEventHandler)
LogEntries()
diff --git a/report/coverlet/WireMock.Net_FluentMockServerSettings.htm b/report/coverlet/WireMock.Net_FluentMockServerSettings.htm index 0b8806b8f..b8a72649a 100644 --- a/report/coverlet/WireMock.Net_FluentMockServerSettings.htm +++ b/report/coverlet/WireMock.Net_FluentMockServerSettings.htm @@ -44,81 +44,81 @@

 13    {  14        /// <inheritdoc cref="IFluentMockServerSettings.Port"/>  15        [PublicAPI] - 14816        public int? Port { get; set; } + 12316        public int? Port { get; set; }  17  18        /// <inheritdoc cref="IFluentMockServerSettings.UseSSL"/>  19        [PublicAPI]  20        // ReSharper disable once InconsistentNaming - 14921        public bool? UseSSL { get; set; } + 12321        public bool? UseSSL { get; set; }  22  23        /// <inheritdoc cref="IFluentMockServerSettings.StartAdminInterface"/>  24        [PublicAPI] - 12425        public bool? StartAdminInterface { get; set; } + 10825        public bool? StartAdminInterface { get; set; }  26  27        /// <inheritdoc cref="IFluentMockServerSettings.ReadStaticMappings"/>  28        [PublicAPI] - 11029        public bool? ReadStaticMappings { get; set; } + 9429        public bool? ReadStaticMappings { get; set; }  30  31        /// <inheritdoc cref="IFluentMockServerSettings.WatchStaticMappings"/>  32        [PublicAPI] - 11033        public bool? WatchStaticMappings { get; set; } + 9433        public bool? WatchStaticMappings { get; set; }  34  35        /// <inheritdoc cref="IFluentMockServerSettings.ProxyAndRecordSettings"/>  36        [PublicAPI] - 11637        public IProxyAndRecordSettings ProxyAndRecordSettings { get; set; } + 10037        public IProxyAndRecordSettings ProxyAndRecordSettings { get; set; }  38  39        /// <inheritdoc cref="IFluentMockServerSettings.Urls"/>  40        [PublicAPI] - 11241        public string[] Urls { get; set; } + 9641        public string[] Urls { get; set; }  42  43        /// <inheritdoc cref="IFluentMockServerSettings.StartTimeout"/>  44        [PublicAPI] - 16545        public int StartTimeout { get; set; } = 10000; + 14145        public int StartTimeout { get; set; } = 10000;  46  47        /// <inheritdoc cref="IFluentMockServerSettings.AllowPartialMapping"/>  48        [PublicAPI] - 11049        public bool? AllowPartialMapping { get; set; } + 9549        public bool? AllowPartialMapping { get; set; }  50  51        /// <inheritdoc cref="IFluentMockServerSettings.AdminUsername"/>  52        [PublicAPI] - 6953        public string AdminUsername { get; set; } + 6153        public string AdminUsername { get; set; }  54  55        /// <inheritdoc cref="IFluentMockServerSettings.AdminPassword"/>  56        [PublicAPI] - 5957        public string AdminPassword { get; set; } + 5157        public string AdminPassword { get; set; }  58  59        /// <inheritdoc cref="IFluentMockServerSettings.RequestLogExpirationDuration"/>  60        [PublicAPI] - 5561        public int? RequestLogExpirationDuration { get; set; } + 9661        public int? RequestLogExpirationDuration { get; set; }  62  63        /// <inheritdoc cref="IFluentMockServerSettings.MaxRequestLogCount"/>  64        [PublicAPI] - 11065        public int? MaxRequestLogCount { get; set; } + 9465        public int? MaxRequestLogCount { get; set; }  66  67        /// <inheritdoc cref="IFluentMockServerSettings.PreWireMockMiddlewareInit"/>  68        [PublicAPI]  69        [JsonIgnore] - 5570        public Action<object> PreWireMockMiddlewareInit { get; set; } + 4770        public Action<object> PreWireMockMiddlewareInit { get; set; }  71  72        /// <inheritdoc cref="IFluentMockServerSettings.PostWireMockMiddlewareInit"/>  73        [PublicAPI]  74        [JsonIgnore] - 5575        public Action<object> PostWireMockMiddlewareInit { get; set; } + 4775        public Action<object> PostWireMockMiddlewareInit { get; set; }  76  77        /// <inheritdoc cref="IFluentMockServerSettings.Logger"/>  78        [PublicAPI]  79        [JsonIgnore] - 22580        public IWireMockLogger Logger { get; set; } = new WireMockNullLogger(); + 19580        public IWireMockLogger Logger { get; set; } = new WireMockNullLogger();  81  82        /// <inheritdoc cref="IFluentMockServerSettings.FileSystemHandler"/>  83        [PublicAPI]  84        [JsonIgnore] - 11485        public IFileSystemHandler FileSystemHandler { get; set; } = new LocalFileSystemHandler(); + 9885        public IFileSystemHandler FileSystemHandler { get; set; } = new LocalFileSystemHandler();  86    }  87} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_GlobalExceptionMiddleware.htm b/report/coverlet/WireMock.Net_GlobalExceptionMiddleware.htm index 3418d3102..3fb7e6478 100644 --- a/report/coverlet/WireMock.Net_GlobalExceptionMiddleware.htm +++ b/report/coverlet/WireMock.Net_GlobalExceptionMiddleware.htm @@ -17,11 +17,11 @@

Summary

Class:WireMock.Owin.GlobalExceptionMiddleware Assembly:WireMock.Net File(s):C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Owin\GlobalExceptionMiddleware.cs -Covered lines:12 +Covered lines:17 Uncovered lines:5 -Coverable lines:17 -Total lines:56 -Line coverage:70.5% +Coverable lines:22 +Total lines:71 +Line coverage:77.2% Branch coverage:58.3% @@ -29,8 +29,9 @@

Metrics

- - + + +
MethodCyclomatic complexity NPath complexity Sequence coverage Branch coverage
.ctor(...)0010
Invoke()000.50.583
Invoke(...)0010
.ctor(...)0010
InvokeInternal()000.50.583

File(s)

@@ -43,66 +44,82 @@

 3using Newtonsoft.Json;  4#if !USE_ASPNETCORE  5using Microsoft.Owin;6#else7using Microsoft.AspNetCore.Http;8#endif910namespace WireMock.Owin11{12#if !USE_ASPNETCORE13    internal class GlobalExceptionMiddleware : OwinMiddleware14#else15    internal class GlobalExceptionMiddleware16#endif17    {18        private readonly WireMockMiddlewareOptions _options;1920#if !USE_ASPNETCORE21        public GlobalExceptionMiddleware(OwinMiddleware next, WireMockMiddlewareOptions options) : base(next)22        {23            _options = options;24        }25#else - 5526        public GlobalExceptionMiddleware(RequestDelegate next, WireMockMiddlewareOptions options) - 5527        { - 5528            Next = next; - 5529            _options = options; - 5530        }31#endif3233#if USE_ASPNETCORE - 6534        public RequestDelegate Next { get; }35#endif36 - 5537        private readonly OwinResponseMapper _responseMapper = new OwinResponseMapper();6using IContext = Microsoft.Owin.IOwinContext;7using OwinMiddleware = Microsoft.Owin.OwinMiddleware;8using Next = Microsoft.Owin.OwinMiddleware;9#else10using OwinMiddleware = System.Object;11using IContext = Microsoft.AspNetCore.Http.HttpContext;12using Next = Microsoft.AspNetCore.Http.RequestDelegate;13#endif14using WireMock.Owin.Mappers;15using WireMock.Validation;1617namespace WireMock.Owin18{19    internal class GlobalExceptionMiddleware : OwinMiddleware20    {21        private readonly IWireMockMiddlewareOptions _options;22        private readonly IOwinResponseMapper _responseMapper;2324#if !USE_ASPNETCORE25        public GlobalExceptionMiddleware(Next next, IWireMockMiddlewareOptions options, IOwinResponseMapper responseMapp26        {27            Check.NotNull(options, nameof(options));28            Check.NotNull(responseMapper, nameof(responseMapper));2930            _options = options;31            _responseMapper = responseMapper;32        }33#else + 4834        public GlobalExceptionMiddleware(Next next, IWireMockMiddlewareOptions options, IOwinResponseMapper responseMapp + 4835        { + 4836            Check.NotNull(options, nameof(options)); + 4837            Check.NotNull(responseMapper, nameof(responseMapper));  3839#if !USE_ASPNETCORE40        public override async Task Invoke(IOwinContext ctx)41#else42        public async Task Invoke(HttpContext ctx) + 4839            Next = next; + 4840            _options = options; + 4841            _responseMapper = responseMapper; + 4842        }  43#endif - 6544        {45            try - 6546            { - 6547                await Next?.Invoke(ctx); - 6548            } - 049            catch (Exception ex) - 050            { - 051                _options.Logger.Error("HttpStatusCode set to 500 {0}", ex); - 052                await _responseMapper.MapAsync(ResponseMessageBuilder.Create(JsonConvert.SerializeObject(ex), 500), ctx. - 053            } - 6554        }55    }56}4445#if USE_ASPNETCORE + 4646        public Next Next { get; }47#endif4849#if !USE_ASPNETCORE50        public override Task Invoke(IContext ctx)51#else52        public Task Invoke(IContext ctx)53#endif + 4654        { + 4655            return InvokeInternal(ctx); + 4656        }5758        private async Task InvokeInternal(IContext ctx) + 4659        {60            try + 4661            { + 4662                await Next?.Invoke(ctx); + 4663            } + 064            catch (Exception ex) + 065            { + 066                _options.Logger.Error("HttpStatusCode set to 500 {0}", ex); + 067                await _responseMapper.MapAsync(ResponseMessageBuilder.Create(JsonConvert.SerializeObject(ex), 500), ctx. + 068            } + 4669        }70    }71} -

+
diff --git a/report/coverlet/WireMock.Net_HandleBarsJsonPath.htm b/report/coverlet/WireMock.Net_HandleBarsJsonPath.htm index 2be2d269e..771b4a659 100644 --- a/report/coverlet/WireMock.Net_HandleBarsJsonPath.htm +++ b/report/coverlet/WireMock.Net_HandleBarsJsonPath.htm @@ -113,7 +113,7 @@

 73} - +

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_HandleBarsLinq.htm b/report/coverlet/WireMock.Net_HandleBarsLinq.htm index 3282eefe8..96e996024 100644 --- a/report/coverlet/WireMock.Net_HandleBarsLinq.htm +++ b/report/coverlet/WireMock.Net_HandleBarsLinq.htm @@ -127,7 +127,7 @@

 86} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_HandleBarsRegex.htm b/report/coverlet/WireMock.Net_HandleBarsRegex.htm index 39cb74d00..c72a7fb13 100644 --- a/report/coverlet/WireMock.Net_HandleBarsRegex.htm +++ b/report/coverlet/WireMock.Net_HandleBarsRegex.htm @@ -106,7 +106,7 @@

 66} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_HandlebarsHelpers.htm b/report/coverlet/WireMock.Net_HandlebarsHelpers.htm index f04cfc169..9e934adc2 100644 --- a/report/coverlet/WireMock.Net_HandlebarsHelpers.htm +++ b/report/coverlet/WireMock.Net_HandlebarsHelpers.htm @@ -52,7 +52,7 @@

 14} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_HeaderModel.htm b/report/coverlet/WireMock.Net_HeaderModel.htm index 0a772a9cb..2cee6ef39 100644 --- a/report/coverlet/WireMock.Net_HeaderModel.htm +++ b/report/coverlet/WireMock.Net_HeaderModel.htm @@ -51,7 +51,7 @@

 20} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_HttpClientHelper.htm b/report/coverlet/WireMock.Net_HttpClientHelper.htm index fda2137a6..c8869a9c4 100644 --- a/report/coverlet/WireMock.Net_HttpClientHelper.htm +++ b/report/coverlet/WireMock.Net_HttpClientHelper.htm @@ -118,7 +118,7 @@

 78} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_HttpRequestMessageHelper.htm b/report/coverlet/WireMock.Net_HttpRequestMessageHelper.htm index 0e37a448a..acd7d32a4 100644 --- a/report/coverlet/WireMock.Net_HttpRequestMessageHelper.htm +++ b/report/coverlet/WireMock.Net_HttpRequestMessageHelper.htm @@ -125,7 +125,7 @@

 86} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_JsonMatcher.htm b/report/coverlet/WireMock.Net_JsonMatcher.htm index 424f690ad..c0ec69951 100644 --- a/report/coverlet/WireMock.Net_JsonMatcher.htm +++ b/report/coverlet/WireMock.Net_JsonMatcher.htm @@ -148,7 +148,7 @@

 105} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_JsonPathMatcher.htm b/report/coverlet/WireMock.Net_JsonPathMatcher.htm index 2c7761e7b..6f0642dff 100644 --- a/report/coverlet/WireMock.Net_JsonPathMatcher.htm +++ b/report/coverlet/WireMock.Net_JsonPathMatcher.htm @@ -60,71 +60,71 @@

 16        private readonly string[] _patterns;  17  18        /// <inheritdoc cref="IMatcher.MatchBehaviour"/> - 1619        public MatchBehaviour MatchBehaviour { get; } + 1419        public MatchBehaviour MatchBehaviour { get; }  20  21        /// <summary>  22        /// Initializes a new instance of the <see cref="JsonPathMatcher"/> class.  23        /// </summary>  24        /// <param name="patterns">The patterns.</param> - 1725        public JsonPathMatcher([NotNull] params string[] patterns) : this(MatchBehaviour.AcceptOnMatch, patterns) - 1726        { - 1727        } + 1525        public JsonPathMatcher([NotNull] params string[] patterns) : this(MatchBehaviour.AcceptOnMatch, patterns) + 1526        { + 1527        }  28  29        /// <summary>  30        /// Initializes a new instance of the <see cref="JsonPathMatcher"/> class.  31        /// </summary>  32        /// <param name="matchBehaviour">The match behaviour.</param>  33        /// <param name="patterns">The patterns.</param> - 1834        public JsonPathMatcher(MatchBehaviour matchBehaviour, [NotNull] params string[] patterns) - 1835        { - 1836            Check.NotNull(patterns, nameof(patterns)); + 1634        public JsonPathMatcher(MatchBehaviour matchBehaviour, [NotNull] params string[] patterns) + 1635        { + 1636            Check.NotNull(patterns, nameof(patterns));  37 - 1838            MatchBehaviour = matchBehaviour; - 1839            _patterns = patterns; - 1840        } + 1638            MatchBehaviour = matchBehaviour; + 1639            _patterns = patterns; + 1640        }  41  42        /// <inheritdoc cref="IStringMatcher.IsMatch"/>  43        public double IsMatch(string input) - 644        { - 645            double match = MatchScores.Mismatch; - 646            if (input != null) - 547            { + 544        { + 545            double match = MatchScores.Mismatch; + 546            if (input != null) + 447            {  48                try - 549                { - 550                    var jtoken = JToken.Parse(input); - 351                    match = IsMatch(jtoken); - 352                } + 449                { + 450                    var jtoken = JToken.Parse(input); + 251                    match = IsMatch(jtoken); + 252                }  253                catch (JsonException)  254                {  55                    // just ignore JsonException  256                } - 557            } + 457            }  58 - 659            return MatchBehaviourHelper.Convert(MatchBehaviour, match); - 660        } + 559            return MatchBehaviourHelper.Convert(MatchBehaviour, match); + 560        }  61  62        /// <inheritdoc cref="IObjectMatcher.IsMatch"/>  63        public double IsMatch(object input) - 1064        { - 1065            double match = MatchScores.Mismatch; + 964        { + 965            double match = MatchScores.Mismatch;  66  67            // When input is null or byte[], return Mismatch. - 1068            if (input != null && !(input is byte[])) - 869            { + 968            if (input != null && !(input is byte[])) + 769            {  70                try - 871                { + 771                {  72                    // Check if JToken or object - 873                    JToken jtoken = input is JToken token ? token : JObject.FromObject(input); - 874                    match = IsMatch(jtoken); - 875                } + 773                    JToken jtoken = input is JToken token ? token : JObject.FromObject(input); + 774                    match = IsMatch(jtoken); + 775                }  076                catch (JsonException)  077                {  78                    // just ignore JsonException  079                } - 880            } + 780            }  81 - 1082            return MatchBehaviourHelper.Convert(MatchBehaviour, match); - 1083        } + 982            return MatchBehaviourHelper.Convert(MatchBehaviour, match); + 983        }  84  85        /// <inheritdoc cref="IStringMatcher.GetPatterns"/>  86        public string[] GetPatterns() @@ -136,17 +136,17 @@

 192        public string Name => "JsonPathMatcher";  93  94        private double IsMatch(JToken jtoken) - 1195        { + 995        {  96            // Wrap in array if needed - 1197            JToken tokenOrArray = jtoken is JArray ? jtoken : new JArray(jtoken); + 997            JToken tokenOrArray = jtoken is JArray ? jtoken : new JArray(jtoken);  98 - 3399            return MatchScores.ToScore(_patterns.Select(pattern => tokenOrArray.SelectToken(pattern) != null)); - 11100        } + 2799            return MatchScores.ToScore(_patterns.Select(pattern => tokenOrArray.SelectToken(pattern) != null)); + 9100        }  101    }  102} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_JsonUtils.htm b/report/coverlet/WireMock.Net_JsonUtils.htm index e6755514e..890157c37 100644 --- a/report/coverlet/WireMock.Net_JsonUtils.htm +++ b/report/coverlet/WireMock.Net_JsonUtils.htm @@ -191,7 +191,7 @@

 147} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_LinqMatcher.htm b/report/coverlet/WireMock.Net_LinqMatcher.htm index 52601ef99..02d96630e 100644 --- a/report/coverlet/WireMock.Net_LinqMatcher.htm +++ b/report/coverlet/WireMock.Net_LinqMatcher.htm @@ -152,7 +152,7 @@

 107} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_LocalFileSystemHandler.htm b/report/coverlet/WireMock.Net_LocalFileSystemHandler.htm index 1153b22ca..1b5088268 100644 --- a/report/coverlet/WireMock.Net_LocalFileSystemHandler.htm +++ b/report/coverlet/WireMock.Net_LocalFileSystemHandler.htm @@ -106,7 +106,7 @@

 62} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_LogEntry.htm b/report/coverlet/WireMock.Net_LogEntry.htm index b1d4e4541..7616a56d5 100644 --- a/report/coverlet/WireMock.Net_LogEntry.htm +++ b/report/coverlet/WireMock.Net_LogEntry.htm @@ -45,7 +45,7 @@

 14        /// <value>  15        /// The unique identifier.  16        /// </value> - 13417        public Guid Guid { get; set; } + 10417        public Guid Guid { get; set; }  18  19        /// <summary>  20        /// Gets or sets the request message. @@ -53,7 +53,7 @@

 22        /// <value>  23        /// The request message.  24        /// </value> - 116625        public RequestMessage RequestMessage { get; set; } + 89325        public RequestMessage RequestMessage { get; set; }  26  27        /// <summary>  28        /// Gets or sets the response message. @@ -61,7 +61,7 @@

 30        /// <value>  31        /// The response message.  32        /// </value> - 95033        public ResponseMessage ResponseMessage { get; set; } + 75233        public ResponseMessage ResponseMessage { get; set; }  34  35        /// <summary>  36        /// Gets or sets the request match result. @@ -69,7 +69,7 @@

 38        /// <value>  39        /// The request match result.  40        /// </value> - 38941        public RequestMatchResult RequestMatchResult { get; set; } + 27941        public RequestMatchResult RequestMatchResult { get; set; }  42  43        /// <summary>  44        /// Gets or sets the mapping unique identifier. @@ -77,7 +77,7 @@

 46        /// <value>  47        /// The mapping unique identifier.  48        /// </value> - 13449        public Guid? MappingGuid { get; set; } + 10449        public Guid? MappingGuid { get; set; }  50  51        /// <summary>  52        /// Gets or sets the mapping unique title. @@ -85,12 +85,12 @@

 54        /// <value>  55        /// The mapping unique title.  56        /// </value> - 13457        public string MappingTitle { get; set; } + 10457        public string MappingTitle { get; set; }  58    }  59} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_LogEntryMapper.htm b/report/coverlet/WireMock.Net_LogEntryMapper.htm index a4dd9eb78..325206ab5 100644 --- a/report/coverlet/WireMock.Net_LogEntryMapper.htm +++ b/report/coverlet/WireMock.Net_LogEntryMapper.htm @@ -22,14 +22,14 @@

Summary

Coverable lines:60 Total lines:72 Line coverage:100% -Branch coverage:100% +Branch coverage:87.5%

Metrics

- +
MethodCyclomatic complexity NPath complexity Sequence coverage Branch coverage
Map(...)0011
Map(...)0010.875

File(s)

@@ -47,71 +47,71 @@

 8    internal static class LogEntryMapper  9    {  10        public static LogEntryModel Map(LogEntry logEntry) - 6911        { - 6912            return new LogEntryModel - 6913            { - 6914                Guid = logEntry.Guid, - 6915                Request = new LogRequestModel - 6916                { - 6917                    DateTime = logEntry.RequestMessage.DateTime, - 6918                    ClientIP = logEntry.RequestMessage.ClientIP, - 6919                    Path = logEntry.RequestMessage.Path, - 6920                    AbsolutePath = logEntry.RequestMessage.AbsolutePath, - 6921                    Url = logEntry.RequestMessage.Url, - 6922                    AbsoluteUrl = logEntry.RequestMessage.AbsoluteUrl, - 6923                    Query = logEntry.RequestMessage.Query, - 6924                    Method = logEntry.RequestMessage.Method, - 6925                    Body = logEntry.RequestMessage.Body, - 6926                    BodyAsJson = logEntry.RequestMessage.BodyAsJson, - 6927                    BodyAsBytes = logEntry.RequestMessage.BodyAsBytes, - 6928                    Headers = logEntry.RequestMessage.Headers, - 6929                    Cookies = logEntry.RequestMessage.Cookies, - 6930                    BodyEncoding = logEntry.RequestMessage.BodyEncoding != null ? new EncodingModel - 6931                    { - 6932                        EncodingName = logEntry.RequestMessage.BodyEncoding.EncodingName, - 6933                        CodePage = logEntry.RequestMessage.BodyEncoding.CodePage, - 6934                        WebName = logEntry.RequestMessage.BodyEncoding.WebName - 6935                    } : null - 6936                }, - 6937                Response = new LogResponseModel - 6938                { - 6939                    StatusCode = logEntry.ResponseMessage.StatusCode, - 6940                    BodyDestination = logEntry.ResponseMessage.BodyDestination, - 6941                    Body = logEntry.ResponseMessage.Body, - 6942                    BodyAsJson = logEntry.ResponseMessage.BodyAsJson, - 6943                    BodyAsBytes = logEntry.ResponseMessage.BodyAsBytes, - 6944                    BodyOriginal = logEntry.ResponseMessage.BodyOriginal, - 6945                    BodyAsFile = logEntry.ResponseMessage.BodyAsFile, - 6946                    BodyAsFileIsCached = logEntry.ResponseMessage.BodyAsFileIsCached, - 6947                    Headers = logEntry.ResponseMessage.Headers, - 6948                    BodyEncoding = logEntry.ResponseMessage.BodyEncoding != null ? new EncodingModel - 6949                    { - 6950                        EncodingName = logEntry.ResponseMessage.BodyEncoding.EncodingName, - 6951                        CodePage = logEntry.ResponseMessage.BodyEncoding.CodePage, - 6952                        WebName = logEntry.ResponseMessage.BodyEncoding.WebName - 6953                    } : null - 6954                }, - 6955                MappingGuid = logEntry.MappingGuid, - 6956                MappingTitle = logEntry.MappingTitle, - 6957                RequestMatchResult = logEntry.RequestMatchResult != null ? new LogRequestMatchModel - 6958                { - 6959                    TotalScore = logEntry.RequestMatchResult.TotalScore, - 6960                    TotalNumber = logEntry.RequestMatchResult.TotalNumber, - 6961                    IsPerfectMatch = logEntry.RequestMatchResult.IsPerfectMatch, - 6962                    AverageTotalScore = logEntry.RequestMatchResult.AverageTotalScore, - 17763                    MatchDetails = logEntry.RequestMatchResult.MatchDetails.Select(x => new - 17764                    { - 17765                        Name = x.Key.Name.Replace("RequestMessage", string.Empty), - 17766                        Score = x.Value - 17767                    } as object).ToList() - 6968                } : null - 6969            }; - 6970        } + 5411        { + 5412            return new LogEntryModel + 5413            { + 5414                Guid = logEntry.Guid, + 5415                Request = new LogRequestModel + 5416                { + 5417                    DateTime = logEntry.RequestMessage.DateTime, + 5418                    ClientIP = logEntry.RequestMessage.ClientIP, + 5419                    Path = logEntry.RequestMessage.Path, + 5420                    AbsolutePath = logEntry.RequestMessage.AbsolutePath, + 5421                    Url = logEntry.RequestMessage.Url, + 5422                    AbsoluteUrl = logEntry.RequestMessage.AbsoluteUrl, + 5423                    Query = logEntry.RequestMessage.Query, + 5424                    Method = logEntry.RequestMessage.Method, + 5425                    Body = logEntry.RequestMessage.Body, + 5426                    BodyAsJson = logEntry.RequestMessage.BodyAsJson, + 5427                    BodyAsBytes = logEntry.RequestMessage.BodyAsBytes, + 5428                    Headers = logEntry.RequestMessage.Headers, + 5429                    Cookies = logEntry.RequestMessage.Cookies, + 5430                    BodyEncoding = logEntry.RequestMessage.BodyEncoding != null ? new EncodingModel + 5431                    { + 5432                        EncodingName = logEntry.RequestMessage.BodyEncoding.EncodingName, + 5433                        CodePage = logEntry.RequestMessage.BodyEncoding.CodePage, + 5434                        WebName = logEntry.RequestMessage.BodyEncoding.WebName + 5435                    } : null + 5436                }, + 5437                Response = new LogResponseModel + 5438                { + 5439                    StatusCode = logEntry.ResponseMessage.StatusCode, + 5440                    BodyDestination = logEntry.ResponseMessage.BodyDestination, + 5441                    Body = logEntry.ResponseMessage.Body, + 5442                    BodyAsJson = logEntry.ResponseMessage.BodyAsJson, + 5443                    BodyAsBytes = logEntry.ResponseMessage.BodyAsBytes, + 5444                    BodyOriginal = logEntry.ResponseMessage.BodyOriginal, + 5445                    BodyAsFile = logEntry.ResponseMessage.BodyAsFile, + 5446                    BodyAsFileIsCached = logEntry.ResponseMessage.BodyAsFileIsCached, + 5447                    Headers = logEntry.ResponseMessage.Headers, + 5448                    BodyEncoding = logEntry.ResponseMessage.BodyEncoding != null ? new EncodingModel + 5449                    { + 5450                        EncodingName = logEntry.ResponseMessage.BodyEncoding.EncodingName, + 5451                        CodePage = logEntry.ResponseMessage.BodyEncoding.CodePage, + 5452                        WebName = logEntry.ResponseMessage.BodyEncoding.WebName + 5453                    } : null + 5454                }, + 5455                MappingGuid = logEntry.MappingGuid, + 5456                MappingTitle = logEntry.MappingTitle, + 5457                RequestMatchResult = logEntry.RequestMatchResult != null ? new LogRequestMatchModel + 5458                { + 5459                    TotalScore = logEntry.RequestMatchResult.TotalScore, + 5460                    TotalNumber = logEntry.RequestMatchResult.TotalNumber, + 5461                    IsPerfectMatch = logEntry.RequestMatchResult.IsPerfectMatch, + 5462                    AverageTotalScore = logEntry.RequestMatchResult.AverageTotalScore, + 13463                    MatchDetails = logEntry.RequestMatchResult.MatchDetails.Select(x => new + 13464                    { + 13465                        Name = x.Key.Name.Replace("RequestMessage", string.Empty), + 13466                        Score = x.Value + 13467                    } as object).ToList() + 5468                } : null + 5469            }; + 5470        }  71    }  72} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_LogEntryModel.htm b/report/coverlet/WireMock.Net_LogEntryModel.htm index 52300aac3..838c7626a 100644 --- a/report/coverlet/WireMock.Net_LogEntryModel.htm +++ b/report/coverlet/WireMock.Net_LogEntryModel.htm @@ -41,37 +41,37 @@

 10        /// <summary>  11        /// The unique identifier.  12        /// </summary> - 7713        public Guid Guid { get; set; } + 6213        public Guid Guid { get; set; }  14  15        /// <summary>  16        /// The request.  17        /// </summary> - 9318        public LogRequestModel Request { get; set; } + 7818        public LogRequestModel Request { get; set; }  19  20        /// <summary>  21        /// The response.  22        /// </summary> - 8123        public LogResponseModel Response { get; set; } + 6623        public LogResponseModel Response { get; set; }  24  25        /// <summary>  26        /// The mapping unique identifier.  27        /// </summary> - 7328        public Guid? MappingGuid { get; set; } + 5828        public Guid? MappingGuid { get; set; }  29  30        /// <summary>  31        /// The mapping unique title.  32        /// </summary> - 7333        public string MappingTitle { get; set; } + 5833        public string MappingTitle { get; set; }  34  35        /// <summary>  36        /// The request match result.  37        /// </summary> - 7338        public LogRequestMatchModel RequestMatchResult { get; set; } + 5838        public LogRequestMatchModel RequestMatchResult { get; set; }  39    }  40} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_LogRequestMatchModel.htm b/report/coverlet/WireMock.Net_LogRequestMatchModel.htm index c84230542..4bda3d2fa 100644 --- a/report/coverlet/WireMock.Net_LogRequestMatchModel.htm +++ b/report/coverlet/WireMock.Net_LogRequestMatchModel.htm @@ -44,7 +44,7 @@

 13        /// <value>  14        /// The match-score.  15        /// </value> - 5116        public double TotalScore { get; set; } + 3516        public double TotalScore { get; set; }  17  18        /// <summary>  19        /// Gets or sets the total number of matches. @@ -52,7 +52,7 @@

 21        /// <value>  22        /// The total number of matches.  23        /// </value> - 5124        public int TotalNumber { get; set; } + 3524        public int TotalNumber { get; set; }  25  26        /// <summary>  27        /// Gets or sets a value indicating whether this instance is perfect match. @@ -60,7 +60,7 @@

 29        /// <value>  30        /// <c>true</c> if this instance is perfect match; otherwise, <c>false</c>.  31        /// </value> - 5132        public bool IsPerfectMatch { get; set; } + 3532        public bool IsPerfectMatch { get; set; }  33  34        /// <summary>  35        /// Gets the match percentage. @@ -68,7 +68,7 @@

 37        /// <value>  38        /// The match percentage.  39        /// </value> - 5140        public double AverageTotalScore { get; set; } + 3540        public double AverageTotalScore { get; set; }  41  42        /// <summary>  43        /// Gets the match details. @@ -76,12 +76,12 @@

 45        /// <value>  46        /// The match details.  47        /// </value> - 5148        public IList<object> MatchDetails { get; set; } + 3548        public IList<object> MatchDetails { get; set; }  49    }  50} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_LogRequestModel.htm b/report/coverlet/WireMock.Net_LogRequestModel.htm index f8f6397ea..407bfa7f6 100644 --- a/report/coverlet/WireMock.Net_LogRequestModel.htm +++ b/report/coverlet/WireMock.Net_LogRequestModel.htm @@ -44,77 +44,77 @@

 13        /// <summary>  14        /// The Client IP Address.  15        /// </summary> - 7716        public string ClientIP { get; set; } + 6216        public string ClientIP { get; set; }  17  18        /// <summary>  19        /// The DateTime.  20        /// </summary> - 7721        public DateTime DateTime { get; set; } + 6221        public DateTime DateTime { get; set; }  22  23        /// <summary>  24        /// The Path.  25        /// </summary> - 7926        public string Path { get; set; } + 6426        public string Path { get; set; }  27  28        /// <summary>  29        /// The Absolute Path.  30        /// </summary> - 7731        public string AbsolutePath { get; set; } + 6231        public string AbsolutePath { get; set; }  32  33        /// <summary>  34        /// Gets the url (relative).  35        /// </summary> - 7736        public string Url { get; set; } + 6236        public string Url { get; set; }  37  38        /// <summary>  39        /// The absolete URL.  40        /// </summary> - 7741        public string AbsoluteUrl { get; set; } + 6241        public string AbsoluteUrl { get; set; }  42  43        /// <summary>  44        /// The query.  45        /// </summary> - 7346        public IDictionary<string, WireMockList<string>> Query { get; set; } + 5846        public IDictionary<string, WireMockList<string>> Query { get; set; }  47  48        /// <summary>  49        /// The method.  50        /// </summary> - 8151        public string Method { get; set; } + 6651        public string Method { get; set; }  52  53        /// <summary>  54        /// The Headers.  55        /// </summary> - 8156        public IDictionary<string, WireMockList<string>> Headers { get; set; } + 6656        public IDictionary<string, WireMockList<string>> Headers { get; set; }  57  58        /// <summary>  59        /// Tthe Cookies.  60        /// </summary> - 7361        public IDictionary<string, string> Cookies { get; set; } + 5861        public IDictionary<string, string> Cookies { get; set; }  62  63        /// <summary>  64        /// The body (as string).  65        /// </summary> - 8166        public string Body { get; set; } + 6666        public string Body { get; set; }  67  68        /// <summary>  69        /// The body (as JSON object).  70        /// </summary> - 7771        public object BodyAsJson { get; set; } + 6271        public object BodyAsJson { get; set; }  72  73        /// <summary>  74        /// The body (as bytearray).  75        /// </summary> - 7376        public byte[] BodyAsBytes { get; set; } + 5876        public byte[] BodyAsBytes { get; set; }  77  78        /// <summary>  79        /// The body encoding.  80        /// </summary> - 7781        public EncodingModel BodyEncoding { get; set; } + 6281        public EncodingModel BodyEncoding { get; set; }  82    }  83} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_LogResponseModel.htm b/report/coverlet/WireMock.Net_LogResponseModel.htm index 95da4da6f..a123f0b62 100644 --- a/report/coverlet/WireMock.Net_LogResponseModel.htm +++ b/report/coverlet/WireMock.Net_LogResponseModel.htm @@ -43,57 +43,57 @@

 12        /// <summary>  13        /// Gets or sets the status code.  14        /// </summary> - 15015        public int StatusCode { get; set; } = 200; + 12015        public int StatusCode { get; set; } = 200;  16  17        /// <summary>  18        /// Gets the headers.  19        /// </summary> - 8120        public IDictionary<string, WireMockList<string>> Headers { get; set; } + 6620        public IDictionary<string, WireMockList<string>> Headers { get; set; }  21  22        /// <summary>  23        /// Gets or sets the body destination (SameAsSource, String or Bytes).  24        /// </summary> - 7325        public string BodyDestination { get; set; } + 5825        public string BodyDestination { get; set; }  26  27        /// <summary>  28        /// The body (as string).  29        /// </summary> - 7330        public string Body { get; set; } + 5830        public string Body { get; set; }  31  32        /// <summary>  33        /// The body (as JSON object).  34        /// </summary> - 8135        public object BodyAsJson { get; set; } + 6635        public object BodyAsJson { get; set; }  36  37        /// <summary>  38        /// The body (as bytearray).  39        /// </summary> - 7340        public byte[] BodyAsBytes { get; set; } + 5840        public byte[] BodyAsBytes { get; set; }  41  42        /// <summary>  43        /// Gets or sets the body as file.  44        /// </summary> - 7345        public string BodyAsFile { get; set; } + 5845        public string BodyAsFile { get; set; }  46  47        /// <summary>  48        /// Is the body as file cached?  49        /// </summary> - 7350        public bool? BodyAsFileIsCached { get; set; } + 5850        public bool? BodyAsFileIsCached { get; set; }  51  52        /// <summary>  53        /// Gets or sets the original body.  54        /// </summary> - 7355        public string BodyOriginal { get; set; } + 5855        public string BodyOriginal { get; set; }  56  57        /// <summary>  58        /// Gets or sets the body.  59        /// </summary> - 8160        public EncodingModel BodyEncoding { get; set; } + 6660        public EncodingModel BodyEncoding { get; set; }  61    }  62} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_Mapping.htm b/report/coverlet/WireMock.Net_Mapping.htm index db62eab0e..9bded425a 100644 --- a/report/coverlet/WireMock.Net_Mapping.htm +++ b/report/coverlet/WireMock.Net_Mapping.htm @@ -20,7 +20,7 @@

Summary

Covered lines:36 Uncovered lines:0 Coverable lines:36 -Total lines:140 +Total lines:138 Line coverage:100% Branch coverage:92.8% @@ -50,155 +50,153 @@

C:\Use  9    /// <summary>  10    /// The Mapping.  11    /// </summary>12    public class Mapping12    public class Mapping : IMapping  13    {14        /// <summary>15        /// Gets the unique identifier.16        /// </summary> - 58717        public Guid Guid { get; }1819        /// <summary>20        /// Gets the unique title.21        /// </summary> - 5822        public string Title { get; }2324        /// <summary>25        /// The full filename path for this mapping (only defined for static mappings).26        /// </summary> - 26527        public string Path { get; set; }2829        /// <summary>30        /// Gets the priority.31        /// </summary> - 13432        public int Priority { get; }3334        /// <summary>35        /// Scenario.36        /// </summary>37        [CanBeNull] - 107638        public string Scenario { get; }3940        /// <summary>41        /// Execution state condition for the current mapping.42        /// </summary>43        [CanBeNull] - 3744        public string ExecutionConditionState { get; }4546        /// <summary>47        /// The next state which will be signaled after the current mapping execution.48        /// In case the value is null, state will not be changed.49        /// </summary>50        [CanBeNull] - 2751        public string NextState { get; }5253        /// <summary>54        /// The Request matcher.55        /// </summary> - 30056        public IRequestMatcher RequestMatcher { get; }5758        /// <summary>59        /// The Provider.60        /// </summary> - 50761        public IResponseProvider Provider { get; }6263        /// <summary>64        /// Is State started ?65        /// </summary> - 766        public bool IsStartState => Scenario == null || Scenario != null && NextState != null && ExecutionConditionState6768        /// <summary>69        /// Initializes a new instance of the <see cref="Mapping"/> class.70        /// </summary>71        /// <param name="guid">The unique identifier.</param>72        /// <param name="title">The unique title (can be null).</param>73        /// <param name="path">The full file path from this mapping title (can be null).</param>74        /// <param name="requestMatcher">The request matcher.</param>75        /// <param name="provider">The provider.</param>76        /// <param name="priority">The priority for this mapping.</param>77        /// <param name="scenario">The scenario. [Optional]</param>78        /// <param name="executionConditionState">State in which the current mapping can occur. [Optional]</param>79        /// <param name="nextState">The next state which will occur after the current mapping execution. [Optional]</par - 26580        public Mapping(Guid guid, [CanBeNull] string title, [CanBeNull] string path, IRequestMatcher requestMatcher, IRe - 26581        { - 26582            Guid = guid; - 26583            Title = title; - 26584            Path = path; - 26585            RequestMatcher = requestMatcher; - 26586            Provider = provider; - 26587            Priority = priority; - 26588            Scenario = scenario; - 26589            ExecutionConditionState = executionConditionState; - 26590            NextState = nextState; - 26591        }9293        /// <summary>94        /// The response to.95        /// </summary>96        /// <param name="requestMessage">The request message.</param>97        /// <returns>The <see cref="ResponseMessage"/>.</returns>98        public async Task<ResponseMessage> ResponseToAsync(RequestMessage requestMessage) - 5199        { - 51100            return await Provider.ProvideResponseAsync(requestMessage); - 51101        }102103        /// <summary>104        /// Gets the RequestMatchResult based on the RequestMessage.105        /// </summary>106        /// <param name="requestMessage">The request message.</param>107        /// <param name="nextState">The Next State.</param>108        /// <returns>The <see cref="RequestMatchResult"/>.</returns>109        public RequestMatchResult GetRequestMatchResult(RequestMessage requestMessage, [CanBeNull] string nextState) - 295110        { - 295111            var result = new RequestMatchResult();14        /// <inheritdoc cref="IMapping.Guid" /> + 54115        public Guid Guid { get; }1617        /// <summary>18        /// Gets the unique title.19        /// </summary> + 4220        public string Title { get; }2122        /// <summary>23        /// The full filename path for this mapping (only defined for static mappings).24        /// </summary> + 25025        public string Path { get; set; }2627        /// <summary>28        /// Gets the priority.29        /// </summary> + 11830        public int Priority { get; }3132        /// <summary>33        /// Scenario.34        /// </summary>35        [CanBeNull] + 101436        public string Scenario { get; }3738        /// <summary>39        /// Execution state condition for the current mapping.40        /// </summary>41        [CanBeNull] + 3742        public string ExecutionConditionState { get; }4344        /// <summary>45        /// The next state which will be signaled after the current mapping execution.46        /// In case the value is null, state will not be changed.47        /// </summary>48        [CanBeNull] + 2849        public string NextState { get; }5051        /// <summary>52        /// The Request matcher.53        /// </summary> + 28454        public IRequestMatcher RequestMatcher { get; }5556        /// <summary>57        /// The Provider.58        /// </summary> + 32359        public IResponseProvider Provider { get; }6061        /// <summary>62        /// Is State started ?63        /// </summary> + 864        public bool IsStartState => Scenario == null || Scenario != null && NextState != null && ExecutionConditionState6566        /// <summary>67        /// Initializes a new instance of the <see cref="Mapping"/> class.68        /// </summary>69        /// <param name="guid">The unique identifier.</param>70        /// <param name="title">The unique title (can be null).</param>71        /// <param name="path">The full file path from this mapping title (can be null).</param>72        /// <param name="requestMatcher">The request matcher.</param>73        /// <param name="provider">The provider.</param>74        /// <param name="priority">The priority for this mapping.</param>75        /// <param name="scenario">The scenario. [Optional]</param>76        /// <param name="executionConditionState">State in which the current mapping can occur. [Optional]</param>77        /// <param name="nextState">The next state which will occur after the current mapping execution. [Optional]</par + 25078        public Mapping(Guid guid, [CanBeNull] string title, [CanBeNull] string path, IRequestMatcher requestMatcher, IRe + 25079        { + 25080            Guid = guid; + 25081            Title = title; + 25082            Path = path; + 25083            RequestMatcher = requestMatcher; + 25084            Provider = provider; + 25085            Priority = priority; + 25086            Scenario = scenario; + 25087            ExecutionConditionState = executionConditionState; + 25088            NextState = nextState; + 25089        }9091        /// <summary>92        /// The response to.93        /// </summary>94        /// <param name="requestMessage">The request message.</param>95        /// <returns>The <see cref="ResponseMessage"/>.</returns>96        public async Task<ResponseMessage> ResponseToAsync(RequestMessage requestMessage) + 3597        { + 3598            return await Provider.ProvideResponseAsync(requestMessage); + 3599        }100101        /// <summary>102        /// Gets the RequestMatchResult based on the RequestMessage.103        /// </summary>104        /// <param name="requestMessage">The request message.</param>105        /// <param name="nextState">The Next State.</param>106        /// <returns>The <see cref="RequestMatchResult"/>.</returns>107        public RequestMatchResult GetRequestMatchResult(RequestMessage requestMessage, [CanBeNull] string nextState) + 279108        { + 279109            var result = new RequestMatchResult();110 + 279111            RequestMatcher.GetMatchingScore(requestMessage, result);  112 - 295113            RequestMatcher.GetMatchingScore(requestMessage, result);114115            // Only check state if Scenario is defined - 295116            if (Scenario != null) - 30117            { - 30118                var matcher = new RequestMessageScenarioAndStateMatcher(nextState, ExecutionConditionState); - 30119                matcher.GetMatchingScore(requestMessage, result);120                //// If ExecutionConditionState is null, this means that request is the start from a scenario. So just r121                //if (ExecutionConditionState != null)122                //{123                //    // ExecutionConditionState is not null, so get score for matching with the nextState.124                //    var matcher = new RequestMessageScenarioAndStateMatcher(nextState, ExecutionConditionState);125                //    matcher.GetMatchingScore(requestMessage, result);126                //} - 30127            }128 - 295129            return result; - 295130        }131132        /// <summary>133        /// Gets a value indicating whether this mapping is an Admin Interface.134        /// </summary>135        /// <value>136        /// <c>true</c> if this mapping is an Admin Interface; otherwise, <c>false</c>.137        /// </value> - 166138        public bool IsAdminInterface => Provider is DynamicResponseProvider || Provider is DynamicAsyncResponseProvider 139    }140}113            // Only check state if Scenario is defined + 279114            if (Scenario != null) + 30115            { + 30116                var matcher = new RequestMessageScenarioAndStateMatcher(nextState, ExecutionConditionState); + 30117                matcher.GetMatchingScore(requestMessage, result);118                //// If ExecutionConditionState is null, this means that request is the start from a scenario. So just r119                //if (ExecutionConditionState != null)120                //{121                //    // ExecutionConditionState is not null, so get score for matching with the nextState.122                //    var matcher = new RequestMessageScenarioAndStateMatcher(nextState, ExecutionConditionState);123                //    matcher.GetMatchingScore(requestMessage, result);124                //} + 30125            }126 + 279127            return result; + 279128        }129130        /// <summary>131        /// Gets a value indicating whether this mapping is an Admin Interface.132        /// </summary>133        /// <value>134        /// <c>true</c> if this mapping is an Admin Interface; otherwise, <c>false</c>.135        /// </value> + 110136        public bool IsAdminInterface => Provider is DynamicResponseProvider || Provider is DynamicAsyncResponseProvider 137    }138} -

+
diff --git a/report/coverlet/WireMock.Net_MappingConverter.htm b/report/coverlet/WireMock.Net_MappingConverter.htm index adb84d8d3..6d1585a47 100644 --- a/report/coverlet/WireMock.Net_MappingConverter.htm +++ b/report/coverlet/WireMock.Net_MappingConverter.htm @@ -29,7 +29,7 @@

Metrics

- +
MethodCyclomatic complexity NPath complexity Sequence coverage Branch coverage
ToMappingModel(...)000.7880.516
ToMappingModel(...)000.7880.516
Map(...)000.4170.25
@@ -50,7 +50,7 @@

 10{  11    internal static class MappingConverter  12    {13        public static MappingModel ToMappingModel(Mapping mapping)13        public static MappingModel ToMappingModel(IMapping mapping)  214        {  215            var request = (Request)mapping.RequestMatcher;  216            var response = (Response)mapping.Provider; @@ -182,11 +182,11 @@

 142} - + diff --git a/report/coverlet/WireMock.Net_MappingMatcher.htm b/report/coverlet/WireMock.Net_MappingMatcher.htm new file mode 100644 index 000000000..2b3b81303 --- /dev/null +++ b/report/coverlet/WireMock.Net_MappingMatcher.htm @@ -0,0 +1,102 @@ + + + + + + +WireMock.Owin.MappingMatcher - Coverage Report + +
+

Summary

+ ++++ + + + + + + + + + + + +
Class:WireMock.Owin.MappingMatcher
Assembly:WireMock.Net
File(s):C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Owin\MappingMatcher.cs
Covered lines:28
Uncovered lines:0
Coverable lines:28
Total lines:50
Line coverage:100%
Branch coverage:90.9%
+

Metrics

+ + + + + + +
MethodCyclomatic complexity NPath complexity Sequence coverage Branch coverage
Match(...)0010.909
.ctor(...)0010
+

File(s)

+

C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Owin\MappingMatcher.cs

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1using System.Linq;
 2using WireMock.Matchers.Request;
 3using WireMock.Validation;
 4
 5namespace WireMock.Owin
 6{
 7    internal class MappingMatcher : IMappingMatcher
 8    {
 9        private readonly IWireMockMiddlewareOptions _options;
 10
 5011        public MappingMatcher(IWireMockMiddlewareOptions options)
 5012        {
 5013            Check.NotNull(options, nameof(options));
 14
 5015            _options = options;
 5016        }
 17
 18        public (IMapping Mapping, RequestMatchResult RequestMatchResult) Match(RequestMessage request)
 4919        {
 4920            var mappings = _options.Mappings.Values
 33221                .Select(m => new
 33222                {
 33223                    Mapping = m,
 33224                    MatchResult = m.GetRequestMatchResult(request, m.Scenario != null && _options.Scenarios.ContainsKey(
 33225                })
 4926                .ToList();
 27
 4928            if (_options.AllowPartialMapping)
 129            {
 130                var partialMappings = mappings
 331                    .Where(pm => (pm.Mapping.IsAdminInterface && pm.MatchResult.IsPerfectMatch) || !pm.Mapping.IsAdminIn
 332                    .OrderBy(m => m.MatchResult)
 333                    .ThenBy(m => m.Mapping.Priority)
 134                    .ToList();
 35
 236                var bestPartialMatch = partialMappings.FirstOrDefault(pm => pm.MatchResult.AverageTotalScore > 0.0);
 37
 138                return (bestPartialMatch?.Mapping, bestPartialMatch?.MatchResult);
 39            }
 40            else
 4841            {
 4842                var perfectMatch = mappings
 8543                    .OrderBy(m => m.Mapping.Priority)
 32944                    .FirstOrDefault(m => m.MatchResult.IsPerfectMatch);
 45
 4846                return (perfectMatch?.Mapping, perfectMatch?.MatchResult);
 47            }
 4948        }
 49    }
 50}
+
+
+ + \ No newline at end of file diff --git a/report/coverlet/WireMock.Net_MappingModel.htm b/report/coverlet/WireMock.Net_MappingModel.htm index 4cd4b023c..facb78aff 100644 --- a/report/coverlet/WireMock.Net_MappingModel.htm +++ b/report/coverlet/WireMock.Net_MappingModel.htm @@ -82,7 +82,7 @@

 51} - +

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_MatchBehaviourHelper.htm b/report/coverlet/WireMock.Net_MatchBehaviourHelper.htm index 3fac5f46f..4430a7f8a 100644 --- a/report/coverlet/WireMock.Net_MatchBehaviourHelper.htm +++ b/report/coverlet/WireMock.Net_MatchBehaviourHelper.htm @@ -54,19 +54,19 @@

 15        /// <param name="match">The match.</param>  16        /// <returns>match value</returns>  17        internal static double Convert(MatchBehaviour matchBehaviour, double match) - 78818        { - 78819            if (matchBehaviour == MatchBehaviour.AcceptOnMatch) - 77020            { - 77021                return match; + 75818        { + 75819            if (matchBehaviour == MatchBehaviour.AcceptOnMatch) + 74020            { + 74021                return match;  22            }  23  1824            return match <= MatchScores.Tolerance ? MatchScores.Perfect : MatchScores.Mismatch; - 78825        } + 75825        }  26    }  27} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_MatchScores.htm b/report/coverlet/WireMock.Net_MatchScores.htm index 3428a91d6..d1beb6c0b 100644 --- a/report/coverlet/WireMock.Net_MatchScores.htm +++ b/report/coverlet/WireMock.Net_MatchScores.htm @@ -75,9 +75,9 @@

 34        /// <param name="value">if set to <c>true</c> [value].</param>  35        /// <returns>score</returns>  36        public static double ToScore(bool value) - 74837        { - 74838            return value ? Perfect : Mismatch; - 74839        } + 71837        { + 71838            return value ? Perfect : Mismatch; + 71839        }  40  41        /// <summary>  42        /// Calculates the score from multiple funcs. @@ -85,9 +85,9 @@

 44        /// <param name="values">The values.</param>  45        /// <returns>average score</returns>  46        public static double ToScore(IEnumerable<bool> values) - 43247        { - 43248            return values.Any() ? values.Select(ToScore).Average() : Mismatch; - 43249        } + 40847        { + 40848            return values.Any() ? values.Select(ToScore).Average() : Mismatch; + 40849        }  50  51        /// <summary>  52        /// Calculates the score from multiple funcs. @@ -102,7 +102,7 @@

 61} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_MatcherMapper.htm b/report/coverlet/WireMock.Net_MatcherMapper.htm index 0e46e2197..e877f30a4 100644 --- a/report/coverlet/WireMock.Net_MatcherMapper.htm +++ b/report/coverlet/WireMock.Net_MatcherMapper.htm @@ -22,14 +22,14 @@

Summary

Coverable lines:46 Total lines:96 Line coverage:93.4% -Branch coverage:85.1% +Branch coverage:86.7%

Metrics

- + @@ -63,7 +63,7 @@

- + @@ -74,7 +74,7 @@

- + @@ -86,7 +86,7 @@

- + @@ -137,7 +137,7 @@

MethodCyclomatic complexity NPath complexity Sequence coverage Branch coverage
Map(...)000.8750.839
Map(...)000.8750.86
Map(...)0011
Map(...)0010.857
 2422            string matcherType = parts.Length > 1 ? parts[1] : null;
 23
 2424            string[] stringPatterns = matcher.Patterns != null ? matcher.Patterns.Cast<string>().ToArray() : new[] { mat
 2425            MatchBehaviour matchBehaviour = matcher.RejectOnMatch == true ? MatchBehaviour.RejectOnMatch : MatchBehaviou
 2425            MatchBehaviour matchBehaviour = matcher.RejectOnMatch == true ? MatchBehaviour.RejectOnMatch : MatchBehaviou
 26
 2427            switch (matcherName)
 28            {
 1133                    return new ExactMatcher(matchBehaviour, stringPatterns);
 34
 35                case "RegexMatcher":
 136                    return new RegexMatcher(matchBehaviour, stringPatterns, matcher.IgnoreCase == true);
 136                    return new RegexMatcher(matchBehaviour, stringPatterns, matcher.IgnoreCase == true);
 37
 38                case "JsonMatcher":
 039                    return new JsonMatcher(matchBehaviour, matcher.Pattern);
 045                    return new XPathMatcher(matchBehaviour, (string)matcher.Pattern);
 46
 47                case "WildcardMatcher":
 548                    return new WildcardMatcher(matchBehaviour, stringPatterns, matcher.IgnoreCase == true);
 548                    return new WildcardMatcher(matchBehaviour, stringPatterns, matcher.IgnoreCase == true);
 49
 50                case "SimMetricsMatcher":
 351                    SimMetricType type = SimMetricType.Levenstein;
 96}
-
+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_MatcherModel.htm b/report/coverlet/WireMock.Net_MatcherModel.htm index a6ee4442a..5550a644b 100644 --- a/report/coverlet/WireMock.Net_MatcherModel.htm +++ b/report/coverlet/WireMock.Net_MatcherModel.htm @@ -64,7 +64,7 @@

 33} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_OwinRequestMapper.htm b/report/coverlet/WireMock.Net_OwinRequestMapper.htm index 0e929fee6..6791a4bee 100644 --- a/report/coverlet/WireMock.Net_OwinRequestMapper.htm +++ b/report/coverlet/WireMock.Net_OwinRequestMapper.htm @@ -4,7 +4,7 @@ -WireMock.Owin.OwinRequestMapper - Coverage Report +WireMock.Owin.Mappers.OwinRequestMapper - Coverage Report

Summary

@@ -14,14 +14,14 @@

Summary

-Class:WireMock.Owin.OwinRequestMapper +Class:WireMock.Owin.Mappers.OwinRequestMapper Assembly:WireMock.Net -File(s):C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Owin\OwinRequestMapper.cs -Covered lines:28 +File(s):C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Owin\Mappers\OwinRequestMapper.cs +Covered lines:32 Uncovered lines:7 -Coverable lines:35 -Total lines:90 -Line coverage:80% +Coverable lines:39 +Total lines:89 +Line coverage:82% Branch coverage:62.5% @@ -29,12 +29,13 @@

Metrics

- - + + +
MethodCyclomatic complexity NPath complexity Sequence coverage Branch coverage
ShouldParseBody(...)0010
MapAsync()000.7810.625
ParseRequest(...)0010.5
ShouldParseBody(...)0010
MapAsync()000.750.643

File(s)

-

C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Owin\OwinRequestMapper.cs

+

C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Owin\Mappers\OwinRequestMapper.cs

@@ -42,100 +43,100 @@

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 2using System.Collections.Generic;
 3using System.Linq;
 4using System.Threading.Tasks;
 5using WireMock.Util;
 6#if !USE_ASPNETCORE
 7using Microsoft.Owin;
 8#else
 9using Microsoft.AspNetCore.Http;
 10using Microsoft.AspNetCore.Http.Extensions;
 11#endif
 12
 13namespace WireMock.Owin
 14{
 15    /// <summary>
 16    /// OwinRequestMapper
 17    /// </summary>
 18    internal class OwinRequestMapper
 19    {
 20        /// <summary>
 21        /// MapAsync IOwinRequest to RequestMessage
 22        /// </summary>
 23        /// <param name="request"></param>
 24        /// <returns></returns>
 25        public async Task<RequestMessage> MapAsync(
 26#if !USE_ASPNETCORE
 27            IOwinRequest request
 28#else
 29            HttpRequest request
 30#endif
 31            )
 6532        {
 33#if !USE_ASPNETCORE
 34            var urldetails = UrlUtils.Parse(request.Uri, request.PathBase);
 35            string clientIP = request.RemoteIpAddress;
 36#else
 6537            var urldetails = UrlUtils.Parse(new Uri(request.GetEncodedUrl()), request.PathBase);
 6538            var connection = request.HttpContext.Connection;
 6539            string clientIP = connection.RemoteIpAddress.IsIPv4MappedToIPv6
 6540                ? connection.RemoteIpAddress.MapToIPv4().ToString()
 6541                : connection.RemoteIpAddress.ToString();
 42#endif
 6543            string method = request.Method;
 44
 6545            Dictionary<string, string[]> headers = null;
 6546            if (request.Headers.Any())
 6547            {
 6548                headers = new Dictionary<string, string[]>();
 39349                foreach (var header in request.Headers)
 9950                {
 9951                    headers.Add(header.Key, header.Value);
 9952                }
 6553            }
 5using WireMock.Models;
 6using WireMock.Util;
 7#if !USE_ASPNETCORE
 8using IRequest = Microsoft.Owin.IOwinRequest;
 9#else
 10using Microsoft.AspNetCore.Http;
 11using Microsoft.AspNetCore.Http.Extensions;
 12using IRequest = Microsoft.AspNetCore.Http.HttpRequest;
 13#endif
 14
 15namespace WireMock.Owin.Mappers
 16{
 17    /// <summary>
 18    /// OwinRequestMapper
 19    /// </summary>
 20    internal class OwinRequestMapper : IOwinRequestMapper
 21    {
 22        /// <inheritdoc cref="IOwinRequestMapper.MapAsync"/>
 23        public async Task<RequestMessage> MapAsync(IRequest request)
 4624        {
 4625            (UrlDetails urldetails, string clientIP) = ParseRequest(request);
 26
 4627            string method = request.Method;
 28
 4629            Dictionary<string, string[]> headers = null;
 4630            if (request.Headers.Any())
 4631            {
 4632                headers = new Dictionary<string, string[]>();
 26233                foreach (var header in request.Headers)
 6234                {
 6235                    headers.Add(header.Key, header.Value);
 6236                }
 4637            }
 38
 4639            IDictionary<string, string> cookies = null;
 4640            if (request.Cookies.Any())
 041            {
 042                cookies = new Dictionary<string, string>();
 043                foreach (var cookie in request.Cookies)
 044                {
 045                    cookies.Add(cookie.Key, cookie.Value);
 046                }
 047            }
 48
 4649            BodyData body = null;
 4650            if (request.Body != null && ShouldParseBody(method))
 751            {
 752                body = await BodyParser.Parse(request.Body, request.ContentType);
 753            }
 54
 6555            IDictionary<string, string> cookies = null;
 6556            if (request.Cookies.Any())
 057            {
 058                cookies = new Dictionary<string, string>();
 059                foreach (var cookie in request.Cookies)
 060                {
 061                    cookies.Add(cookie.Key, cookie.Value);
 062                }
 063            }
 64
 6565            BodyData body = null;
 6566            if (request.Body != null && ShouldParseBody(method))
 1667            {
 1668                body = await BodyParser.Parse(request.Body, request.ContentType);
 1669            }
 70
 6571            return new RequestMessage(urldetails, method, clientIP, body, headers, cookies) { DateTime = DateTime.Now };
 6572        }
 73
 74        private bool ShouldParseBody(string method)
 6575        {
 76            /*
 77                HEAD - No defined body semantics.
 78                GET - No defined body semantics.
 79                PUT - Body supported.
 80                POST - Body supported.
 81                DELETE - No defined body semantics.
 82                TRACE - Body not supported.
 83                OPTIONS - Body supported but no semantics on usage (maybe in the future).
 84                CONNECT - No defined body semantics
 85                PATCH - Body supported.
 86            */
 6587            return new[] { "PUT", "POST", "OPTIONS", "PATCH" }.Contains(method.ToUpper());
 6588        }
 89    }
 90}
 4655            return new RequestMessage(urldetails, method, clientIP, body, headers, cookies) { DateTime = DateTime.UtcNow
 4656        }
 57
 58        private (UrlDetails UrlDetails, string ClientIP) ParseRequest(IRequest request)
 4659        {
 60#if !USE_ASPNETCORE
 61            var urldetails = UrlUtils.Parse(request.Uri, request.PathBase);
 62            string clientIP = request.RemoteIpAddress;
 63#else
 4664            var urldetails = UrlUtils.Parse(new Uri(request.GetEncodedUrl()), request.PathBase);
 4665            var connection = request.HttpContext.Connection;
 4666            string clientIP = connection.RemoteIpAddress.IsIPv4MappedToIPv6
 4667                ? connection.RemoteIpAddress.MapToIPv4().ToString()
 4668                : connection.RemoteIpAddress.ToString();
 69#endif
 4670            return (urldetails, clientIP);
 4671        }
 72
 73        private bool ShouldParseBody(string method)
 4674        {
 75            /*
 76                HEAD - No defined body semantics.
 77                GET - No defined body semantics.
 78                PUT - Body supported.
 79                POST - Body supported.
 80                DELETE - No defined body semantics.
 81                TRACE - Body not supported.
 82                OPTIONS - Body supported but no semantics on usage (maybe in the future).
 83                CONNECT - No defined body semantics
 84                PATCH - Body supported.
 85            */
 4686            return new[] { "PUT", "POST", "OPTIONS", "PATCH" }.Contains(method.ToUpper());
 4687        }
 88    }
 89}
-
+
diff --git a/report/coverlet/WireMock.Net_OwinResponseMapper.htm b/report/coverlet/WireMock.Net_OwinResponseMapper.htm index 064101383..8fbeb1c42 100644 --- a/report/coverlet/WireMock.Net_OwinResponseMapper.htm +++ b/report/coverlet/WireMock.Net_OwinResponseMapper.htm @@ -4,7 +4,7 @@ -WireMock.Owin.OwinResponseMapper - Coverage Report +WireMock.Owin.Mappers.OwinResponseMapper - Coverage Report

Summary

@@ -14,29 +14,29 @@

Summary

-Class:WireMock.Owin.OwinResponseMapper +Class:WireMock.Owin.Mappers.OwinResponseMapper Assembly:WireMock.Net -File(s):C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Owin\OwinResponseMapper.cs -Covered lines:42 -Uncovered lines:5 +File(s):C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Owin\Mappers\OwinResponseMapper.cs +Covered lines:44 +Uncovered lines:3 Coverable lines:47 -Total lines:114 -Line coverage:89.3% -Branch coverage:82.1% +Total lines:100 +Line coverage:93.6% +Branch coverage:76.9%

Metrics

- - - - + + + +
MethodCyclomatic complexity NPath complexity Sequence coverage Branch coverage
SetResponseHeaders(...)0010.833
.ctor()0010
.cctor()0010
MapAsync()000.8330.818
SetResponseHeaders(...)0010.833
.ctor()0010
.cctor()0010
MapAsync()000.90.75

File(s)

-

C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Owin\OwinResponseMapper.cs

+

C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Owin\Mappers\OwinResponseMapper.cs

@@ -44,126 +44,112 @@

- - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 2using System.Collections.Generic;
 3using System.IO;
 4using System.Linq;
 5using System.Net;
 6using System.Text;
 7using System.Threading.Tasks;
 8using Newtonsoft.Json;
 9using WireMock.Http;
 10using WireMock.Util;
 11#if !USE_ASPNETCORE
 5using System.Text;
 6using System.Threading.Tasks;
 7using Newtonsoft.Json;
 8using WireMock.Http;
 9using WireMock.Util;
 10#if !USE_ASPNETCORE
 11using System.Net;
 12using Microsoft.Owin;
 13#else
 14using Microsoft.AspNetCore.Http;
 15#endif
 16
 17namespace WireMock.Owin
 18{
 19    /// <summary>
 20    /// OwinResponseMapper
 21    /// </summary>
 22    public class OwinResponseMapper
 23    {
 11024        private readonly Encoding _utf8NoBom = new UTF8Encoding(false);
 25
 26        // https://msdn.microsoft.com/en-us/library/78h415ay(v=vs.110).aspx
 27#if !USE_ASPNETCORE
 28        private static readonly IDictionary<string, Action<IOwinResponse, WireMockList<string>>> ResponseHeadersToFix = 
 29#else
 130        private static readonly IDictionary<string, Action<HttpResponse, WireMockList<string>>> ResponseHeadersToFix = n
 131#endif
 2332            { HttpKnownHeaderNames.ContentType, (r, v) => r.ContentType = v.FirstOrDefault() }
 133        };
 34
 35        private void SetResponseHeaders(ResponseMessage responseMessage
 36#if !USE_ASPNETCORE
 37            , IOwinResponse response
 38#else
 39            , HttpResponse response
 40#endif
 41        )
 6542        {
 43            // Set headers
 24744            foreach (var pair in responseMessage.Headers)
 2645            {
 2646                if (ResponseHeadersToFix.ContainsKey(pair.Key))
 2247                {
 2248                    ResponseHeadersToFix[pair.Key]?.Invoke(response, pair.Value);
 2249                }
 50                else
 451                {
 52#if !USE_ASPNETCORE
 53                    // For non-NETSTANDARD, check if this response header can be added (#148)
 54                    if (!WebHeaderCollection.IsRestricted(pair.Key, true))
 55                    {
 56                        response.Headers.AppendValues(pair.Key, pair.Value.ToArray());
 57                    }
 58#else
 59                    // NETSTANDARD can add any header (or so it seems)
 460                    response.Headers.Append(pair.Key, pair.Value.ToArray());
 61#endif
 462                }
 2663            }
 6564        }
 65
 66        /// <summary>
 67        /// Map ResponseMessage to OwinResponse/HttpResponse
 68        /// </summary>
 69        /// <param name="responseMessage"></param>
 70        /// <param name="response"></param>
 71        public async Task MapAsync(ResponseMessage responseMessage
 72#if !USE_ASPNETCORE
 73            , IOwinResponse response
 74#else
 75            , HttpResponse response
 76#endif
 77            )
 6578        {
 6579            if (responseMessage == null)
 080            {
 081                return;
 82            }
 83
 6584            response.StatusCode = responseMessage.StatusCode;
 85
 6586            byte[] bytes = null;
 6587            if (responseMessage.BodyAsBytes != null)
 288            {
 289                bytes = responseMessage.BodyAsBytes;
 290            }
 6391            else if (responseMessage.BodyAsFile != null)
 092            {
 093                bytes = File.ReadAllBytes(responseMessage.BodyAsFile);
 094            }
 6395            else if (responseMessage.BodyAsJson != null)
 1996            {
 1997                Formatting formatting = responseMessage.BodyAsJsonIndented == true ? Formatting.Indented : Formatting.No
 1998                string jsonBody = JsonConvert.SerializeObject(responseMessage.BodyAsJson, new JsonSerializerSettings { F
 1999                bytes = (responseMessage.BodyEncoding ?? _utf8NoBom).GetBytes(jsonBody);
 19100            }
 44101            else if (responseMessage.Body != null)
 30102            {
 30103                bytes = (responseMessage.BodyEncoding ?? _utf8NoBom).GetBytes(responseMessage.Body);
 30104            }
 105
 65106            SetResponseHeaders(responseMessage, response);
 107
 65108            if (bytes != null)
 51109            {
 51110                await response.Body.WriteAsync(bytes, 0, bytes.Length);
 51111            }
 65112        }
 113    }
 114}
 13using IResponse = Microsoft.Owin.IOwinResponse;
 14#else
 15using Microsoft.AspNetCore.Http;
 16using IResponse = Microsoft.AspNetCore.Http.HttpResponse;
 17#endif
 18
 19namespace WireMock.Owin.Mappers
 20{
 21    /// <summary>
 22    /// OwinResponseMapper
 23    /// </summary>
 24    public class OwinResponseMapper : IOwinResponseMapper
 25    {
 5426        private readonly Encoding _utf8NoBom = new UTF8Encoding(false);
 27
 28        // https://msdn.microsoft.com/en-us/library/78h415ay(v=vs.110).aspx
 29#if !USE_ASPNETCORE
 30        private static readonly IDictionary<string, Action<IResponse, WireMockList<string>>> ResponseHeadersToFix = new 
 31#else
 132        private static readonly IDictionary<string, Action<IResponse, WireMockList<string>>> ResponseHeadersToFix = new 
 133#endif
 2034            { HttpKnownHeaderNames.ContentType, (r, v) => r.ContentType = v.FirstOrDefault() }
 135        };
 36
 37        /// <inheritdoc cref="IOwinResponseMapper.MapAsync"/>
 38        public async Task MapAsync(ResponseMessage responseMessage, IResponse response)
 5339        {
 5340            if (responseMessage == null)
 141            {
 142                return;
 43            }
 44
 5245            response.StatusCode = responseMessage.StatusCode;
 46
 5247            byte[] bytes = null;
 5248            if (responseMessage.BodyAsBytes != null)
 149            {
 150                bytes = responseMessage.BodyAsBytes;
 151            }
 5152            else if (responseMessage.BodyAsFile != null)
 053            {
 054                bytes = File.ReadAllBytes(responseMessage.BodyAsFile);
 055            }
 5156            else if (responseMessage.BodyAsJson != null)
 1557            {
 1558                Formatting formatting = responseMessage.BodyAsJsonIndented == true ? Formatting.Indented : Formatting.No
 1559                string jsonBody = JsonConvert.SerializeObject(responseMessage.BodyAsJson, new JsonSerializerSettings { F
 1560                bytes = (responseMessage.BodyEncoding ?? _utf8NoBom).GetBytes(jsonBody);
 1561            }
 3662            else if (responseMessage.Body != null)
 1963            {
 1964                bytes = (responseMessage.BodyEncoding ?? _utf8NoBom).GetBytes(responseMessage.Body);
 1965            }
 66
 5267            SetResponseHeaders(responseMessage, response);
 68
 5269            if (bytes != null)
 3570            {
 3571                await response.Body.WriteAsync(bytes, 0, bytes.Length);
 3572            }
 5373        }
 74
 75        private void SetResponseHeaders(ResponseMessage responseMessage, IResponse response)
 5276        {
 77            // Set headers
 20278            foreach (var pair in responseMessage.Headers)
 2379            {
 2380                if (ResponseHeadersToFix.ContainsKey(pair.Key))
 1981                {
 1982                    ResponseHeadersToFix[pair.Key]?.Invoke(response, pair.Value);
 1983                }
 84                else
 485                {
 86#if !USE_ASPNETCORE
 87                    // For non-NETSTANDARD, check if this response header can be added (#148)
 88                    if (!WebHeaderCollection.IsRestricted(pair.Key, true))
 89                    {
 90                        response.Headers.AppendValues(pair.Key, pair.Value.ToArray());
 91                    }
 92#else
 93                    // NETSTANDARD can add any header (or so it seems)
 494                    response.Headers.Append(pair.Key, pair.Value.ToArray());
 95#endif
 496                }
 2397            }
 5298        }
 99    }
 100}
-
+
diff --git a/report/coverlet/WireMock.Net_ParamModel.htm b/report/coverlet/WireMock.Net_ParamModel.htm index 3b2e84f9e..92a5d9e86 100644 --- a/report/coverlet/WireMock.Net_ParamModel.htm +++ b/report/coverlet/WireMock.Net_ParamModel.htm @@ -49,7 +49,7 @@

 18} - +

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_PathModel.htm b/report/coverlet/WireMock.Net_PathModel.htm index 510eaa35b..fdab32010 100644 --- a/report/coverlet/WireMock.Net_PathModel.htm +++ b/report/coverlet/WireMock.Net_PathModel.htm @@ -44,7 +44,7 @@

 13} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_PortUtils.htm b/report/coverlet/WireMock.Net_PortUtils.htm index 66abf72db..0bccb7b0b 100644 --- a/report/coverlet/WireMock.Net_PortUtils.htm +++ b/report/coverlet/WireMock.Net_PortUtils.htm @@ -57,46 +57,46 @@

 16        /// </summary>  17        /// <remarks>see http://stackoverflow.com/questions/138043/find-the-next-tcp-port-in-net.</remarks>  18        public static int FindFreeTcpPort() - 5419        { - 5420            TcpListener tcpListener = null; + 4619        { + 4620            TcpListener tcpListener = null;  21            try - 5422            { - 5423                tcpListener = new TcpListener(IPAddress.Loopback, 0); - 5424                tcpListener.Start(); + 4622            { + 4623                tcpListener = new TcpListener(IPAddress.Loopback, 0); + 4624                tcpListener.Start();  25 - 5426                return ((IPEndPoint)tcpListener.LocalEndpoint).Port; + 4626                return ((IPEndPoint)tcpListener.LocalEndpoint).Port;  27            }  28            finally - 5429            { - 5430                tcpListener?.Stop(); - 5431            } - 5432        } + 4629            { + 4630                tcpListener?.Stop(); + 4631            } + 4632        }  33  34        /// <summary>  35        /// Extract the protocol, host and port from a URL.  36        /// </summary>  37        public static bool TryExtract(string url, out string protocol, out string host, out int port) - 11438        { - 11439            protocol = null; - 11440            host = null; - 11441            port = default(int); + 9838        { + 9839            protocol = null; + 9840            host = null; + 9841            port = default(int);  42 - 11443            Match m = UrlDetailsRegex.Match(url); - 11444            if (m.Success) - 11245            { - 11246                protocol = m.Groups["proto"].Value; - 11247                host = m.Groups["host"].Value; + 9843            Match m = UrlDetailsRegex.Match(url); + 9844            if (m.Success) + 9645            { + 9646                protocol = m.Groups["proto"].Value; + 9647                host = m.Groups["host"].Value;  48 - 11249                return int.TryParse(m.Groups["port"].Value, out port); + 9649                return int.TryParse(m.Groups["port"].Value, out port);  50            }  51  252            return false; - 11453        } + 9853        }  54    }  55} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_ProxyAndRecordSettings.htm b/report/coverlet/WireMock.Net_ProxyAndRecordSettings.htm index d05124c1f..05cc180df 100644 --- a/report/coverlet/WireMock.Net_ProxyAndRecordSettings.htm +++ b/report/coverlet/WireMock.Net_ProxyAndRecordSettings.htm @@ -61,7 +61,7 @@

 30} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_ProxyAsyncResponseProvider.htm b/report/coverlet/WireMock.Net_ProxyAsyncResponseProvider.htm index c737e9ff3..a5e183906 100644 --- a/report/coverlet/WireMock.Net_ProxyAsyncResponseProvider.htm +++ b/report/coverlet/WireMock.Net_ProxyAsyncResponseProvider.htm @@ -67,7 +67,7 @@

 28} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_PublicCertificateHelper.htm b/report/coverlet/WireMock.Net_PublicCertificateHelper.htm index 8484d505a..6a8d42568 100644 --- a/report/coverlet/WireMock.Net_PublicCertificateHelper.htm +++ b/report/coverlet/WireMock.Net_PublicCertificateHelper.htm @@ -129,7 +129,7 @@

 91} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_RegexMatcher.htm b/report/coverlet/WireMock.Net_RegexMatcher.htm index c1f3ee14e..a1eb5d9fc 100644 --- a/report/coverlet/WireMock.Net_RegexMatcher.htm +++ b/report/coverlet/WireMock.Net_RegexMatcher.htm @@ -61,16 +61,16 @@

 17        private readonly Regex[] _expressions;  18  19        /// <inheritdoc cref="IMatcher.MatchBehaviour"/> - 39020        public MatchBehaviour MatchBehaviour { get; } + 37020        public MatchBehaviour MatchBehaviour { get; }  21  22        /// <summary>  23        /// Initializes a new instance of the <see cref="RegexMatcher"/> class.  24        /// </summary>  25        /// <param name="pattern">The pattern.</param>  26        /// <param name="ignoreCase">Ignore the case from the pattern.</param> - 1127        public RegexMatcher([NotNull, RegexPattern] string pattern, bool ignoreCase = false) : this(new[] { pattern }, i - 1128        { - 1129        } + 827        public RegexMatcher([NotNull, RegexPattern] string pattern, bool ignoreCase = false) : this(new[] { pattern }, i + 828        { + 829        }  30  31        /// <summary>  32        /// Initializes a new instance of the <see cref="RegexMatcher"/> class. @@ -78,18 +78,18 @@

 34        /// <param name="matchBehaviour">The match behaviour.</param>  35        /// <param name="pattern">The pattern.</param>  36        /// <param name="ignoreCase">Ignore the case from the pattern.</param> - 11437        public RegexMatcher(MatchBehaviour matchBehaviour, [NotNull, RegexPattern] string pattern, bool ignoreCase = fal - 11438        { - 11439        } + 9837        public RegexMatcher(MatchBehaviour matchBehaviour, [NotNull, RegexPattern] string pattern, bool ignoreCase = fal + 9838        { + 9839        }  40  41        /// <summary>  42        /// Initializes a new instance of the <see cref="RegexMatcher"/> class.  43        /// </summary>  44        /// <param name="patterns">The patterns.</param>  45        /// <param name="ignoreCase">Ignore the case from the pattern.</param> - 1146        public RegexMatcher([NotNull, RegexPattern] string[] patterns, bool ignoreCase = false) : this(MatchBehaviour.Ac - 1147        { - 1148        } + 846        public RegexMatcher([NotNull, RegexPattern] string[] patterns, bool ignoreCase = false) : this(MatchBehaviour.Ac + 847        { + 848        }  49  50        /// <summary>  51        /// Initializes a new instance of the <see cref="RegexMatcher"/> class. @@ -97,41 +97,41 @@

 53        /// <param name="matchBehaviour">The match behaviour.</param>  54        /// <param name="patterns">The patterns.</param>  55        /// <param name="ignoreCase">Ignore the case from the pattern.</param> - 44156        public RegexMatcher(MatchBehaviour matchBehaviour, [NotNull, RegexPattern] string[] patterns, bool ignoreCase =  - 44157        { - 44158            Check.NotNull(patterns, nameof(patterns)); + 40856        public RegexMatcher(MatchBehaviour matchBehaviour, [NotNull, RegexPattern] string[] patterns, bool ignoreCase =  + 40857        { + 40858            Check.NotNull(patterns, nameof(patterns));  59 - 44160            _patterns = patterns; - 44161            IgnoreCase = ignoreCase; - 44162            MatchBehaviour = matchBehaviour; + 40860            _patterns = patterns; + 40861            IgnoreCase = ignoreCase; + 40862            MatchBehaviour = matchBehaviour;  63 - 44164            RegexOptions options = RegexOptions.Compiled; - 44165            if (ignoreCase) + 40864            RegexOptions options = RegexOptions.Compiled; + 40865            if (ignoreCase)  6466            {  6467                options |= RegexOptions.IgnoreCase;  6468            }  69 - 88470            _expressions = patterns.Select(p => new Regex(p, options)).ToArray(); - 44171        } + 81870            _expressions = patterns.Select(p => new Regex(p, options)).ToArray(); + 40871        }  72  73        /// <inheritdoc cref="IStringMatcher.IsMatch"/>  74        public double IsMatch(string input) - 38875        { - 38876            double match = MatchScores.Mismatch; - 38877            if (input != null) - 38778            { + 36875        { + 36876            double match = MatchScores.Mismatch; + 36877            if (input != null) + 36778            {  79                try - 38780                { - 116381                    match = MatchScores.ToScore(_expressions.Select(e => e.IsMatch(input))); - 38782                } + 36780                { + 110381                    match = MatchScores.ToScore(_expressions.Select(e => e.IsMatch(input))); + 36782                }  083                catch (Exception)  084                {  85                    // just ignore exception  086                } - 38787            } + 36787            }  88 - 38889            return MatchBehaviourHelper.Convert(MatchBehaviour, match); - 38890        } + 36889            return MatchBehaviourHelper.Convert(MatchBehaviour, match); + 36890        }  91  92        /// <inheritdoc cref="IStringMatcher.GetPatterns"/>  93        public virtual string[] GetPatterns() @@ -148,7 +148,7 @@

 104} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_RegexUtils.htm b/report/coverlet/WireMock.Net_RegexUtils.htm index 0afb4db0c..11781a5b4 100644 --- a/report/coverlet/WireMock.Net_RegexUtils.htm +++ b/report/coverlet/WireMock.Net_RegexUtils.htm @@ -63,7 +63,7 @@

 24} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_Request.htm b/report/coverlet/WireMock.Net_Request.htm index fdff46f97..80a2d543a 100644 --- a/report/coverlet/WireMock.Net_Request.htm +++ b/report/coverlet/WireMock.Net_Request.htm @@ -108,18 +108,18 @@

 21        /// </summary>  22        /// <returns>The <see cref="IRequestBuilder"/>.</returns>  23        public static IRequestBuilder Create() - 32624        { - 32625            return new Request(new List<IRequestMatcher>()); - 32626        } + 31224        { + 31225            return new Request(new List<IRequestMatcher>()); + 31226        }  27  28        /// <summary>  29        /// Initializes a new instance of the <see cref="Request"/> class.  30        /// </summary>  31        /// <param name="requestMatchers">The request matchers.</param> - 32632        private Request(IList<IRequestMatcher> requestMatchers) : base(requestMatchers) - 32633        { - 32634            _requestMatchers = requestMatchers; - 32635        } + 31232        private Request(IList<IRequestMatcher> requestMatchers) : base(requestMatchers) + 31233        { + 31234            _requestMatchers = requestMatchers; + 31235        }  36  37        /// <summary>  38        /// Gets the request message matchers. @@ -176,27 +176,27 @@

 89  90        /// <inheritdoc cref="IUrlAndPathRequestBuilder.WithPath(IStringMatcher[])"/>  91        public IRequestBuilder WithPath(params IStringMatcher[] matchers) - 6792        { - 6793            Check.NotNullOrEmpty(matchers, nameof(matchers)); + 6692        { + 6693            Check.NotNullOrEmpty(matchers, nameof(matchers));  94 - 6795            _requestMatchers.Add(new RequestMessagePathMatcher(matchers)); - 6796            return this; - 6797        } + 6695            _requestMatchers.Add(new RequestMessagePathMatcher(matchers)); + 6696            return this; + 6697        }  98  99        /// <inheritdoc cref="IUrlAndPathRequestBuilder.WithPath(string[])"/>  100        public IRequestBuilder WithPath(params string[] paths) - 210101        { - 210102            return WithPath(MatchBehaviour.AcceptOnMatch, paths); - 210103        } + 197101        { + 197102            return WithPath(MatchBehaviour.AcceptOnMatch, paths); + 197103        }  104  105        /// <inheritdoc cref="IUrlAndPathRequestBuilder.WithPath(MatchBehaviour, string[])"/>  106        public IRequestBuilder WithPath(MatchBehaviour matchBehaviour, params string[] paths) - 210107        { - 210108            Check.NotNullOrEmpty(paths, nameof(paths)); + 197107        { + 197108            Check.NotNullOrEmpty(paths, nameof(paths));  109 - 210110            _requestMatchers.Add(new RequestMessagePathMatcher(matchBehaviour, paths)); - 210111            return this; - 210112        } + 197110            _requestMatchers.Add(new RequestMessagePathMatcher(matchBehaviour, paths)); + 197111            return this; + 197112        }  113  114        /// <inheritdoc cref="IUrlAndPathRequestBuilder.WithPath(Func{string, bool}[])"/>  115        public IRequestBuilder WithPath(params Func<string, bool>[] funcs) @@ -249,10 +249,10 @@

 162  163        /// <inheritdoc cref="IMethodRequestBuilder.UsingGet(MatchBehaviour)"/>  164        public IRequestBuilder UsingGet(MatchBehaviour matchBehaviour = MatchBehaviour.AcceptOnMatch) - 95165        { - 95166            _requestMatchers.Add(new RequestMessageMethodMatcher(matchBehaviour, "GET")); - 95167            return this; - 95168        } + 91165        { + 91166            _requestMatchers.Add(new RequestMessageMethodMatcher(matchBehaviour, "GET")); + 91167            return this; + 91168        }  169  170        /// <inheritdoc cref="IMethodRequestBuilder.UsingHead(MatchBehaviour)"/>  171        public IRequestBuilder UsingHead(MatchBehaviour matchBehaviour = MatchBehaviour.AcceptOnMatch) @@ -270,10 +270,10 @@

 183  184        /// <inheritdoc cref="IMethodRequestBuilder.UsingPatch(MatchBehaviour)"/>  185        public IRequestBuilder UsingPatch(MatchBehaviour matchBehaviour = MatchBehaviour.AcceptOnMatch) - 1186        { - 1187            _requestMatchers.Add(new RequestMessageMethodMatcher(matchBehaviour, "PATCH")); - 1188            return this; - 1189        } + 2186        { + 2187            _requestMatchers.Add(new RequestMessageMethodMatcher(matchBehaviour, "PATCH")); + 2188            return this; + 2189        }  190  191        /// <inheritdoc cref="IMethodRequestBuilder.UsingPut(MatchBehaviour)"/>  192        public IRequestBuilder UsingPut(MatchBehaviour matchBehaviour = MatchBehaviour.AcceptOnMatch) @@ -284,15 +284,15 @@

 197  198        /// <inheritdoc cref="IMethodRequestBuilder.UsingAnyMethod"/>  199        public IRequestBuilder UsingAnyMethod() - 28200        { - 34201            var matchers = _requestMatchers.Where(m => m is RequestMessageMethodMatcher).ToList(); - 86202            foreach (var matcher in matchers) + 26200        { + 32201            var matchers = _requestMatchers.Where(m => m is RequestMessageMethodMatcher).ToList(); + 80202            foreach (var matcher in matchers)  1203            {  1204                _requestMatchers.Remove(matcher);  1205            }  206 - 28207            return this; - 28208        } + 26207            return this; + 26208        }  209  210        /// <inheritdoc cref="IMethodRequestBuilder.UsingAnyVerb"/>  211        public IRequestBuilder UsingAnyVerb() @@ -302,9 +302,9 @@

 215  216        /// <inheritdoc cref="IMethodRequestBuilder.UsingMethod(string[])"/>  217        public IRequestBuilder UsingMethod(params string[] methods) - 23218        { - 23219            return UsingMethod(MatchBehaviour.AcceptOnMatch, methods); - 23220        } + 22218        { + 22219            return UsingMethod(MatchBehaviour.AcceptOnMatch, methods); + 22220        }  221  222        /// <inheritdoc cref="IMethodRequestBuilder.UsingVerb(string[])"/>  223        public IRequestBuilder UsingVerb(params string[] verbs) @@ -314,12 +314,12 @@

 227  228        /// <inheritdoc cref="IMethodRequestBuilder.UsingMethod(MatchBehaviour, string[])"/>  229        public IRequestBuilder UsingMethod(MatchBehaviour matchBehaviour, params string[] methods) - 23230        { - 23231            Check.NotNullOrEmpty(methods, nameof(methods)); + 22230        { + 22231            Check.NotNullOrEmpty(methods, nameof(methods));  232 - 23233            _requestMatchers.Add(new RequestMessageMethodMatcher(matchBehaviour, methods)); - 23234            return this; - 23235        } + 22233            _requestMatchers.Add(new RequestMessageMethodMatcher(matchBehaviour, methods)); + 22234            return this; + 22235        }  236  237        /// <inheritdoc cref="IBodyRequestBuilder.WithBody(string, MatchBehaviour)"/>  238        public IRequestBuilder WithBody(string body, MatchBehaviour matchBehaviour = MatchBehaviour.AcceptOnMatch) @@ -344,12 +344,12 @@

 257  258        /// <inheritdoc cref="IBodyRequestBuilder.WithBody(IMatcher)"/>  259        public IRequestBuilder WithBody(IMatcher matcher) - 20260        { - 20261            Check.NotNull(matcher, nameof(matcher)); + 13260        { + 13261            Check.NotNull(matcher, nameof(matcher));  262 - 20263            _requestMatchers.Add(new RequestMessageBodyMatcher(matcher)); - 20264            return this; - 20265        } + 13263            _requestMatchers.Add(new RequestMessageBodyMatcher(matcher)); + 13264            return this; + 13265        }  266  267        /// <inheritdoc cref="IBodyRequestBuilder.WithBody(Func{string, bool})"/>  268        public IRequestBuilder WithBody(Func<string, bool> func) @@ -505,7 +505,7 @@

 418} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_RequestMatchResult.htm b/report/coverlet/WireMock.Net_RequestMatchResult.htm index 9210d8976..1b3185a9a 100644 --- a/report/coverlet/WireMock.Net_RequestMatchResult.htm +++ b/report/coverlet/WireMock.Net_RequestMatchResult.htm @@ -17,12 +17,12 @@

Summary

Class:WireMock.Matchers.Request.RequestMatchResult Assembly:WireMock.Net File(s):C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Matchers\Request\RequestMatchResult.cs -Covered lines:12 -Uncovered lines:4 +Covered lines:16 +Uncovered lines:0 Coverable lines:16 Total lines:82 -Line coverage:75% -Branch coverage:100% +Line coverage:100% +Branch coverage:50%

Metrics

@@ -30,7 +30,7 @@

Metrics

MethodCyclomatic complexity NPath complexity Sequence coverage Branch coverage AddScore(...)0010 -CompareTo(...)0000 +CompareTo(...)0010 .ctor()0010 @@ -55,7 +55,7 @@

 14        /// <value>  15        /// The match-score.  16        /// </value> - 193317        public double TotalScore { get; private set; } + 182417        public double TotalScore { get; private set; }  18  19        /// <summary>  20        /// Gets or sets the total number of matches. @@ -63,7 +63,7 @@

 22        /// <value>  23        /// The total number of matches.  24        /// </value> - 198725        public int TotalNumber { get; private set; } + 186525        public int TotalNumber { get; private set; }  26  27        /// <summary>  28        /// Gets or sets a value indicating whether this instance is perfect match. @@ -71,7 +71,7 @@

 30        /// <value>  31        /// <c>true</c> if this instance is perfect match; otherwise, <c>false</c>.  32        /// </value> - 34633        public bool IsPerfectMatch => Math.Abs(TotalScore - TotalNumber) < MatchScores.Tolerance; + 31633        public bool IsPerfectMatch => Math.Abs(TotalScore - TotalNumber) < MatchScores.Tolerance;  34  35        /// <summary>  36        /// Gets the match percentage. @@ -79,17 +79,17 @@

 38        /// <value>  39        /// The match percentage.  40        /// </value> - 5441        public double AverageTotalScore => TotalNumber == 0 ? 0.0 : TotalScore / TotalNumber; + 4141        public double AverageTotalScore => TotalNumber == 0 ? 0.0 : TotalScore / TotalNumber;  42  43        /// <summary>  44        /// Gets the match details.  45        /// </summary> - 79346        public IList<KeyValuePair<Type, double>> MatchDetails { get; } + 75146        public IList<KeyValuePair<Type, double>> MatchDetails { get; }  47  48        /// <summary>  49        /// Initializes a new instance of the <see cref="RequestMatchResult"/> class.  50        /// </summary> - 75851        public RequestMatchResult() => MatchDetails = new List<KeyValuePair<Type, double>>(); + 73051        public RequestMatchResult() => MatchDetails = new List<KeyValuePair<Type, double>>();  52  53        /// <summary>  54        /// Adds the score. @@ -98,13 +98,13 @@

 57        /// <param name="score">The score.</param>  58        /// <returns>The score.</returns>  59        public double AddScore(Type matcherType, double score) - 74260        { - 74261            TotalScore += score; - 74262            TotalNumber++; - 74263            MatchDetails.Add(new KeyValuePair<Type, double>(matcherType, score)); + 71660        { + 71661            TotalScore += score; + 71662            TotalNumber++; + 71663            MatchDetails.Add(new KeyValuePair<Type, double>(matcherType, score));  64 - 74265            return score; - 74266        } + 71665            return score; + 71666        }  67  68        /// <summary>  69        /// Compares the current instance with another object of the same type and returns an integer that indicates whe @@ -114,16 +114,16 @@

 73        /// A value that indicates the relative order of the objects being compared. The return value has these meanings  74        /// </returns>  75        public int CompareTo(object obj) - 076        { - 077            var compareObj = (RequestMatchResult)obj; + 176        { + 177            var compareObj = (RequestMatchResult)obj;  78 - 079            return compareObj.AverageTotalScore.CompareTo(AverageTotalScore); - 080        } + 179            return compareObj.AverageTotalScore.CompareTo(AverageTotalScore); + 180        }  81    }  82} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_RequestMessage.htm b/report/coverlet/WireMock.Net_RequestMessage.htm index dedefdc43..a7ddad1a6 100644 --- a/report/coverlet/WireMock.Net_RequestMessage.htm +++ b/report/coverlet/WireMock.Net_RequestMessage.htm @@ -59,32 +59,32 @@

 18        /// <summary>  19        /// Gets the Client IP Address.  20        /// </summary> - 7521        public string ClientIP { get; } + 6021        public string ClientIP { get; }  22  23        /// <summary>  24        /// Gets the url (relative).  25        /// </summary> - 7726        public string Url { get; } + 6126        public string Url { get; }  27  28        /// <summary>  29        /// Gets the AbsoluteUrl.  30        /// </summary> - 7031        public string AbsoluteUrl { get; } + 5531        public string AbsoluteUrl { get; }  32  33        /// <summary>  34        /// Gets the DateTime.  35        /// </summary> - 13436        public DateTime DateTime { get; set; } + 10136        public DateTime DateTime { get; set; }  37  38        /// <summary>  39        /// Gets the path (relative).  40        /// </summary> - 67241        public string Path { get; } + 61641        public string Path { get; }  42  43        /// <summary>  44        /// Gets the AbsolutePath.  45        /// </summary> - 27846        public string AbsolutePath { get; } + 25546        public string AbsolutePath { get; }  47  48        /// <summary>  49        /// Gets the path segments. @@ -99,57 +99,57 @@

 58        /// <summary>  59        /// Gets the method.  60        /// </summary> - 37261        public string Method { get; } + 35061        public string Method { get; }  62  63        /// <summary>  64        /// Gets the headers.  65        /// </summary> - 20266        public IDictionary<string, WireMockList<string>> Headers { get; } + 18966        public IDictionary<string, WireMockList<string>> Headers { get; }  67  68        /// <summary>  69        /// Gets the cookies.  70        /// </summary> - 8971        public IDictionary<string, string> Cookies { get; } + 7471        public IDictionary<string, string> Cookies { get; }  72  73        /// <summary>  74        /// Gets the query.  75        /// </summary> - 11976        public IDictionary<string, WireMockList<string>> Query { get; } + 10476        public IDictionary<string, WireMockList<string>> Query { get; }  77  78        /// <summary>  79        /// Gets the raw query.  80        /// </summary> - 20881        public string RawQuery { get; } + 20081        public string RawQuery { get; }  82  83        /// <summary>  84        /// The original body as string, this is defined when Body or BodyAsJson are not null.  85        /// </summary> - 13886        public string Body { get; } + 10786        public string Body { get; }  87  88        /// <summary>  89        /// The body (as JSON object).  90        /// </summary> - 33591        public object BodyAsJson { get; set; } + 30291        public object BodyAsJson { get; set; }  92  93        /// <summary>  94        /// The body (as bytearray).  95        /// </summary> - 29596        public byte[] BodyAsBytes { get; set; } + 27196        public byte[] BodyAsBytes { get; set; }  97  98        /// <summary>  99        /// Gets the Host  100        /// </summary> - 209101        public string Host { get; } + 201101        public string Host { get; }  102  103        /// <summary>  104        /// Gets the protocol  105        /// </summary> - 209106        public string Protocol { get; } + 201106        public string Protocol { get; }  107  108        /// <summary>  109        /// Gets the port  110        /// </summary> - 209111        public int Port { get; } + 201111        public int Port { get; }  112  113        /// <summary>  114        /// Gets the origin @@ -159,7 +159,7 @@

 118        /// <summary>  119        /// The body encoding.  120        /// </summary> - 129121        public Encoding BodyEncoding { get; } + 87121        public Encoding BodyEncoding { get; }  122  123        /// <summary>  124        /// Initializes a new instance of the <see cref="RequestMessage"/> class. @@ -170,43 +170,43 @@

 129        /// <param name="body">The body.</param>  130        /// <param name="headers">The headers.</param>  131        /// <param name="cookies">The cookies.</param> - 208132        public RequestMessage([NotNull] UrlDetails urlDetails, [NotNull] string method, [NotNull] string clientIP, [CanB - 208133        { - 208134            Check.NotNull(urlDetails, nameof(urlDetails)); - 208135            Check.NotNull(method, nameof(method)); - 208136            Check.NotNull(clientIP, nameof(clientIP)); + 200132        public RequestMessage([NotNull] UrlDetails urlDetails, [NotNull] string method, [NotNull] string clientIP, [CanB + 200133        { + 200134            Check.NotNull(urlDetails, nameof(urlDetails)); + 200135            Check.NotNull(method, nameof(method)); + 200136            Check.NotNull(clientIP, nameof(clientIP));  137 - 208138            AbsoluteUrl = urlDetails.AbsoluteUrl.ToString(); - 208139            Url = urlDetails.Url.ToString(); - 208140            Protocol = urlDetails.Url.Scheme; - 208141            Host = urlDetails.Url.Host; - 208142            Port = urlDetails.Url.Port; - 208143            Origin = $"{Protocol}://{Host}:{Port}"; + 200138            AbsoluteUrl = urlDetails.AbsoluteUrl.ToString(); + 200139            Url = urlDetails.Url.ToString(); + 200140            Protocol = urlDetails.Url.Scheme; + 200141            Host = urlDetails.Url.Host; + 200142            Port = urlDetails.Url.Port; + 200143            Origin = $"{Protocol}://{Host}:{Port}";  144 - 208145            AbsolutePath = WebUtility.UrlDecode(urlDetails.AbsoluteUrl.AbsolutePath); - 208146            Path = WebUtility.UrlDecode(urlDetails.Url.AbsolutePath); - 208147            PathSegments = Path.Split('/').Skip(1).ToArray(); - 208148            AbsolutePathSegments = AbsolutePath.Split('/').Skip(1).ToArray(); + 200145            AbsolutePath = WebUtility.UrlDecode(urlDetails.AbsoluteUrl.AbsolutePath); + 200146            Path = WebUtility.UrlDecode(urlDetails.Url.AbsolutePath); + 199147            PathSegments = Path.Split('/').Skip(1).ToArray(); + 200148            AbsolutePathSegments = AbsolutePath.Split('/').Skip(1).ToArray();  149 - 208150            Method = method; - 208151            ClientIP = clientIP; + 200150            Method = method; + 200151            ClientIP = clientIP;  152 - 208153            Body = body?.BodyAsString; - 208154            BodyEncoding = body?.Encoding; - 208155            BodyAsJson = body?.BodyAsJson; - 208156            BodyAsBytes = body?.BodyAsBytes; + 200153            Body = body?.BodyAsString; + 200154            BodyEncoding = body?.Encoding; + 200155            BodyAsJson = body?.BodyAsJson; + 200156            BodyAsBytes = body?.BodyAsBytes;  157 - 446158            Headers = headers?.ToDictionary(header => header.Key, header => new WireMockList<string>(header.Value)); - 208159            Cookies = cookies; - 208160            RawQuery = WebUtility.UrlDecode(urlDetails.Url.Query); - 208161            Query = ParseQuery(RawQuery); - 208162        } + 365158            Headers = headers?.ToDictionary(header => header.Key, header => new WireMockList<string>(header.Value)); + 199159            Cookies = cookies; + 200160            RawQuery = WebUtility.UrlDecode(urlDetails.Url.Query); + 200161            Query = ParseQuery(RawQuery); + 200162        }  163  164        private static IDictionary<string, WireMockList<string>> ParseQuery(string queryString) - 208165        { - 208166            if (string.IsNullOrEmpty(queryString)) - 195167            { - 195168                return null; + 200165        { + 200166            if (string.IsNullOrEmpty(queryString)) + 187167            { + 187168                return null;  169            }  170  13171            if (queryString.StartsWith("?")) @@ -233,7 +233,7 @@

 13192  33193                    return dict;  33194                }); - 208195        } + 200195        }  196  197        /// <summary>  198        /// Get a query parameter. @@ -253,7 +253,7 @@

 212} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_RequestMessageBodyMatcher.htm b/report/coverlet/WireMock.Net_RequestMessageBodyMatcher.htm index 93e64183f..2351a28c0 100644 --- a/report/coverlet/WireMock.Net_RequestMessageBodyMatcher.htm +++ b/report/coverlet/WireMock.Net_RequestMessageBodyMatcher.htm @@ -74,7 +74,7 @@

 27        /// <summary>  28        /// The matcher.  29        /// </summary> - 5230        public IMatcher Matcher { get; } + 3830        public IMatcher Matcher { get; }  31  32        /// <summary>  33        /// Initializes a new instance of the <see cref="RequestMessageBodyMatcher"/> class. @@ -137,50 +137,50 @@

 90        /// Initializes a new instance of the <see cref="RequestMessageBodyMatcher"/> class.  91        /// </summary>  92        /// <param name="matcher">The matcher.</param> - 3093        public RequestMessageBodyMatcher([NotNull] IMatcher matcher) - 3094        { - 3095            Check.NotNull(matcher, nameof(matcher)); - 3096            Matcher = matcher; - 3097        } + 2393        public RequestMessageBodyMatcher([NotNull] IMatcher matcher) + 2394        { + 2395            Check.NotNull(matcher, nameof(matcher)); + 2396            Matcher = matcher; + 2397        }  98  99        /// <see cref="IRequestMatcher.GetMatchingScore"/>  100        public double GetMatchingScore(RequestMessage requestMessage, RequestMatchResult requestMatchResult) - 30101        { - 30102            double score = IsMatch(requestMessage); - 30103            return requestMatchResult.AddScore(GetType(), score); - 30104        } + 22101        { + 22102            double score = IsMatch(requestMessage); + 22103            return requestMatchResult.AddScore(GetType(), score); + 22104        }  105  106        private double IsMatch(RequestMessage requestMessage) - 30107        { + 22107        {  108            // Check if the matcher is a IObjectMatcher - 30109            if (Matcher is IObjectMatcher objectMatcher) - 11110            { + 22109            if (Matcher is IObjectMatcher objectMatcher) + 9110            {  111                // If the body is a JSON object, try to match. - 11112                if (requestMessage.BodyAsJson != null) - 6113                { - 6114                    return objectMatcher.IsMatch(requestMessage.BodyAsJson); + 9112                if (requestMessage.BodyAsJson != null) + 5113                { + 5114                    return objectMatcher.IsMatch(requestMessage.BodyAsJson);  115                }  116  117                // If the body is a byte array, try to match. - 5118                if (requestMessage.BodyAsBytes != null) + 4118                if (requestMessage.BodyAsBytes != null)  2119                {  2120                    return objectMatcher.IsMatch(requestMessage.BodyAsBytes);  121                } - 3122            } + 2122            }  123  124            // Check if the matcher is a IStringMatcher - 22125            if (Matcher is IStringMatcher stringMatcher) - 19126            { + 15125            if (Matcher is IStringMatcher stringMatcher) + 12126            {  127                // If the  body is a JSON object, try to use Body (string) to match. - 19128                if (requestMessage.BodyAsJson != null && requestMessage.Body != null) - 4129                { - 4130                    return stringMatcher.IsMatch(requestMessage.Body); + 12128                if (requestMessage.BodyAsJson != null && requestMessage.Body != null) + 1129                { + 1130                    return stringMatcher.IsMatch(requestMessage.Body);  131                }  132  133                // If the string body is defined, try to match. - 15134                if (requestMessage.Body != null) - 13135                { - 13136                    return stringMatcher.IsMatch(requestMessage.Body); + 11134                if (requestMessage.Body != null) + 9135                { + 9136                    return stringMatcher.IsMatch(requestMessage.Body);  137                }  2138            }  139 @@ -200,12 +200,12 @@

 153            }  154  2155            return MatchScores.Mismatch; - 30156        } + 22156        }  157    }  158} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_RequestMessageClientIPMatcher.htm b/report/coverlet/WireMock.Net_RequestMessageClientIPMatcher.htm index 172d21514..5a5c8794b 100644 --- a/report/coverlet/WireMock.Net_RequestMessageClientIPMatcher.htm +++ b/report/coverlet/WireMock.Net_RequestMessageClientIPMatcher.htm @@ -118,7 +118,7 @@

 75} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_RequestMessageCompositeMatcher.htm b/report/coverlet/WireMock.Net_RequestMessageCompositeMatcher.htm index e14ed225a..692de636f 100644 --- a/report/coverlet/WireMock.Net_RequestMessageCompositeMatcher.htm +++ b/report/coverlet/WireMock.Net_RequestMessageCompositeMatcher.htm @@ -58,41 +58,41 @@

 18        /// <value>  19        /// The request matchers.  20        /// </value> - 69121        private IEnumerable<IRequestMatcher> RequestMatchers { get; } + 65721        private IEnumerable<IRequestMatcher> RequestMatchers { get; }  22  23        /// <summary>  24        /// Initializes a new instance of the <see cref="RequestMessageCompositeMatcher"/> class.  25        /// </summary>  26        /// <param name="requestMatchers">The request matchers.</param>  27        /// <param name="type">The CompositeMatcherType type (Defaults to 'And')</param> - 32928        protected RequestMessageCompositeMatcher([NotNull] IEnumerable<IRequestMatcher> requestMatchers, CompositeMatche - 32929        { - 32930            Check.NotNull(requestMatchers, nameof(requestMatchers)); + 31528        protected RequestMessageCompositeMatcher([NotNull] IEnumerable<IRequestMatcher> requestMatchers, CompositeMatche + 31529        { + 31530            Check.NotNull(requestMatchers, nameof(requestMatchers));  31 - 32932            _type = type; - 32933            RequestMatchers = requestMatchers; - 32934        } + 31532            _type = type; + 31533            RequestMatchers = requestMatchers; + 31534        }  35  36        /// <inheritdoc cref="IRequestMatcher.GetMatchingScore"/>  37        public double GetMatchingScore(RequestMessage requestMessage, RequestMatchResult requestMatchResult) - 34738        { - 34739            if (!RequestMatchers.Any()) - 340            { - 341                return MatchScores.Mismatch; + 32938        { + 32939            if (!RequestMatchers.Any()) + 140            { + 141                return MatchScores.Mismatch;  42            }  43 - 34444            if (_type == CompositeMatcherType.And) - 34345            { - 102446                return RequestMatchers.Average(requestMatcher => requestMatcher.GetMatchingScore(requestMessage, request + 32844            if (_type == CompositeMatcherType.And) + 32745            { + 97846                return RequestMatchers.Average(requestMatcher => requestMatcher.GetMatchingScore(requestMessage, request  47            }  48  349            return RequestMatchers.Max(requestMatcher => requestMatcher.GetMatchingScore(requestMessage, requestMatchRes - 34750        } + 32950        }  51    }  52} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_RequestMessageCookieMatcher.htm b/report/coverlet/WireMock.Net_RequestMessageCookieMatcher.htm index f3a163122..aa7bd5e74 100644 --- a/report/coverlet/WireMock.Net_RequestMessageCookieMatcher.htm +++ b/report/coverlet/WireMock.Net_RequestMessageCookieMatcher.htm @@ -154,7 +154,7 @@

 111} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_RequestMessageHeaderMatcher.htm b/report/coverlet/WireMock.Net_RequestMessageHeaderMatcher.htm index 5c00f5ae8..9c50e8da8 100644 --- a/report/coverlet/WireMock.Net_RequestMessageHeaderMatcher.htm +++ b/report/coverlet/WireMock.Net_RequestMessageHeaderMatcher.htm @@ -175,7 +175,7 @@

 131} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_RequestMessageMethodMatcher.htm b/report/coverlet/WireMock.Net_RequestMessageMethodMatcher.htm index 879695e3a..e651a28d5 100644 --- a/report/coverlet/WireMock.Net_RequestMessageMethodMatcher.htm +++ b/report/coverlet/WireMock.Net_RequestMessageMethodMatcher.htm @@ -55,37 +55,37 @@

 15        /// <summary>  16        /// The methods  17        /// </summary> - 29218        public string[] Methods { get; } + 28718        public string[] Methods { get; }  19  20        /// <summary>  21        /// Initializes a new instance of the <see cref="RequestMessageMethodMatcher"/> class.  22        /// </summary>  23        /// <param name="matchBehaviour">The match behaviour.</param>  24        /// <param name="methods">The methods.</param> - 25825        public RequestMessageMethodMatcher(MatchBehaviour matchBehaviour, [NotNull] params string[] methods) - 25826        { - 25827            Check.NotNull(methods, nameof(methods)); - 25828            _matchBehaviour = matchBehaviour; + 25425        public RequestMessageMethodMatcher(MatchBehaviour matchBehaviour, [NotNull] params string[] methods) + 25426        { + 25427            Check.NotNull(methods, nameof(methods)); + 25428            _matchBehaviour = matchBehaviour;  29 - 25830            Methods = methods; - 25831        } + 25430            Methods = methods; + 25431        }  32  33        /// <inheritdoc cref="IRequestMatcher.GetMatchingScore"/>  34        public double GetMatchingScore(RequestMessage requestMessage, RequestMatchResult requestMatchResult) - 29235        { - 29236            double score = MatchBehaviourHelper.Convert(_matchBehaviour, IsMatch(requestMessage)); - 29237            return requestMatchResult.AddScore(GetType(), score); - 29238        } + 28635        { + 28636            double score = MatchBehaviourHelper.Convert(_matchBehaviour, IsMatch(requestMessage)); + 28637            return requestMatchResult.AddScore(GetType(), score); + 28638        }  39  40        private double IsMatch(RequestMessage requestMessage) - 29241        { - 29242            return MatchScores.ToScore(Methods.Contains(requestMessage.Method, StringComparer.OrdinalIgnoreCase)); - 29243        } + 28641        { + 28642            return MatchScores.ToScore(Methods.Contains(requestMessage.Method, StringComparer.OrdinalIgnoreCase)); + 28643        }  44    }  45} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_RequestMessageParamMatcher.htm b/report/coverlet/WireMock.Net_RequestMessageParamMatcher.htm index ad48d0b0f..2c1fd0c35 100644 --- a/report/coverlet/WireMock.Net_RequestMessageParamMatcher.htm +++ b/report/coverlet/WireMock.Net_RequestMessageParamMatcher.htm @@ -164,7 +164,7 @@

 120} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_RequestMessagePathMatcher.htm b/report/coverlet/WireMock.Net_RequestMessagePathMatcher.htm index c764d852f..61ea92050 100644 --- a/report/coverlet/WireMock.Net_RequestMessagePathMatcher.htm +++ b/report/coverlet/WireMock.Net_RequestMessagePathMatcher.htm @@ -57,7 +57,7 @@

 14        /// <summary>  15        /// The matchers  16        /// </summary> - 62517        public IReadOnlyList<IStringMatcher> Matchers { get; } + 59317        public IReadOnlyList<IStringMatcher> Matchers { get; }  18  19        /// <summary>  20        /// The path functions @@ -69,20 +69,20 @@

 26        /// </summary>  27        /// <param name="matchBehaviour">The match behaviour.</param>  28        /// <param name="paths">The paths.</param> - 42129        public RequestMessagePathMatcher(MatchBehaviour matchBehaviour, [NotNull] params string[] paths) : this(paths.Se - 21030        { - 21031        } + 39529        public RequestMessagePathMatcher(MatchBehaviour matchBehaviour, [NotNull] params string[] paths) : this(paths.Se + 19730        { + 19731        }  32  33        /// <summary>  34        /// Initializes a new instance of the <see cref="RequestMessagePathMatcher"/> class.  35        /// </summary>  36        /// <param name="matchers">The matchers.</param> - 27737        public RequestMessagePathMatcher([NotNull] params IStringMatcher[] matchers) - 27738        { - 27739            Check.NotNull(matchers, nameof(matchers)); + 26337        public RequestMessagePathMatcher([NotNull] params IStringMatcher[] matchers) + 26338        { + 26339            Check.NotNull(matchers, nameof(matchers));  40 - 27741            Matchers = matchers; - 27742        } + 26341            Matchers = matchers; + 26342        }  43  44        /// <summary>  45        /// Initializes a new instance of the <see cref="RequestMessagePathMatcher"/> class. @@ -97,16 +97,16 @@

 54  55        /// <inheritdoc cref="IRequestMatcher.GetMatchingScore"/>  56        public double GetMatchingScore(RequestMessage requestMessage, RequestMatchResult requestMatchResult) - 31257        { - 31258            double score = IsMatch(requestMessage); - 31259            return requestMatchResult.AddScore(GetType(), score); - 31260        } + 29657        { + 29658            double score = IsMatch(requestMessage); + 29659            return requestMatchResult.AddScore(GetType(), score); + 29660        }  61  62        private double IsMatch(RequestMessage requestMessage) - 31263        { - 31264            if (Matchers != null) - 31165            { - 62466                return Matchers.Max(m => m.IsMatch(requestMessage.Path)); + 29663        { + 29664            if (Matchers != null) + 29565            { + 59266                return Matchers.Max(m => m.IsMatch(requestMessage.Path));  67            }  68  169            if (Funcs != null) @@ -115,12 +115,12 @@

 72            }  73  074            return MatchScores.Mismatch; - 31275        } + 29675        }  76    }  77} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_RequestMessageScenarioAndStateMatcher.htm b/report/coverlet/WireMock.Net_RequestMessageScenarioAndStateMatcher.htm index e64d21bfd..c11bc5a50 100644 --- a/report/coverlet/WireMock.Net_RequestMessageScenarioAndStateMatcher.htm +++ b/report/coverlet/WireMock.Net_RequestMessageScenarioAndStateMatcher.htm @@ -87,7 +87,7 @@

 46} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_RequestMessageUrlMatcher.htm b/report/coverlet/WireMock.Net_RequestMessageUrlMatcher.htm index 8bb546624..5418ae860 100644 --- a/report/coverlet/WireMock.Net_RequestMessageUrlMatcher.htm +++ b/report/coverlet/WireMock.Net_RequestMessageUrlMatcher.htm @@ -118,7 +118,7 @@

 75} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_RequestModel.htm b/report/coverlet/WireMock.Net_RequestModel.htm index 87ea88ecd..a70e0302e 100644 --- a/report/coverlet/WireMock.Net_RequestModel.htm +++ b/report/coverlet/WireMock.Net_RequestModel.htm @@ -81,7 +81,7 @@

 50} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_RespondWithAProvider.htm b/report/coverlet/WireMock.Net_RespondWithAProvider.htm index f15308383..cedb2be98 100644 --- a/report/coverlet/WireMock.Net_RespondWithAProvider.htm +++ b/report/coverlet/WireMock.Net_RespondWithAProvider.htm @@ -66,27 +66,27 @@

 18        private readonly RegistrationCallback _registrationCallback;  19        private readonly IRequestMatcher _requestMatcher;  20 - 55321        public Guid Guid { get; private set; } = Guid.NewGuid(); + 52321        public Guid Guid { get; private set; } = Guid.NewGuid();  22  23        /// <summary>  24        /// Initializes a new instance of the <see cref="RespondWithAProvider"/> class.  25        /// </summary>  26        /// <param name="registrationCallback">The registration callback.</param>  27        /// <param name="requestMatcher">The request matcher.</param> - 26428        public RespondWithAProvider(RegistrationCallback registrationCallback, IRequestMatcher requestMatcher) - 26429        { - 26430            _registrationCallback = registrationCallback; - 26431            _requestMatcher = requestMatcher; - 26432        } + 24928        public RespondWithAProvider(RegistrationCallback registrationCallback, IRequestMatcher requestMatcher) + 24929        { + 24930            _registrationCallback = registrationCallback; + 24931            _requestMatcher = requestMatcher; + 24932        }  33  34        /// <summary>  35        /// The respond with.  36        /// </summary>  37        /// <param name="provider">The provider.</param>  38        public void RespondWith(IResponseProvider provider) - 26439        { - 26440            _registrationCallback(new Mapping(Guid, _title, _path, _requestMatcher, provider, _priority, _scenario, _exe - 26441        } + 24939        { + 24940            _registrationCallback(new Mapping(Guid, _title, _path, _requestMatcher, provider, _priority, _scenario, _exe + 24941        }  42  43        /// <see cref="IRespondWithAProvider.WithGuid(string)"/>  44        public IRespondWithAProvider WithGuid(string guid) @@ -163,7 +163,7 @@

 115} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_Response.htm b/report/coverlet/WireMock.Net_Response.htm index 7564e80e8..78885843f 100644 --- a/report/coverlet/WireMock.Net_Response.htm +++ b/report/coverlet/WireMock.Net_Response.htm @@ -17,12 +17,12 @@

Summary

Class:WireMock.ResponseBuilders.Response Assembly:WireMock.Net File(s):C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\ResponseBuilders\Response.cs -Covered lines:152 +Covered lines:161 Uncovered lines:31 -Coverable lines:183 -Total lines:397 -Line coverage:83% -Branch coverage:84% +Coverable lines:192 +Total lines:414 +Line coverage:83.8% +Branch coverage:84.7%

Metrics

@@ -52,8 +52,9 @@

Metrics

WithProxy(...)0000 WithProxy(...)0000 WithCallback(...)0010 +WithCallbackInternal(...)0010 .ctor(...)0010 -ProvideResponseAsync()000.8080.722 +ProvideResponseAsync()000.8280.75

File(s)

@@ -89,17 +90,17 @@

 26        /// <summary>  27        /// The delay  28        /// </summary> - 9429        public TimeSpan? Delay { get; private set; } + 8029        public TimeSpan? Delay { get; private set; }  30  31        /// <summary>  32        /// Gets a value indicating whether [use transformer].  33        /// </summary> - 12134        public bool UseTransformer { get; private set; } + 10834        public bool UseTransformer { get; private set; }  35  36        /// <summary>  37        /// The Proxy URL to use.  38        /// </summary> - 8939        public string ProxyUrl { get; private set; } + 7639        public string ProxyUrl { get; private set; }  40  41        /// <summary>  42        /// The client X509Certificate2 Thumbprint or SubjectName to use. @@ -109,358 +110,375 @@

 46        /// <summary>  47        /// Gets the response message.  48        /// </summary> - 62949        public ResponseMessage ResponseMessage { get; } + 55049        public ResponseMessage ResponseMessage { get; }  50  51        /// <summary>52        /// A delegate to execute to generate the response52        /// A delegate to execute to generate the response.  53        /// </summary> - 9654        public Func<RequestMessage, ResponseMessage> Callback { get; private set; } + 8054        public Func<RequestMessage, ResponseMessage> Callback { get; private set; }  55  56        /// <summary>57        /// Creates this instance.57        /// Defines if the method WithCallback(...) is used.  58        /// </summary>59        /// <param name="responseMessage">ResponseMessage</param>60        /// <returns>A <see cref="IResponseBuilder"/>.</returns>61        [PublicAPI]62        public static IResponseBuilder Create([CanBeNull] ResponseMessage responseMessage = null) - 10063        { - 10064            var message = responseMessage ?? new ResponseMessage { StatusCode = (int)HttpStatusCode.OK }; - 10065            return new Response(message); - 10066        }6768        /// <summary>69        /// Creates this instance with the specified function.70        /// </summary>71        /// <param name="func">The callback function.</param>72        /// <returns>A <see cref="IResponseBuilder"/>.</returns>73        [PublicAPI]74        public static IResponseBuilder Create([NotNull] Func<ResponseMessage> func) - 175        { - 176            Check.NotNull(func, nameof(func));77 - 178            return new Response(func()); - 179        }8081        /// <summary>82        /// Initializes a new instance of the <see cref="Response"/> class.83        /// </summary>84        /// <param name="responseMessage">85        /// The response.86        /// </param> - 10187        private Response(ResponseMessage responseMessage) - 10188        { - 10189            ResponseMessage = responseMessage; - 10190        }9192        /// <summary>93        /// The with status code.94        /// </summary>95        /// <param name="code">The code.</param>96        /// <returns>A <see cref="IResponseBuilder"/>.</returns>\97        [PublicAPI]98        public IResponseBuilder WithStatusCode(int code) - 2499        { - 24100            ResponseMessage.StatusCode = code; - 24101            return this; - 24102        }103104        /// <summary>105        /// The with status code.106        /// </summary>107        /// <param name="code">The code.</param>108        /// <returns>A <see cref="IResponseBuilder"/>.</returns>109        [PublicAPI]110        public IResponseBuilder WithStatusCode(HttpStatusCode code) - 0111        { - 0112            return WithStatusCode((int)code); - 0113        }114115        /// <summary>116        /// The with Success status code (200).117        /// </summary>118        /// <returns>A <see cref="IResponseBuilder"/>.</returns>119        [PublicAPI]120        public IResponseBuilder WithSuccess() - 1121        { - 1122            return WithStatusCode((int)HttpStatusCode.OK); - 1123        }124125        /// <summary>126        /// The with NotFound status code (404).127        /// </summary>128        /// <returns>The <see cref="IResponseBuilder"/>.</returns>129        [PublicAPI]130        public IResponseBuilder WithNotFound() - 0131        { - 0132            return WithStatusCode((int)HttpStatusCode.NotFound); - 0133        }134135        /// <inheritdoc cref="IHeadersResponseBuilder.WithHeader(string, string[])"/>136        public IResponseBuilder WithHeader(string name, params string[] values) - 103137        { - 103138            Check.NotNull(name, nameof(name)); + 459        public bool WithCallbackUsed { get; private set; }6061        /// <summary>62        /// Creates this instance.63        /// </summary>64        /// <param name="responseMessage">ResponseMessage</param>65        /// <returns>A <see cref="IResponseBuilder"/>.</returns>66        [PublicAPI]67        public static IResponseBuilder Create([CanBeNull] ResponseMessage responseMessage = null) + 8768        { + 8769            var message = responseMessage ?? new ResponseMessage { StatusCode = (int)HttpStatusCode.OK }; + 8770            return new Response(message); + 8771        }7273        /// <summary>74        /// Creates this instance with the specified function.75        /// </summary>76        /// <param name="func">The callback function.</param>77        /// <returns>A <see cref="IResponseBuilder"/>.</returns>78        [PublicAPI]79        public static IResponseBuilder Create([NotNull] Func<ResponseMessage> func) + 180        { + 181            Check.NotNull(func, nameof(func));82 + 183            return new Response(func()); + 184        }8586        /// <summary>87        /// Initializes a new instance of the <see cref="Response"/> class.88        /// </summary>89        /// <param name="responseMessage">90        /// The response.91        /// </param> + 8892        private Response(ResponseMessage responseMessage) + 8893        { + 8894            ResponseMessage = responseMessage; + 8895        }9697        /// <summary>98        /// The with status code.99        /// </summary>100        /// <param name="code">The code.</param>101        /// <returns>A <see cref="IResponseBuilder"/>.</returns>\102        [PublicAPI]103        public IResponseBuilder WithStatusCode(int code) + 22104        { + 22105            ResponseMessage.StatusCode = code; + 22106            return this; + 22107        }108109        /// <summary>110        /// The with status code.111        /// </summary>112        /// <param name="code">The code.</param>113        /// <returns>A <see cref="IResponseBuilder"/>.</returns>114        [PublicAPI]115        public IResponseBuilder WithStatusCode(HttpStatusCode code) + 0116        { + 0117            return WithStatusCode((int)code); + 0118        }119120        /// <summary>121        /// The with Success status code (200).122        /// </summary>123        /// <returns>A <see cref="IResponseBuilder"/>.</returns>124        [PublicAPI]125        public IResponseBuilder WithSuccess() + 1126        { + 1127            return WithStatusCode((int)HttpStatusCode.OK); + 1128        }129130        /// <summary>131        /// The with NotFound status code (404).132        /// </summary>133        /// <returns>The <see cref="IResponseBuilder"/>.</returns>134        [PublicAPI]135        public IResponseBuilder WithNotFound() + 0136        { + 0137            return WithStatusCode((int)HttpStatusCode.NotFound); + 0138        }  139 - 103140            ResponseMessage.AddHeader(name, values); - 103141            return this; - 103142        }143144        /// <inheritdoc cref="IHeadersResponseBuilder.WithHeaders(IDictionary{string, string})"/>145        public IResponseBuilder WithHeaders(IDictionary<string, string> headers) - 1146        { - 1147            Check.NotNull(headers, nameof(headers));140        /// <inheritdoc cref="IHeadersResponseBuilder.WithHeader(string, string[])"/>141        public IResponseBuilder WithHeader(string name, params string[] values) + 102142        { + 102143            Check.NotNull(name, nameof(name));144 + 102145            ResponseMessage.AddHeader(name, values); + 102146            return this; + 102147        }  148 - 3149            ResponseMessage.Headers = headers.ToDictionary(header => header.Key, header => new WireMockList<string>(head - 1150            return this; - 1151        }152153        /// <inheritdoc cref="IHeadersResponseBuilder.WithHeaders(IDictionary{string, string[]})"/>154        public IResponseBuilder WithHeaders(IDictionary<string, string[]> headers) - 1155        { - 1156            Check.NotNull(headers, nameof(headers));149        /// <inheritdoc cref="IHeadersResponseBuilder.WithHeaders(IDictionary{string, string})"/>150        public IResponseBuilder WithHeaders(IDictionary<string, string> headers) + 1151        { + 1152            Check.NotNull(headers, nameof(headers));153 + 3154            ResponseMessage.Headers = headers.ToDictionary(header => header.Key, header => new WireMockList<string>(head + 1155            return this; + 1156        }  157 - 3158            ResponseMessage.Headers = headers.ToDictionary(header => header.Key, header => new WireMockList<string>(head - 1159            return this; - 1160        }161162        /// <inheritdoc cref="IHeadersResponseBuilder.WithHeaders(IDictionary{string, WireMockList{string}})"/>163        public IResponseBuilder WithHeaders(IDictionary<string, WireMockList<string>> headers) - 1164        { - 1165            ResponseMessage.Headers = headers; - 1166            return this; - 1167        }168169        /// <inheritdoc cref="IBodyResponseBuilder.WithBody(Func{RequestMessage, string}, string, Encoding)"/>170        public IResponseBuilder WithBody(Func<RequestMessage, string> bodyFactory, string destination = BodyDestinationF - 2171        { - 2172            Check.NotNull(bodyFactory, nameof(bodyFactory));158        /// <inheritdoc cref="IHeadersResponseBuilder.WithHeaders(IDictionary{string, string[]})"/>159        public IResponseBuilder WithHeaders(IDictionary<string, string[]> headers) + 1160        { + 1161            Check.NotNull(headers, nameof(headers));162 + 3163            ResponseMessage.Headers = headers.ToDictionary(header => header.Key, header => new WireMockList<string>(head + 1164            return this; + 1165        }166167        /// <inheritdoc cref="IHeadersResponseBuilder.WithHeaders(IDictionary{string, WireMockList{string}})"/>168        public IResponseBuilder WithHeaders(IDictionary<string, WireMockList<string>> headers) + 1169        { + 1170            ResponseMessage.Headers = headers; + 1171            return this; + 1172        }  173 - 4174            return WithCallback(req => new ResponseMessage - 4175            { - 4176                Body = bodyFactory(req), - 4177                BodyDestination = destination, - 4178                BodyEncoding = encoding ?? Encoding.UTF8 - 4179            }); - 2180        }181182        /// <inheritdoc cref="IBodyResponseBuilder.WithBody(byte[], string, Encoding)"/>183        public IResponseBuilder WithBody(byte[] body, string destination = BodyDestinationFormat.SameAsSource, Encoding  - 3184        { - 3185            Check.NotNull(body, nameof(body));174        /// <inheritdoc cref="IBodyResponseBuilder.WithBody(Func{RequestMessage, string}, string, Encoding)"/>175        public IResponseBuilder WithBody(Func<RequestMessage, string> bodyFactory, string destination = BodyDestinationF + 1176        { + 1177            Check.NotNull(bodyFactory, nameof(bodyFactory));178 + 2179            return WithCallbackInternal(false, req => new ResponseMessage + 2180            { + 2181                Body = bodyFactory(req), + 2182                BodyDestination = destination, + 2183                BodyEncoding = encoding ?? Encoding.UTF8 + 2184            }); + 1185        }  186 - 3187            ResponseMessage.BodyDestination = destination;188 - 3189            switch (destination)190            {191                case BodyDestinationFormat.String: - 1192                    var enc = encoding ?? Encoding.UTF8; - 1193                    ResponseMessage.BodyAsBytes = null; - 1194                    ResponseMessage.Body = enc.GetString(body); - 1195                    ResponseMessage.BodyEncoding = enc; - 1196                    break;197198                default: - 2199                    ResponseMessage.BodyAsBytes = body; - 2200                    ResponseMessage.BodyEncoding = null; - 2201                    break;202            }203 - 3204            return this; - 3205        }206207        /// <inheritdoc cref="IBodyResponseBuilder.WithBodyFromFile"/>208        public IResponseBuilder WithBodyFromFile(string filename, bool cache = true) - 3209        { - 3210            Check.NotNull(filename, nameof(filename));187        /// <inheritdoc cref="IBodyResponseBuilder.WithBody(byte[], string, Encoding)"/>188        public IResponseBuilder WithBody(byte[] body, string destination = BodyDestinationFormat.SameAsSource, Encoding  + 2189        { + 2190            Check.NotNull(body, nameof(body));191 + 2192            ResponseMessage.BodyDestination = destination;193 + 2194            switch (destination)195            {196                case BodyDestinationFormat.String: + 1197                    var enc = encoding ?? Encoding.UTF8; + 1198                    ResponseMessage.BodyAsBytes = null; + 1199                    ResponseMessage.Body = enc.GetString(body); + 1200                    ResponseMessage.BodyEncoding = enc; + 1201                    break;202203                default: + 1204                    ResponseMessage.BodyAsBytes = body; + 1205                    ResponseMessage.BodyEncoding = null; + 1206                    break;207            }208 + 2209            return this; + 2210        }  211 - 3212            ResponseMessage.BodyEncoding = null; - 3213            ResponseMessage.BodyAsFileIsCached = cache;214 - 3215            if (cache) - 3216            { - 3217                ResponseMessage.Body = null; - 3218                ResponseMessage.BodyAsBytes = File.ReadAllBytes(filename); - 3219                ResponseMessage.BodyAsFile = null; - 3220            }221            else - 0222            { - 0223                ResponseMessage.Body = null; - 0224                ResponseMessage.BodyAsBytes = null; - 0225                ResponseMessage.BodyAsFile = filename; - 0226            }227 - 3228            return this; - 3229        }230231        /// <inheritdoc cref="IBodyResponseBuilder.WithBody(string, string, Encoding)"/>232        public IResponseBuilder WithBody(string body, string destination = BodyDestinationFormat.SameAsSource, Encoding  - 57233        { - 57234            Check.NotNull(body, nameof(body));212        /// <inheritdoc cref="IBodyResponseBuilder.WithBodyFromFile"/>213        public IResponseBuilder WithBodyFromFile(string filename, bool cache = true) + 3214        { + 3215            Check.NotNull(filename, nameof(filename));216 + 3217            ResponseMessage.BodyEncoding = null; + 3218            ResponseMessage.BodyAsFileIsCached = cache;219 + 3220            if (cache) + 3221            { + 3222                ResponseMessage.Body = null; + 3223                ResponseMessage.BodyAsBytes = File.ReadAllBytes(filename); + 3224                ResponseMessage.BodyAsFile = null; + 3225            }226            else + 0227            { + 0228                ResponseMessage.Body = null; + 0229                ResponseMessage.BodyAsBytes = null; + 0230                ResponseMessage.BodyAsFile = filename; + 0231            }232 + 3233            return this; + 3234        }  235 - 57236            encoding = encoding ?? Encoding.UTF8;237 - 57238            ResponseMessage.BodyDestination = destination; - 57239            ResponseMessage.BodyEncoding = encoding;236        /// <inheritdoc cref="IBodyResponseBuilder.WithBody(string, string, Encoding)"/>237        public IResponseBuilder WithBody(string body, string destination = BodyDestinationFormat.SameAsSource, Encoding  + 47238        { + 47239            Check.NotNull(body, nameof(body));  240 - 57241            switch (destination)242            {243                case BodyDestinationFormat.Bytes: - 1244                    ResponseMessage.Body = null; - 1245                    ResponseMessage.BodyAsJson = null; - 1246                    ResponseMessage.BodyAsBytes = encoding.GetBytes(body); - 1247                    break;248249                case BodyDestinationFormat.Json: - 1250                    ResponseMessage.Body = null; - 1251                    ResponseMessage.BodyAsJson = JsonConvert.DeserializeObject(body); - 1252                    ResponseMessage.BodyAsBytes = null; - 1253                    break;254255                default: - 55256                    ResponseMessage.Body = body; - 55257                    ResponseMessage.BodyAsJson = null; - 55258                    ResponseMessage.BodyAsBytes = null; - 55259                    break;260            }261 - 57262            return this; - 57263        }264265        /// <inheritdoc cref="IBodyResponseBuilder.WithBodyAsJson(object, Encoding, bool?)"/>266        public IResponseBuilder WithBodyAsJson(object body, Encoding encoding = null, bool? indented = null) - 17267        { - 17268            Check.NotNull(body, nameof(body)); + 47241            encoding = encoding ?? Encoding.UTF8;242 + 47243            ResponseMessage.BodyDestination = destination; + 47244            ResponseMessage.BodyEncoding = encoding;245 + 47246            switch (destination)247            {248                case BodyDestinationFormat.Bytes: + 1249                    ResponseMessage.Body = null; + 1250                    ResponseMessage.BodyAsJson = null; + 1251                    ResponseMessage.BodyAsBytes = encoding.GetBytes(body); + 1252                    break;253254                case BodyDestinationFormat.Json: + 1255                    ResponseMessage.Body = null; + 1256                    ResponseMessage.BodyAsJson = JsonConvert.DeserializeObject(body); + 1257                    ResponseMessage.BodyAsBytes = null; + 1258                    break;259260                default: + 45261                    ResponseMessage.Body = body; + 45262                    ResponseMessage.BodyAsJson = null; + 45263                    ResponseMessage.BodyAsBytes = null; + 45264                    break;265            }266 + 47267            return this; + 47268        }  269 - 17270            ResponseMessage.BodyDestination = null; - 17271            ResponseMessage.BodyAsJson = body; - 17272            ResponseMessage.BodyEncoding = encoding; - 17273            ResponseMessage.BodyAsJsonIndented = indented;270        /// <inheritdoc cref="IBodyResponseBuilder.WithBodyAsJson(object, Encoding, bool?)"/>271        public IResponseBuilder WithBodyAsJson(object body, Encoding encoding = null, bool? indented = null) + 16272        { + 16273            Check.NotNull(body, nameof(body));  274 - 17275            return this; - 17276        }277278        /// <inheritdoc cref="IBodyResponseBuilder.WithBodyAsJson(object, bool)"/>279        public IResponseBuilder WithBodyAsJson(object body, bool indented) - 1280        { - 1281            return WithBodyAsJson(body, null, indented); - 1282        }283284        /// <inheritdoc cref="IBodyResponseBuilder.WithBodyFromBase64"/>285        public IResponseBuilder WithBodyFromBase64(string bodyAsbase64, Encoding encoding = null) - 1286        { - 1287            Check.NotNull(bodyAsbase64, nameof(bodyAsbase64)); + 16275            ResponseMessage.BodyDestination = null; + 16276            ResponseMessage.BodyAsJson = body; + 16277            ResponseMessage.BodyEncoding = encoding; + 16278            ResponseMessage.BodyAsJsonIndented = indented;279 + 16280            return this; + 16281        }282283        /// <inheritdoc cref="IBodyResponseBuilder.WithBodyAsJson(object, bool)"/>284        public IResponseBuilder WithBodyAsJson(object body, bool indented) + 1285        { + 1286            return WithBodyAsJson(body, null, indented); + 1287        }  288 - 1289            encoding = encoding ?? Encoding.UTF8;290 - 1291            ResponseMessage.BodyDestination = null; - 1292            ResponseMessage.Body = encoding.GetString(Convert.FromBase64String(bodyAsbase64)); - 1293            ResponseMessage.BodyEncoding = encoding;294 - 1295            return this; - 1296        }297298        /// <inheritdoc cref="ITransformResponseBuilder.WithTransformer"/>299        public IResponseBuilder WithTransformer() - 32300        { - 32301            UseTransformer = true; - 32302            return this; - 32303        }304305        /// <inheritdoc cref="IDelayResponseBuilder.WithDelay(TimeSpan)"/>306        public IResponseBuilder WithDelay(TimeSpan delay) - 1307        { - 2308            Check.Condition(delay, d => d > TimeSpan.Zero, nameof(delay));289        /// <inheritdoc cref="IBodyResponseBuilder.WithBodyFromBase64"/>290        public IResponseBuilder WithBodyFromBase64(string bodyAsbase64, Encoding encoding = null) + 1291        { + 1292            Check.NotNull(bodyAsbase64, nameof(bodyAsbase64));293 + 1294            encoding = encoding ?? Encoding.UTF8;295 + 1296            ResponseMessage.BodyDestination = null; + 1297            ResponseMessage.Body = encoding.GetString(Convert.FromBase64String(bodyAsbase64)); + 1298            ResponseMessage.BodyEncoding = encoding;299 + 1300            return this; + 1301        }302303        /// <inheritdoc cref="ITransformResponseBuilder.WithTransformer"/>304        public IResponseBuilder WithTransformer() + 32305        { + 32306            UseTransformer = true; + 32307            return this; + 32308        }  309 - 1310            Delay = delay; - 1311            return this; - 1312        }313314        /// <inheritdoc cref="IDelayResponseBuilder.WithDelay(int)"/>315        public IResponseBuilder WithDelay(int milliseconds) - 0316        { - 0317            return WithDelay(TimeSpan.FromMilliseconds(milliseconds)); - 0318        }319320        /// <inheritdoc cref="IProxyResponseBuilder.WithProxy(string, string)"/>321        public IResponseBuilder WithProxy(string proxyUrl, string clientX509Certificate2ThumbprintOrSubjectName = null) - 0322        { - 0323            Check.NotNullOrEmpty(proxyUrl, nameof(proxyUrl));310        /// <inheritdoc cref="IDelayResponseBuilder.WithDelay(TimeSpan)"/>311        public IResponseBuilder WithDelay(TimeSpan delay) + 1312        { + 2313            Check.Condition(delay, d => d > TimeSpan.Zero, nameof(delay));314 + 1315            Delay = delay; + 1316            return this; + 1317        }318319        /// <inheritdoc cref="IDelayResponseBuilder.WithDelay(int)"/>320        public IResponseBuilder WithDelay(int milliseconds) + 0321        { + 0322            return WithDelay(TimeSpan.FromMilliseconds(milliseconds)); + 0323        }  324 - 0325            ProxyUrl = proxyUrl; - 0326            ClientX509Certificate2ThumbprintOrSubjectName = clientX509Certificate2ThumbprintOrSubjectName; - 0327            _httpClientForProxy = HttpClientHelper.CreateHttpClient(clientX509Certificate2ThumbprintOrSubjectName); - 0328            return this; - 0329        }330331        /// <inheritdoc cref="IProxyResponseBuilder.WithProxy(IProxyAndRecordSettings)"/>332        public IResponseBuilder WithProxy(IProxyAndRecordSettings settings) - 0333        { - 0334            Check.NotNull(settings, nameof(settings));325        /// <inheritdoc cref="IProxyResponseBuilder.WithProxy(string, string)"/>326        public IResponseBuilder WithProxy(string proxyUrl, string clientX509Certificate2ThumbprintOrSubjectName = null) + 0327        { + 0328            Check.NotNullOrEmpty(proxyUrl, nameof(proxyUrl));329 + 0330            ProxyUrl = proxyUrl; + 0331            ClientX509Certificate2ThumbprintOrSubjectName = clientX509Certificate2ThumbprintOrSubjectName; + 0332            _httpClientForProxy = HttpClientHelper.CreateHttpClient(clientX509Certificate2ThumbprintOrSubjectName); + 0333            return this; + 0334        }  335 - 0336            return WithProxy(settings.Url, settings.ClientX509Certificate2ThumbprintOrSubjectName); - 0337        }338339        /// <inheritdoc cref="ICallbackResponseBuilder.WithCallback"/>340        public IResponseBuilder WithCallback(Func<RequestMessage, ResponseMessage> callbackHandler) - 3341        { - 3342            Check.NotNull(callbackHandler, nameof(callbackHandler));336        /// <inheritdoc cref="IProxyResponseBuilder.WithProxy(IProxyAndRecordSettings)"/>337        public IResponseBuilder WithProxy(IProxyAndRecordSettings settings) + 0338        { + 0339            Check.NotNull(settings, nameof(settings));340 + 0341            return WithProxy(settings.Url, settings.ClientX509Certificate2ThumbprintOrSubjectName); + 0342        }  343 - 3344            Callback = callbackHandler;345 - 3346            return this; - 3347        }344        /// <inheritdoc cref="ICallbackResponseBuilder.WithCallback"/>345        public IResponseBuilder WithCallback(Func<RequestMessage, ResponseMessage> callbackHandler) + 1346        { + 1347            Check.NotNull(callbackHandler, nameof(callbackHandler));  348349        /// <summary>350        /// The provide response.351        /// </summary>352        /// <param name="requestMessage">The request.</param>353        /// <returns>The <see cref="ResponseMessage"/>.</returns>354        public async Task<ResponseMessage> ProvideResponseAsync(RequestMessage requestMessage) - 90355        { - 90356            Check.NotNull(requestMessage, nameof(requestMessage));357 - 90358            if (Delay != null) - 1359            { - 1360                await Task.Delay(Delay.Value); - 1361            } + 1349            return WithCallbackInternal(true, callbackHandler); + 1350        }351352        /// <inheritdoc cref="ICallbackResponseBuilder.WithCallback"/>353        private IResponseBuilder WithCallbackInternal(bool withCallbackUsed, Func<RequestMessage, ResponseMessage> callb + 2354        { + 2355            Check.NotNull(callbackHandler, nameof(callbackHandler));356 + 2357            WithCallbackUsed = withCallbackUsed; + 2358            Callback = callbackHandler;359 + 2360            return this; + 2361        }  362 - 90363            if (Callback != null) - 3364            { - 3365                var callbackResponseMessage = Callback(requestMessage);366367                // Copy StatusCode from ResponseMessage - 3368                callbackResponseMessage.StatusCode = ResponseMessage.StatusCode;369370                // Copy Headers from ResponseMessage (if defined) - 3371                if (ResponseMessage.Headers != null) - 3372                { - 3373                    callbackResponseMessage.Headers = ResponseMessage.Headers; - 3374                }375 - 3376                return callbackResponseMessage;377            }378 - 87379            if (ProxyUrl != null && _httpClientForProxy != null) - 0380            { - 0381                var requestUri = new Uri(requestMessage.Url); - 0382                var proxyUri = new Uri(ProxyUrl); - 0383                var proxyUriWithRequestPathAndQuery = new Uri(proxyUri, requestUri.PathAndQuery);384 - 0385                return await HttpClientHelper.SendAsync(_httpClientForProxy, requestMessage, proxyUriWithRequestPathAndQ386            }387 - 87388            if (UseTransformer) - 32389            { - 32390                return ResponseMessageTransformer.Transform(requestMessage, ResponseMessage);391            }363        /// <summary>364        /// The provide response.365        /// </summary>366        /// <param name="requestMessage">The request.</param>367        /// <returns>The <see cref="ResponseMessage"/>.</returns>368        public async Task<ResponseMessage> ProvideResponseAsync(RequestMessage requestMessage) + 76369        { + 76370            Check.NotNull(requestMessage, nameof(requestMessage));371 + 76372            if (Delay != null) + 1373            { + 1374                await Task.Delay(Delay.Value); + 1375            }376 + 76377            if (Callback != null) + 2378            { + 2379                var callbackResponseMessage = Callback(requestMessage);380 + 2381                if (!WithCallbackUsed) + 1382                {383                    // Copy StatusCode from ResponseMessage + 1384                    callbackResponseMessage.StatusCode = ResponseMessage.StatusCode;385386                    // Copy Headers from ResponseMessage (if defined) + 1387                    if (ResponseMessage.Headers != null) + 1388                    { + 1389                        callbackResponseMessage.Headers = ResponseMessage.Headers; + 1390                    } + 1391                }  392393            // Just return normal defined ResponseMessage - 55394            return ResponseMessage; - 85395        }396    }397} + 2393                return callbackResponseMessage;394            }395 + 74396            if (ProxyUrl != null && _httpClientForProxy != null) + 0397            { + 0398                var requestUri = new Uri(requestMessage.Url); + 0399                var proxyUri = new Uri(ProxyUrl); + 0400                var proxyUriWithRequestPathAndQuery = new Uri(proxyUri, requestUri.PathAndQuery);401 + 0402                return await HttpClientHelper.SendAsync(_httpClientForProxy, requestMessage, proxyUriWithRequestPathAndQ403            }404 + 74405            if (UseTransformer) + 32406            { + 32407                return ResponseMessageTransformer.Transform(requestMessage, ResponseMessage);408            }409410            // Just return normal defined ResponseMessage + 42411            return ResponseMessage; + 71412        }413    }414} -

+

Methods/Properties

@@ -470,31 +488,33 @@

Methods/Properties

ClientX509Certificate2ThumbprintOrSubjectName()
ResponseMessage()
Callback()
-Create(WireMock.ResponseMessage)
-Create(System.Func`1<WireMock.ResponseMessage>)
-.ctor(WireMock.ResponseMessage)
-WithStatusCode(System.Int32)
-WithStatusCode(System.Net.HttpStatusCode)
-WithSuccess()
-WithNotFound()
-WithHeader(System.String,System.String[])
-WithHeaders(System.Collections.Generic.IDictionary`2<System.String,System.String>)
-WithHeaders(System.Collections.Generic.IDictionary`2<System.String,System.String[]>)
-WithHeaders(System.Collections.Generic.IDictionary`2<System.String,WireMock.Util.WireMockList`1<System.String>>)
-WithBody(System.Func`2<WireMock.RequestMessage,System.String>,System.String,System.Text.Encoding)
-WithBody(System.Byte[],System.String,System.Text.Encoding)
-WithBodyFromFile(System.String,System.Boolean)
-WithBody(System.String,System.String,System.Text.Encoding)
-WithBodyAsJson(System.Object,System.Text.Encoding,System.Nullable`1<System.Boolean>)
-WithBodyAsJson(System.Object,System.Boolean)
-WithBodyFromBase64(System.String,System.Text.Encoding)
-WithTransformer()
-WithDelay(System.TimeSpan)
-WithDelay(System.Int32)
-WithProxy(System.String,System.String)
-WithProxy(WireMock.Settings.IProxyAndRecordSettings)
-WithCallback(System.Func`2<WireMock.RequestMessage,WireMock.ResponseMessage>)
-ProvideResponseAsync()
+WithCallbackUsed()
+Create(WireMock.ResponseMessage)
+Create(System.Func`1<WireMock.ResponseMessage>)
+.ctor(WireMock.ResponseMessage)
+WithStatusCode(System.Int32)
+WithStatusCode(System.Net.HttpStatusCode)
+WithSuccess()
+WithNotFound()
+WithHeader(System.String,System.String[])
+WithHeaders(System.Collections.Generic.IDictionary`2<System.String,System.String>)
+WithHeaders(System.Collections.Generic.IDictionary`2<System.String,System.String[]>)
+WithHeaders(System.Collections.Generic.IDictionary`2<System.String,WireMock.Util.WireMockList`1<System.String>>)
+WithBody(System.Func`2<WireMock.RequestMessage,System.String>,System.String,System.Text.Encoding)
+WithBody(System.Byte[],System.String,System.Text.Encoding)
+WithBodyFromFile(System.String,System.Boolean)
+WithBody(System.String,System.String,System.Text.Encoding)
+WithBodyAsJson(System.Object,System.Text.Encoding,System.Nullable`1<System.Boolean>)
+WithBodyAsJson(System.Object,System.Boolean)
+WithBodyFromBase64(System.String,System.Text.Encoding)
+WithTransformer()
+WithDelay(System.TimeSpan)
+WithDelay(System.Int32)
+WithProxy(System.String,System.String)
+WithProxy(WireMock.Settings.IProxyAndRecordSettings)
+WithCallback(System.Func`2<WireMock.RequestMessage,WireMock.ResponseMessage>)
+WithCallbackInternal(System.Boolean,System.Func`2<WireMock.RequestMessage,WireMock.ResponseMessage>)
+ProvideResponseAsync()

diff --git a/report/coverlet/WireMock.Net_ResponseMessage.htm b/report/coverlet/WireMock.Net_ResponseMessage.htm index b3d5b9761..6fcb45c5e 100644 --- a/report/coverlet/WireMock.Net_ResponseMessage.htm +++ b/report/coverlet/WireMock.Net_ResponseMessage.htm @@ -54,57 +54,57 @@

 14        /// <summary>  15        /// Gets the headers.  16        /// </summary> - 60117        public IDictionary<string, WireMockList<string>> Headers { get; set; } = new Dictionary<string, WireMockList<str + 56417        public IDictionary<string, WireMockList<string>> Headers { get; set; } = new Dictionary<string, WireMockList<str  18  19        /// <summary>  20        /// Gets or sets the status code.  21        /// </summary> - 51222        public int StatusCode { get; set; } = 200; + 46522        public int StatusCode { get; set; } = 200;  23  24        /// <summary>  25        /// Gets or sets the body.  26        /// </summary> - 8827        public string BodyOriginal { get; set; } + 7327        public string BodyOriginal { get; set; }  28  29        /// <summary>  30        /// Gets or sets the body destination (SameAsSource, String or Bytes).  31        /// </summary> - 15132        public string BodyDestination { get; set; } + 12332        public string BodyDestination { get; set; }  33  34        /// <summary>  35        /// Gets or sets the body as a string.  36        /// </summary> - 29437        public string Body { get; set; } + 25137        public string Body { get; set; }  38  39        /// <summary>  40        /// Gets or sets the body as a json object.  41        /// </summary> - 32742        public object BodyAsJson { get; set; } + 29042        public object BodyAsJson { get; set; }  43  44        /// <summary>  45        /// Gets or sets a value indicating whether child objects to be indented according to the Newtonsoft.Json.JsonTe  46        /// </summary> - 3847        public bool? BodyAsJsonIndented { get; set; } + 3547        public bool? BodyAsJsonIndented { get; set; }  48  49        /// <summary>  50        /// Gets or sets the body as bytes.  51        /// </summary> - 20752        public byte[] BodyAsBytes { get; set; } + 16852        public byte[] BodyAsBytes { get; set; }  53  54        /// <summary>  55        /// Gets or sets the body as a file.  56        /// </summary> - 13757        public string BodyAsFile { get; set; } + 11057        public string BodyAsFile { get; set; }  58  59        /// <summary>  60        /// Is the body as file cached?  61        /// </summary> - 7462        public bool? BodyAsFileIsCached { get; set; } + 5962        public bool? BodyAsFileIsCached { get; set; }  63  64        /// <summary>  65        /// Gets or sets the body encoding.  66        /// </summary> - 56667        public Encoding BodyEncoding { get; set; } = new UTF8Encoding(false); + 48367        public Encoding BodyEncoding { get; set; } = new UTF8Encoding(false);  68  69        /// <summary>  70        /// Adds the header. @@ -122,20 +122,20 @@

 82        /// <param name="name">The name.</param>  83        /// <param name="values">The values.</param>  84        public void AddHeader(string name, params string[] values) - 10385        { - 10386            Check.NotNullOrEmpty(values, nameof(values)); + 10285        { + 10286            Check.NotNullOrEmpty(values, nameof(values));  87 - 10388            var newHeaderValues = Headers.TryGetValue(name, out WireMockList<string> existingValues) - 10389                ? values.Union(existingValues).ToArray() - 10390                : values; + 10288            var newHeaderValues = Headers.TryGetValue(name, out WireMockList<string> existingValues) + 10289                ? values.Union(existingValues).ToArray() + 10290                : values;  91 - 10392            Headers[name] = new WireMockList<string>(newHeaderValues); - 10393        } + 10292            Headers[name] = new WireMockList<string>(newHeaderValues); + 10293        }  94    }  95} - +

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_ResponseMessageBuilder.htm b/report/coverlet/WireMock.Net_ResponseMessageBuilder.htm index 9743c4368..96ba14ac8 100644 --- a/report/coverlet/WireMock.Net_ResponseMessageBuilder.htm +++ b/report/coverlet/WireMock.Net_ResponseMessageBuilder.htm @@ -22,14 +22,14 @@

Summary

Coverable lines:11 Total lines:26 Line coverage:100% -Branch coverage:50% +Branch coverage:100%

Metrics

- +
MethodCyclomatic complexity NPath complexity Sequence coverage Branch coverage
Create(...)0010.5
Create(...)0011
.cctor()0010
@@ -52,21 +52,21 @@

 112        private static readonly IDictionary<string, WireMockList<string>> ContentTypeJsonHeaders = new Dictionary<string  13  14        internal static ResponseMessage Create(string message, int statusCode = 200, Guid? guid = null) - 1715        { - 1716            var response = new ResponseMessage - 1717            { - 1718                StatusCode = statusCode, - 1719                Headers = ContentTypeJsonHeaders, - 1720                BodyAsJson = message != null ? new StatusModel { Status = message, Guid = guid } : null - 1721            }; + 1815        { + 1816            var response = new ResponseMessage + 1817            { + 1818                StatusCode = statusCode, + 1819                Headers = ContentTypeJsonHeaders, + 1820                BodyAsJson = message != null ? new StatusModel { Status = message, Guid = guid } : null + 1821            };  22 - 1723            return response; - 1724        } + 1823            return response; + 1824        }  25    }  26} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_ResponseMessageTransformer.htm b/report/coverlet/WireMock.Net_ResponseMessageTransformer.htm index 114b9c8b8..33357e6d3 100644 --- a/report/coverlet/WireMock.Net_ResponseMessageTransformer.htm +++ b/report/coverlet/WireMock.Net_ResponseMessageTransformer.htm @@ -178,7 +178,7 @@

 135} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_ResponseModel.htm b/report/coverlet/WireMock.Net_ResponseModel.htm index dac106d50..f77599432 100644 --- a/report/coverlet/WireMock.Net_ResponseModel.htm +++ b/report/coverlet/WireMock.Net_ResponseModel.htm @@ -121,7 +121,7 @@

 90} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_ScenarioState.htm b/report/coverlet/WireMock.Net_ScenarioState.htm index b6fb7b98c..305d5fef0 100644 --- a/report/coverlet/WireMock.Net_ScenarioState.htm +++ b/report/coverlet/WireMock.Net_ScenarioState.htm @@ -59,7 +59,7 @@

 28} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_ScenarioStateModel.htm b/report/coverlet/WireMock.Net_ScenarioStateModel.htm index cae6322cc..b25b404a9 100644 --- a/report/coverlet/WireMock.Net_ScenarioStateModel.htm +++ b/report/coverlet/WireMock.Net_ScenarioStateModel.htm @@ -59,7 +59,7 @@

 28} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_SettingsModel.htm b/report/coverlet/WireMock.Net_SettingsModel.htm index 974023692..efebfaa4e 100644 --- a/report/coverlet/WireMock.Net_SettingsModel.htm +++ b/report/coverlet/WireMock.Net_SettingsModel.htm @@ -59,7 +59,7 @@

 28} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_SimMetricsMatcher.htm b/report/coverlet/WireMock.Net_SimMetricsMatcher.htm index f7c5ade40..bdbff799a 100644 --- a/report/coverlet/WireMock.Net_SimMetricsMatcher.htm +++ b/report/coverlet/WireMock.Net_SimMetricsMatcher.htm @@ -170,7 +170,7 @@

 125} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_StatusModel.htm b/report/coverlet/WireMock.Net_StatusModel.htm index 8b7e68cf9..e0379996c 100644 --- a/report/coverlet/WireMock.Net_StatusModel.htm +++ b/report/coverlet/WireMock.Net_StatusModel.htm @@ -41,17 +41,17 @@

 10        /// <summary>  11        /// The optional guid.  12        /// </summary> - 4013        public Guid? Guid { get; set; } + 3613        public Guid? Guid { get; set; }  14  15        /// <summary>  16        /// The status (can also contain the error message).  17        /// </summary> - 4418        public string Status { get; set; } + 4118        public string Status { get; set; }  19    }  20} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_UrlDetails.htm b/report/coverlet/WireMock.Net_UrlDetails.htm index 1d626f044..81e2cf4c6 100644 --- a/report/coverlet/WireMock.Net_UrlDetails.htm +++ b/report/coverlet/WireMock.Net_UrlDetails.htm @@ -51,47 +51,47 @@

 11        /// <summary>  12        /// Gets the url (relative).  13        /// </summary> - 125114        public Uri Url { get; } + 120314        public Uri Url { get; }  15  16        /// <summary>  17        /// Gets the AbsoluteUrl.  18        /// </summary> - 41919        public Uri AbsoluteUrl { get; } + 40319        public Uri AbsoluteUrl { get; }  20  21        /// <summary>  22        /// Initializes a new instance of the <see cref="UrlDetails"/> class.  23        /// </summary>  24        /// <param name="url">The URL.</param> - 14125        public UrlDetails(string url) : this(new Uri(url)) - 14126        { - 14127        } + 15225        public UrlDetails(string url) : this(new Uri(url)) + 15226        { + 15227        }  28  29        /// <summary>  30        /// Initializes a new instance of the <see cref="UrlDetails"/> class.  31        /// </summary>  32        /// <param name="url">The URL.</param> - 14133        public UrlDetails(Uri url) : this(url, url) - 14134        { - 14135        } + 15233        public UrlDetails(Uri url) : this(url, url) + 15234        { + 15235        }  36  37        /// <summary>  38        /// Initializes a new instance of the <see cref="UrlDetails"/> class.  39        /// </summary>  40        /// <param name="absoluteUrl">The absolute URL.</param>  41        /// <param name="url">The URL (relative).</param> - 21142        public UrlDetails(Uri absoluteUrl, Uri url) - 21143        { - 21144            Check.NotNull(absoluteUrl, nameof(absoluteUrl)); - 21145            Check.NotNull(url, nameof(url)); + 20342        public UrlDetails(Uri absoluteUrl, Uri url) + 20343        { + 20344            Check.NotNull(absoluteUrl, nameof(absoluteUrl)); + 20345            Check.NotNull(url, nameof(url));  46 - 21147            AbsoluteUrl = absoluteUrl; - 21148            Url = url; - 21149        } + 20347            AbsoluteUrl = absoluteUrl; + 20348            Url = url; + 20349        }  50    }  51} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_UrlModel.htm b/report/coverlet/WireMock.Net_UrlModel.htm index c8b152720..8a51dbdd1 100644 --- a/report/coverlet/WireMock.Net_UrlModel.htm +++ b/report/coverlet/WireMock.Net_UrlModel.htm @@ -44,7 +44,7 @@

 13} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_UrlUtils.htm b/report/coverlet/WireMock.Net_UrlUtils.htm index 53375d87c..4974d65e5 100644 --- a/report/coverlet/WireMock.Net_UrlUtils.htm +++ b/report/coverlet/WireMock.Net_UrlUtils.htm @@ -52,17 +52,17 @@

C  12    internal static class UrlUtils  13    {  14        public static UrlDetails Parse([NotNull] Uri uri, PathString pathBase) - 7015        { - 7016            if (!pathBase.HasValue) - 6617            { - 6618                return new UrlDetails(uri, uri); + 5115        { + 5116            if (!pathBase.HasValue) + 4717            { + 4718                return new UrlDetails(uri, uri);  19            }  20  421            var builder = new UriBuilder(uri);  422            builder.Path = RemoveFirst(builder.Path, pathBase.Value);  23  424            return new UrlDetails(uri, builder.Uri); - 7025        } + 5125        }  26  27        private static string RemoveFirst(string text, string search)  428        { @@ -78,7 +78,7 @@

C  38} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_WildcardMatcher.htm b/report/coverlet/WireMock.Net_WildcardMatcher.htm index 893171ff8..436ef7cd3 100644 --- a/report/coverlet/WireMock.Net_WildcardMatcher.htm +++ b/report/coverlet/WireMock.Net_WildcardMatcher.htm @@ -60,9 +60,9 @@

 17        /// </summary>  18        /// <param name="pattern">The pattern.</param>  19        /// <param name="ignoreCase">IgnoreCase</param> - 3120        public WildcardMatcher([NotNull] string pattern, bool ignoreCase = false) : this(new[] { pattern }, ignoreCase) - 3121        { - 3122        } + 3020        public WildcardMatcher([NotNull] string pattern, bool ignoreCase = false) : this(new[] { pattern }, ignoreCase) + 3021        { + 3022        }  23  24        /// <summary>  25        /// Initializes a new instance of the <see cref="WildcardMatcher"/> class. @@ -70,18 +70,18 @@

 27        /// <param name="matchBehaviour">The match behaviour.</param>  28        /// <param name="pattern">The pattern.</param>  29        /// <param name="ignoreCase">IgnoreCase</param> - 27930        public WildcardMatcher(MatchBehaviour matchBehaviour, [NotNull] string pattern, bool ignoreCase = false) : this( - 27931        { - 27932        } + 26630        public WildcardMatcher(MatchBehaviour matchBehaviour, [NotNull] string pattern, bool ignoreCase = false) : this( + 26631        { + 26632        }  33  34        /// <summary>  35        /// Initializes a new instance of the <see cref="WildcardMatcher"/> class.  36        /// </summary>  37        /// <param name="patterns">The patterns.</param>  38        /// <param name="ignoreCase">IgnoreCase</param> - 3139        public WildcardMatcher([NotNull] string[] patterns, bool ignoreCase = false) : this(MatchBehaviour.AcceptOnMatch - 3140        { - 3141        } + 3039        public WildcardMatcher([NotNull] string[] patterns, bool ignoreCase = false) : this(MatchBehaviour.AcceptOnMatch + 3040        { + 3041        }  42  43        /// <summary>  44        /// Initializes a new instance of the <see cref="WildcardMatcher"/> class. @@ -89,10 +89,10 @@

 46        /// <param name="matchBehaviour">The match behaviour.</param>  47        /// <param name="patterns">The patterns.</param>  48        /// <param name="ignoreCase">IgnoreCase</param> - 63149        public WildcardMatcher(MatchBehaviour matchBehaviour, [NotNull] string[] patterns, bool ignoreCase = false) : ba - 31550        { - 31551            _patterns = patterns; - 31552        } + 60349        public WildcardMatcher(MatchBehaviour matchBehaviour, [NotNull] string[] patterns, bool ignoreCase = false) : ba + 30150        { + 30151            _patterns = patterns; + 30152        }  53  54        /// <inheritdoc cref="IStringMatcher.GetPatterns"/>  55        public override string[] GetPatterns() @@ -106,7 +106,7 @@

 63} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_WireMockConsoleLogger.htm b/report/coverlet/WireMock.Net_WireMockConsoleLogger.htm index ce0760a8a..320809aac 100644 --- a/report/coverlet/WireMock.Net_WireMockConsoleLogger.htm +++ b/report/coverlet/WireMock.Net_WireMockConsoleLogger.htm @@ -104,7 +104,7 @@

 59} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_WireMockList_1.htm b/report/coverlet/WireMock.Net_WireMockList_1.htm index 6a3eb639d..2b5000c36 100644 --- a/report/coverlet/WireMock.Net_WireMockList_1.htm +++ b/report/coverlet/WireMock.Net_WireMockList_1.htm @@ -63,9 +63,9 @@

 21        /// Initializes a new instance of the <see cref="WireMockList{T}"/> class.  22        /// </summary>  23        /// <param name="collection">The collection whose elements are copied to the new list.</param> - 24224        public WireMockList(params T[] collection) : base(collection) - 24225        { - 24226        } + 20624        public WireMockList(params T[] collection) : base(collection) + 20525        { + 20526        }  27  28        /// <summary>  29        /// Initializes a new instance of the <see cref="WireMockList{T}"/> class. @@ -86,7 +86,7 @@

 44} -

+

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_WireMockMiddleware.htm b/report/coverlet/WireMock.Net_WireMockMiddleware.htm index a30bbe0f3..3ec5da773 100644 --- a/report/coverlet/WireMock.Net_WireMockMiddleware.htm +++ b/report/coverlet/WireMock.Net_WireMockMiddleware.htm @@ -17,22 +17,23 @@

Summary

Class:WireMock.Owin.WireMockMiddleware Assembly:WireMock.Net File(s):C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Owin\WireMockMiddleware.cs -Covered lines:90 -Uncovered lines:34 -Coverable lines:124 -Total lines:194 -Line coverage:72.5% -Branch coverage:64.5% +Covered lines:101 +Uncovered lines:6 +Coverable lines:107 +Total lines:187 +Line coverage:94.3% +Branch coverage:86.3%

Metrics

- - + + + - +
MethodCyclomatic complexity NPath complexity Sequence coverage Branch coverage
LogRequest(...)000.5930.583
.ctor(...)0010
Invoke(...)0010
LogRequest(...)0011
.ctor(...)0010
.cctor()0010
Invoke()000.7560.676
InvokeInternal()000.9080.846

File(s)

@@ -41,209 +42,203 @@

 1using System;2using System.Collections.Generic;3using System.Threading.Tasks;4using WireMock.Logging;5using WireMock.Matchers.Request;6using System.Linq;7using WireMock.Matchers;8using WireMock.Util;9using Newtonsoft.Json;10using WireMock.Http;2using System.Threading.Tasks;3using WireMock.Logging;4using WireMock.Matchers.Request;5using System.Linq;6using WireMock.Matchers;7using WireMock.Util;8using Newtonsoft.Json;9using WireMock.Http;10using WireMock.Owin.Mappers;  11using WireMock.Serialization;12#if !USE_ASPNETCORE13using Microsoft.Owin;14#else15using Microsoft.AspNetCore.Http;16#endif1718namespace WireMock.Owin19{20#if !USE_ASPNETCORE21    internal class WireMockMiddleware : OwinMiddleware22#else23    internal class WireMockMiddleware24#endif25    { - 126        private static readonly Task CompletedTask = Task.FromResult(false);27        private readonly WireMockMiddlewareOptions _options;28 - 5529        private readonly OwinRequestMapper _requestMapper = new OwinRequestMapper(); - 5530        private readonly OwinResponseMapper _responseMapper = new OwinResponseMapper();3132#if !USE_ASPNETCORE33        public WireMockMiddleware(OwinMiddleware next, WireMockMiddlewareOptions options) : base(next)34        {35            _options = options;36        }37#else - 5538        public WireMockMiddleware(RequestDelegate next, WireMockMiddlewareOptions options) - 5539        { - 5540            _options = options; - 5541        }42#endif4344#if !USE_ASPNETCORE45        public override async Task Invoke(IOwinContext ctx)46#else47        public async Task Invoke(HttpContext ctx)48#endif - 6549        { - 6550            var request = await _requestMapper.MapAsync(ctx.Request);51 - 6552            bool logRequest = false; - 6553            ResponseMessage response = null; - 6554            Mapping targetMapping = null; - 6555            RequestMatchResult requestMatchResult = null;56            try - 6557            { - 55058                foreach (var mapping in _options.Mappings.Values.Where(m => m?.Scenario != null)) - 3059                {60                    // Set start - 3061                    if (!_options.Scenarios.ContainsKey(mapping.Scenario) && mapping.IsStartState) - 462                    { - 463                        _options.Scenarios.TryAdd(mapping.Scenario, new ScenarioState - 464                        { - 465                            Name = mapping.Scenario - 466                        }); - 467                    } - 3068                }12using WireMock.Validation;13#if !USE_ASPNETCORE14using Microsoft.Owin;15using IContext = Microsoft.Owin.IOwinContext;16using OwinMiddleware = Microsoft.Owin.OwinMiddleware;17using Next = Microsoft.Owin.OwinMiddleware;18#else19using OwinMiddleware = System.Object;20using IContext = Microsoft.AspNetCore.Http.HttpContext;21using Next = Microsoft.AspNetCore.Http.RequestDelegate;22#endif2324namespace WireMock.Owin25{26    internal class WireMockMiddleware : OwinMiddleware27    { + 128        private static readonly Task CompletedTask = Task.FromResult(false);29        private readonly IWireMockMiddlewareOptions _options;30        private readonly IOwinRequestMapper _requestMapper;31        private readonly IOwinResponseMapper _responseMapper;32        private readonly IMappingMatcher _mappingMatcher;3334#if !USE_ASPNETCORE35        public WireMockMiddleware(Next next, IWireMockMiddlewareOptions options, IOwinRequestMapper requestMapper, IOwin36        {37            Check.NotNull(options, nameof(options));38            Check.NotNull(requestMapper, nameof(requestMapper));39            Check.NotNull(responseMapper, nameof(responseMapper));40            Check.NotNull(mappingMatcher, nameof(mappingMatcher));4142            _options = options;43            _requestMapper = requestMapper;44            _responseMapper = responseMapper;45            _mappingMatcher = mappingMatcher;46        }47#else + 5148        public WireMockMiddleware(Next next, IWireMockMiddlewareOptions options, IOwinRequestMapper requestMapper, IOwin + 5149        { + 5150            Check.NotNull(options, nameof(options)); + 5151            Check.NotNull(requestMapper, nameof(requestMapper)); + 5152            Check.NotNull(responseMapper, nameof(responseMapper));53 + 5154            _options = options; + 5155            _requestMapper = requestMapper; + 5156            _responseMapper = responseMapper; + 5157            _mappingMatcher = mappingMatcher; + 5158        }59#endif6061#if !USE_ASPNETCORE62        public override Task Invoke(IContext ctx)63#else64        public Task Invoke(IContext ctx)65#endif + 5066        { + 5067            return InvokeInternal(ctx); + 5068        }  69 - 6570                var mappings = _options.Mappings.Values - 36071                    .Select(m => new - 36072                    { - 36073                        Mapping = m, - 36074                        MatchResult = m.GetRequestMatchResult(request, m.Scenario != null && _options.Scenarios.Contains - 36075                    }) - 6576                    .ToList();77 - 6578                if (_options.AllowPartialMapping) - 079                { - 080                    var partialMappings = mappings - 081                        .Where(pm => pm.Mapping.IsAdminInterface && pm.MatchResult.IsPerfectMatch || !pm.Mapping.IsAdmin - 082                        .OrderBy(m => m.MatchResult) - 083                        .ThenBy(m => m.Mapping.Priority) - 084                        .ToList();85 - 086                    var bestPartialMatch = partialMappings.FirstOrDefault(pm => pm.MatchResult.AverageTotalScore > 0.0);87 - 088                    targetMapping = bestPartialMatch?.Mapping; - 089                    requestMatchResult = bestPartialMatch?.MatchResult; - 090                }91                else - 6592                { - 6593                    var perfectMatch = mappings - 11794                        .OrderBy(m => m.Mapping.Priority) - 36095                        .FirstOrDefault(m => m.MatchResult.IsPerfectMatch);96 - 6597                    targetMapping = perfectMatch?.Mapping; - 6598                    requestMatchResult = perfectMatch?.MatchResult; - 6599                }100 - 65101                if (targetMapping == null) - 14102                { - 14103                    logRequest = true; - 14104                    _options.Logger.Warn("HttpStatusCode set to 404 : No matching mapping found"); - 14105                    response = ResponseMessageBuilder.Create("No matching mapping found", 404); - 14106                    return;107                }108 - 51109                logRequest = !targetMapping.IsAdminInterface;110 - 51111                if (targetMapping.IsAdminInterface && _options.AuthorizationMatcher != null) - 0112                { - 0113                    bool present = request.Headers.TryGetValue(HttpKnownHeaderNames.Authorization, out WireMockList<stri - 0114                    if (!present || _options.AuthorizationMatcher.IsMatch(authorization.ToString()) < MatchScores.Perfec - 0115                    { - 0116                        _options.Logger.Error("HttpStatusCode set to 401"); - 0117                        response = ResponseMessageBuilder.Create(null, 401); - 0118                        return;119                    } - 0120                }70        private async Task InvokeInternal(IContext ctx) + 5071        { + 5072            var request = await _requestMapper.MapAsync(ctx.Request);73 + 5074            bool logRequest = false; + 5075            ResponseMessage response = null; + 5076            (IMapping TargetMapping, RequestMatchResult RequestMatchResult) result = (null, null);77            try + 5078            { + 48979                foreach (var mapping in _options.Mappings.Values.Where(m => m?.Scenario != null)) + 3080                {81                    // Set start + 3082                    if (!_options.Scenarios.ContainsKey(mapping.Scenario) && mapping.IsStartState) + 483                    { + 484                        _options.Scenarios.TryAdd(mapping.Scenario, new ScenarioState + 485                        { + 486                            Name = mapping.Scenario + 487                        }); + 488                    } + 3089                }90 + 5091                result = _mappingMatcher.Match(request); + 5092                var targetMapping = result.TargetMapping;93 + 5094                if (targetMapping == null) + 1395                { + 1396                    logRequest = true; + 1397                    _options.Logger.Warn("HttpStatusCode set to 404 : No matching mapping found"); + 1398                    response = ResponseMessageBuilder.Create("No matching mapping found", 404); + 1399                    return;100                }101 + 37102                logRequest = !targetMapping.IsAdminInterface;103 + 37104                if (targetMapping.IsAdminInterface && _options.AuthorizationMatcher != null) + 2105                { + 2106                    bool present = request.Headers.TryGetValue(HttpKnownHeaderNames.Authorization, out WireMockList<stri + 2107                    if (!present || _options.AuthorizationMatcher.IsMatch(authorization.ToString()) < MatchScores.Perfec + 2108                    { + 2109                        _options.Logger.Error("HttpStatusCode set to 401"); + 2110                        response = ResponseMessageBuilder.Create(null, 401); + 2111                        return;112                    } + 0113                }114 + 35115                if (!targetMapping.IsAdminInterface && _options.RequestProcessingDelay > TimeSpan.Zero) + 1116                { + 1117                    await Task.Delay(_options.RequestProcessingDelay.Value); + 1118                }119 + 35120                response = await targetMapping.ResponseToAsync(request);  121 - 51122                if (!targetMapping.IsAdminInterface && _options.RequestProcessingDelay > TimeSpan.Zero) - 1123                { - 1124                    await Task.Delay(_options.RequestProcessingDelay.Value); - 1125                }126 - 51127                response = await targetMapping.ResponseToAsync(request);128 - 51129                if (targetMapping.Scenario != null) - 9130                { - 9131                    _options.Scenarios[targetMapping.Scenario].NextState = targetMapping.NextState; - 9132                    _options.Scenarios[targetMapping.Scenario].Started = true; - 9133                    _options.Scenarios[targetMapping.Scenario].Finished = targetMapping.NextState == null; - 9134                } - 51135            } - 0136            catch (Exception ex) - 0137            { - 0138                _options.Logger.Error("HttpStatusCode set to 500"); - 0139                response = ResponseMessageBuilder.Create(JsonConvert.SerializeObject(ex), 500); - 0140            }141            finally - 65142            { - 65143                var log = new LogEntry - 65144                { - 65145                    Guid = Guid.NewGuid(), - 65146                    RequestMessage = request, - 65147                    ResponseMessage = response, - 65148                    MappingGuid = targetMapping?.Guid, - 65149                    MappingTitle = targetMapping?.Title, - 65150                    RequestMatchResult = requestMatchResult - 65151                };152 - 65153                LogRequest(log, logRequest);154 - 65155                await _responseMapper.MapAsync(response, ctx.Response); - 65156            } + 35122                if (targetMapping.Scenario != null) + 9123                { + 9124                    _options.Scenarios[targetMapping.Scenario].NextState = targetMapping.NextState; + 9125                    _options.Scenarios[targetMapping.Scenario].Started = true; + 9126                    _options.Scenarios[targetMapping.Scenario].Finished = targetMapping.NextState == null; + 9127                } + 35128            } + 0129            catch (Exception ex) + 0130            { + 0131                _options.Logger.Error("HttpStatusCode set to 500"); + 0132                response = ResponseMessageBuilder.Create(JsonConvert.SerializeObject(ex), 500); + 0133            }134            finally + 50135            { + 50136                var log = new LogEntry + 50137                { + 50138                    Guid = Guid.NewGuid(), + 50139                    RequestMessage = request, + 50140                    ResponseMessage = response, + 50141                    MappingGuid = result.TargetMapping?.Guid, + 50142                    MappingTitle = result.TargetMapping?.Title, + 50143                    RequestMatchResult = result.RequestMatchResult + 50144                };145 + 50146                LogRequest(log, logRequest);147 + 50148                await _responseMapper.MapAsync(response, ctx.Response); + 50149            }150 + 35151            await CompletedTask; + 50152        }153154        private void LogRequest(LogEntry entry, bool addRequest) + 50155        { + 50156            _options.Logger.DebugRequestResponse(LogEntryMapper.Map(entry), entry.RequestMessage.Path.StartsWith("/__adm  157 - 51158            await CompletedTask; - 65159        }160161        private void LogRequest(LogEntry entry, bool addRequest) - 65162        { - 65163            _options.Logger.DebugRequestResponse(LogEntryMapper.Map(entry), entry.RequestMessage.Path.StartsWith("/__adm164 - 65165            if (addRequest) - 57166            { - 57167                _options.LogEntries.Add(entry); - 57168            }169 - 65170            if (_options.MaxRequestLogCount != null) - 3171            { - 3172                var amount = _options.LogEntries.Count - _options.MaxRequestLogCount.Value; - 8173                for (int i = 0; i < amount; i++) - 1174                { - 1175                    _options.LogEntries.RemoveAt(0); - 1176                } - 3177            }178 - 65179            if (_options.RequestLogExpirationDuration != null) - 0180            { - 0181                var checkTime = DateTime.Now.AddHours(-_options.RequestLogExpirationDuration.Value);182 - 0183                for (var i = _options.LogEntries.Count - 1; i >= 0; i--) - 0184                { - 0185                    var le = _options.LogEntries[i]; - 0186                    if (le.RequestMessage.DateTime <= checkTime) - 0187                    { - 0188                        _options.LogEntries.RemoveAt(i); - 0189                    } - 0190                } - 0191            } - 65192        }193    }194} + 50158            if (addRequest) + 40159            { + 40160                _options.LogEntries.Add(entry); + 40161            }162 + 50163            if (_options.MaxRequestLogCount != null) + 3164            { + 3165                var amount = _options.LogEntries.Count - _options.MaxRequestLogCount.Value; + 8166                for (int i = 0; i < amount; i++) + 1167                { + 1168                    _options.LogEntries.RemoveAt(0); + 1169                } + 3170            }171 + 50172            if (_options.RequestLogExpirationDuration != null) + 1173            { + 1174                var checkTime = DateTime.Now.AddHours(-_options.RequestLogExpirationDuration.Value);175 + 4176                for (var i = _options.LogEntries.Count - 1; i >= 0; i--) + 1177                { + 1178                    var le = _options.LogEntries[i]; + 1179                    if (le.RequestMessage.DateTime <= checkTime) + 1180                    { + 1181                        _options.LogEntries.RemoveAt(i); + 1182                    } + 1183                } + 1184            } + 50185        }186    }187} -

+
diff --git a/report/coverlet/WireMock.Net_WireMockMiddlewareOptions.htm b/report/coverlet/WireMock.Net_WireMockMiddlewareOptions.htm index 0b4b4d95a..8e81912f9 100644 --- a/report/coverlet/WireMock.Net_WireMockMiddlewareOptions.htm +++ b/report/coverlet/WireMock.Net_WireMockMiddlewareOptions.htm @@ -20,7 +20,7 @@

Summary

Covered lines:11 Uncovered lines:0 Coverable lines:11 -Total lines:45 +Total lines:39 Line coverage:100% @@ -38,45 +38,39 @@

 7#if !USE_ASPNETCORE  8using Owin;  9#else10using Microsoft.AspNetCore.Builder;10using IAppBuilder = Microsoft.AspNetCore.Builder.IApplicationBuilder;  11#endif  12  13namespace WireMock.Owin  14{15    internal class WireMockMiddlewareOptions15    internal class WireMockMiddlewareOptions : IWireMockMiddlewareOptions  16    { - 18917        public IWireMockLogger Logger { get; set; } + 15117        public IWireMockLogger Logger { get; set; }  18 - 4619        public TimeSpan? RequestProcessingDelay { get; set; } + 3019        public TimeSpan? RequestProcessingDelay { get; set; }  20  1821        public IStringMatcher AuthorizationMatcher { get; set; }  22 - 6623        public bool AllowPartialMapping { get; set; } + 4923        public bool AllowPartialMapping { get; set; }  24 - 75325        public ConcurrentDictionary<Guid, Mapping> Mappings { get; } = new ConcurrentDictionary<Guid, Mapping>(); + 66125        public ConcurrentDictionary<Guid, IMapping> Mappings { get; } = new ConcurrentDictionary<Guid, IMapping>();  26 - 18827        public ConcurrentDictionary<string, ScenarioState> Scenarios { get; } = new ConcurrentDictionary<string, Scenari + 18027        public ConcurrentDictionary<string, ScenarioState> Scenarios { get; } = new ConcurrentDictionary<string, Scenari  28 - 14029        public ObservableCollection<LogEntry> LogEntries { get; } = new ConcurentObservableCollection<LogEntry>(); + 10229        public ObservableCollection<LogEntry> LogEntries { get; } = new ConcurentObservableCollection<LogEntry>();  30 - 6831        public int? RequestLogExpirationDuration { get; set; } + 5131        public int? RequestLogExpirationDuration { get; set; }  32 - 7233        public int? MaxRequestLogCount { get; set; } + 5333        public int? MaxRequestLogCount { get; set; }  3435#if !USE_ASPNETCORE36        public Action<IAppBuilder> PreWireMockMiddlewareInit { get; set; }3738        public Action<IAppBuilder> PostWireMockMiddlewareInit { get; set; }39#else - 11040        public Action<IApplicationBuilder> PreWireMockMiddlewareInit { get; set; }41 - 11042        public Action<IApplicationBuilder> PostWireMockMiddlewareInit { get; set; }43#endif44    }45} + 9435        public Action<IAppBuilder> PreWireMockMiddlewareInit { get; set; }36 + 9437        public Action<IAppBuilder> PostWireMockMiddlewareInit { get; set; }38    }39} - + diff --git a/report/coverlet/WireMock.Net_WireMockNullLogger.htm b/report/coverlet/WireMock.Net_WireMockNullLogger.htm index c97f38643..60cb83276 100644 --- a/report/coverlet/WireMock.Net_WireMockNullLogger.htm +++ b/report/coverlet/WireMock.Net_WireMockNullLogger.htm @@ -52,21 +52,21 @@

 10    {  11        /// <see cref="IWireMockLogger.Debug"/>  12        public void Debug(string formatString, params object[] args) - 5413        { + 4413        {  14            // Log nothing - 5415        } + 4415        }  16  17        /// <see cref="IWireMockLogger.Info"/>  18        public void Info(string formatString, params object[] args) - 11519        { + 9519        {  20            // Log nothing - 11521        } + 9521        }  22  23        /// <see cref="IWireMockLogger.Warn"/>  24        public void Warn(string formatString, params object[] args) - 1425        { + 1125        {  26            // Log nothing - 1427        } + 1127        }  28  29        /// <see cref="IWireMockLogger.Error"/>  30        public void Error(string formatString, params object[] args) @@ -76,14 +76,14 @@

 34  35        /// <see cref="IWireMockLogger.DebugRequestResponse"/>  36        public void DebugRequestResponse(LogEntryModel logEntryModel, bool isAdminRequest) - 6537        { + 4637        {  38            // Log nothing - 6539        } + 4639        }  40    }  41} - +

Methods/Properties

diff --git a/report/coverlet/WireMock.Net_XPathMatcher.htm b/report/coverlet/WireMock.Net_XPathMatcher.htm index a77e2298e..10ee75ca0 100644 --- a/report/coverlet/WireMock.Net_XPathMatcher.htm +++ b/report/coverlet/WireMock.Net_XPathMatcher.htm @@ -119,7 +119,7 @@

 77} -

+

Methods/Properties

diff --git a/report/coverlet/combined.js b/report/coverlet/combined.js index 99f538be8..fff40421b 100644 --- a/report/coverlet/combined.js +++ b/report/coverlet/combined.js @@ -352,7 +352,7 @@ var assemblies = [ { "name": "WireMock.Logging.LogEntry", "reportPath": "WireMock.Net_LogEntry.htm", "coveredLines": 6, "uncoveredLines": 0, "coverableLines": 6, "totalLines": 59, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 0, "totalBranches": 0, "lineCoverageHistory": [], "branchCoverageHistory": [] }, { "name": "WireMock.Logging.WireMockConsoleLogger", "reportPath": "WireMock.Net_WireMockConsoleLogger.htm", "coveredLines": 0, "uncoveredLines": 24, "coverableLines": 24, "totalLines": 59, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 0, "totalBranches": 2, "lineCoverageHistory": [], "branchCoverageHistory": [] }, { "name": "WireMock.Logging.WireMockNullLogger", "reportPath": "WireMock.Net_WireMockNullLogger.htm", "coveredLines": 8, "uncoveredLines": 2, "coverableLines": 10, "totalLines": 41, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 0, "totalBranches": 0, "lineCoverageHistory": [], "branchCoverageHistory": [] }, - { "name": "WireMock.Mapping", "reportPath": "WireMock.Net_Mapping.htm", "coveredLines": 36, "uncoveredLines": 0, "coverableLines": 36, "totalLines": 140, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 13, "totalBranches": 14, "lineCoverageHistory": [], "branchCoverageHistory": [] }, + { "name": "WireMock.Mapping", "reportPath": "WireMock.Net_Mapping.htm", "coveredLines": 36, "uncoveredLines": 0, "coverableLines": 36, "totalLines": 138, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 13, "totalBranches": 14, "lineCoverageHistory": [], "branchCoverageHistory": [] }, { "name": "WireMock.Matchers.ExactMatcher", "reportPath": "WireMock.Net_ExactMatcher.htm", "coveredLines": 17, "uncoveredLines": 0, "coverableLines": 17, "totalLines": 54, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 0, "totalBranches": 0, "lineCoverageHistory": [], "branchCoverageHistory": [] }, { "name": "WireMock.Matchers.ExactObjectMatcher", "reportPath": "WireMock.Net_ExactObjectMatcher.htm", "coveredLines": 24, "uncoveredLines": 0, "coverableLines": 24, "totalLines": 71, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 2, "totalBranches": 2, "lineCoverageHistory": [], "branchCoverageHistory": [] }, { "name": "WireMock.Matchers.JsonMatcher", "reportPath": "WireMock.Net_JsonMatcher.htm", "coveredLines": 37, "uncoveredLines": 5, "coverableLines": 42, "totalLines": 105, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 10, "totalBranches": 12, "lineCoverageHistory": [], "branchCoverageHistory": [] }, @@ -361,7 +361,7 @@ var assemblies = [ { "name": "WireMock.Matchers.MatchBehaviourHelper", "reportPath": "WireMock.Net_MatchBehaviourHelper.htm", "coveredLines": 6, "uncoveredLines": 0, "coverableLines": 6, "totalLines": 27, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 4, "totalBranches": 4, "lineCoverageHistory": [], "branchCoverageHistory": [] }, { "name": "WireMock.Matchers.MatchScores", "reportPath": "WireMock.Net_MatchScores.htm", "coveredLines": 9, "uncoveredLines": 0, "coverableLines": 9, "totalLines": 61, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 4, "totalBranches": 6, "lineCoverageHistory": [], "branchCoverageHistory": [] }, { "name": "WireMock.Matchers.RegexMatcher", "reportPath": "WireMock.Net_RegexMatcher.htm", "coveredLines": 38, "uncoveredLines": 3, "coverableLines": 41, "totalLines": 104, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 4, "totalBranches": 4, "lineCoverageHistory": [], "branchCoverageHistory": [] }, - { "name": "WireMock.Matchers.Request.RequestMatchResult", "reportPath": "WireMock.Net_RequestMatchResult.htm", "coveredLines": 12, "uncoveredLines": 4, "coverableLines": 16, "totalLines": 82, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 2, "totalBranches": 2, "lineCoverageHistory": [], "branchCoverageHistory": [] }, + { "name": "WireMock.Matchers.Request.RequestMatchResult", "reportPath": "WireMock.Net_RequestMatchResult.htm", "coveredLines": 16, "uncoveredLines": 0, "coverableLines": 16, "totalLines": 82, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 1, "totalBranches": 2, "lineCoverageHistory": [], "branchCoverageHistory": [] }, { "name": "WireMock.Matchers.Request.RequestMessageBodyMatcher", "reportPath": "WireMock.Net_RequestMessageBodyMatcher.htm", "coveredLines": 67, "uncoveredLines": 0, "coverableLines": 67, "totalLines": 158, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 23, "totalBranches": 26, "lineCoverageHistory": [], "branchCoverageHistory": [] }, { "name": "WireMock.Matchers.Request.RequestMessageClientIPMatcher", "reportPath": "WireMock.Net_RequestMessageClientIPMatcher.htm", "coveredLines": 27, "uncoveredLines": 1, "coverableLines": 28, "totalLines": 75, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 4, "totalBranches": 6, "lineCoverageHistory": [], "branchCoverageHistory": [] }, { "name": "WireMock.Matchers.Request.RequestMessageCompositeMatcher", "reportPath": "WireMock.Net_RequestMessageCompositeMatcher.htm", "coveredLines": 16, "uncoveredLines": 0, "coverableLines": 16, "totalLines": 52, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 4, "totalBranches": 4, "lineCoverageHistory": [], "branchCoverageHistory": [] }, @@ -376,25 +376,26 @@ var assemblies = [ { "name": "WireMock.Matchers.WildcardMatcher", "reportPath": "WireMock.Net_WildcardMatcher.htm", "coveredLines": 17, "uncoveredLines": 0, "coverableLines": 17, "totalLines": 63, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 2, "totalBranches": 2, "lineCoverageHistory": [], "branchCoverageHistory": [] }, { "name": "WireMock.Matchers.XPathMatcher", "reportPath": "WireMock.Net_XPathMatcher.htm", "coveredLines": 25, "uncoveredLines": 3, "coverableLines": 28, "totalLines": 77, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 2, "totalBranches": 2, "lineCoverageHistory": [], "branchCoverageHistory": [] }, { "name": "WireMock.Models.UrlDetails", "reportPath": "WireMock.Net_UrlDetails.htm", "coveredLines": 15, "uncoveredLines": 0, "coverableLines": 15, "totalLines": 51, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 0, "totalBranches": 0, "lineCoverageHistory": [], "branchCoverageHistory": [] }, - { "name": "WireMock.Owin.AspNetCoreSelfHost", "reportPath": "WireMock.Net_AspNetCoreSelfHost.htm", "coveredLines": 81, "uncoveredLines": 5, "coverableLines": 86, "totalLines": 148, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 3, "totalBranches": 4, "lineCoverageHistory": [], "branchCoverageHistory": [] }, - { "name": "WireMock.Owin.GlobalExceptionMiddleware", "reportPath": "WireMock.Net_GlobalExceptionMiddleware.htm", "coveredLines": 12, "uncoveredLines": 5, "coverableLines": 17, "totalLines": 56, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 7, "totalBranches": 12, "lineCoverageHistory": [], "branchCoverageHistory": [] }, - { "name": "WireMock.Owin.OwinRequestMapper", "reportPath": "WireMock.Net_OwinRequestMapper.htm", "coveredLines": 28, "uncoveredLines": 7, "coverableLines": 35, "totalLines": 90, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 10, "totalBranches": 16, "lineCoverageHistory": [], "branchCoverageHistory": [] }, - { "name": "WireMock.Owin.OwinResponseMapper", "reportPath": "WireMock.Net_OwinResponseMapper.htm", "coveredLines": 42, "uncoveredLines": 5, "coverableLines": 47, "totalLines": 114, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 23, "totalBranches": 28, "lineCoverageHistory": [], "branchCoverageHistory": [] }, - { "name": "WireMock.Owin.WireMockMiddleware", "reportPath": "WireMock.Net_WireMockMiddleware.htm", "coveredLines": 90, "uncoveredLines": 34, "coverableLines": 124, "totalLines": 194, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 62, "totalBranches": 96, "lineCoverageHistory": [], "branchCoverageHistory": [] }, - { "name": "WireMock.Owin.WireMockMiddlewareOptions", "reportPath": "WireMock.Net_WireMockMiddlewareOptions.htm", "coveredLines": 11, "uncoveredLines": 0, "coverableLines": 11, "totalLines": 45, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 0, "totalBranches": 0, "lineCoverageHistory": [], "branchCoverageHistory": [] }, + { "name": "WireMock.Owin.AspNetCoreSelfHost", "reportPath": "WireMock.Net_AspNetCoreSelfHost.htm", "coveredLines": 88, "uncoveredLines": 5, "coverableLines": 93, "totalLines": 157, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 3, "totalBranches": 4, "lineCoverageHistory": [], "branchCoverageHistory": [] }, + { "name": "WireMock.Owin.GlobalExceptionMiddleware", "reportPath": "WireMock.Net_GlobalExceptionMiddleware.htm", "coveredLines": 17, "uncoveredLines": 5, "coverableLines": 22, "totalLines": 71, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 7, "totalBranches": 12, "lineCoverageHistory": [], "branchCoverageHistory": [] }, + { "name": "WireMock.Owin.Mappers.OwinRequestMapper", "reportPath": "WireMock.Net_OwinRequestMapper.htm", "coveredLines": 32, "uncoveredLines": 7, "coverableLines": 39, "totalLines": 89, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 10, "totalBranches": 16, "lineCoverageHistory": [], "branchCoverageHistory": [] }, + { "name": "WireMock.Owin.Mappers.OwinResponseMapper", "reportPath": "WireMock.Net_OwinResponseMapper.htm", "coveredLines": 44, "uncoveredLines": 3, "coverableLines": 47, "totalLines": 100, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 20, "totalBranches": 26, "lineCoverageHistory": [], "branchCoverageHistory": [] }, + { "name": "WireMock.Owin.MappingMatcher", "reportPath": "WireMock.Net_MappingMatcher.htm", "coveredLines": 28, "uncoveredLines": 0, "coverableLines": 28, "totalLines": 50, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 20, "totalBranches": 22, "lineCoverageHistory": [], "branchCoverageHistory": [] }, + { "name": "WireMock.Owin.WireMockMiddleware", "reportPath": "WireMock.Net_WireMockMiddleware.htm", "coveredLines": 101, "uncoveredLines": 6, "coverableLines": 107, "totalLines": 187, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 57, "totalBranches": 66, "lineCoverageHistory": [], "branchCoverageHistory": [] }, + { "name": "WireMock.Owin.WireMockMiddlewareOptions", "reportPath": "WireMock.Net_WireMockMiddlewareOptions.htm", "coveredLines": 11, "uncoveredLines": 0, "coverableLines": 11, "totalLines": 39, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 0, "totalBranches": 0, "lineCoverageHistory": [], "branchCoverageHistory": [] }, { "name": "WireMock.RequestBuilders.Request", "reportPath": "WireMock.Net_Request.htm", "coveredLines": 208, "uncoveredLines": 6, "coverableLines": 214, "totalLines": 418, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 8, "totalBranches": 8, "lineCoverageHistory": [], "branchCoverageHistory": [] }, { "name": "WireMock.RequestMessage", "reportPath": "WireMock.Net_RequestMessage.htm", "coveredLines": 81, "uncoveredLines": 0, "coverableLines": 81, "totalLines": 212, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 23, "totalBranches": 24, "lineCoverageHistory": [], "branchCoverageHistory": [] }, - { "name": "WireMock.ResponseBuilders.Response", "reportPath": "WireMock.Net_Response.htm", "coveredLines": 152, "uncoveredLines": 31, "coverableLines": 183, "totalLines": 397, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 37, "totalBranches": 44, "lineCoverageHistory": [], "branchCoverageHistory": [] }, + { "name": "WireMock.ResponseBuilders.Response", "reportPath": "WireMock.Net_Response.htm", "coveredLines": 161, "uncoveredLines": 31, "coverableLines": 192, "totalLines": 414, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 39, "totalBranches": 46, "lineCoverageHistory": [], "branchCoverageHistory": [] }, { "name": "WireMock.ResponseMessage", "reportPath": "WireMock.Net_ResponseMessage.htm", "coveredLines": 18, "uncoveredLines": 3, "coverableLines": 21, "totalLines": 95, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 1, "totalBranches": 2, "lineCoverageHistory": [], "branchCoverageHistory": [] }, - { "name": "WireMock.ResponseMessageBuilder", "reportPath": "WireMock.Net_ResponseMessageBuilder.htm", "coveredLines": 11, "uncoveredLines": 0, "coverableLines": 11, "totalLines": 26, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 1, "totalBranches": 2, "lineCoverageHistory": [], "branchCoverageHistory": [] }, + { "name": "WireMock.ResponseMessageBuilder", "reportPath": "WireMock.Net_ResponseMessageBuilder.htm", "coveredLines": 11, "uncoveredLines": 0, "coverableLines": 11, "totalLines": 26, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 2, "totalBranches": 2, "lineCoverageHistory": [], "branchCoverageHistory": [] }, { "name": "WireMock.ResponseProviders.DynamicAsyncResponseProvider", "reportPath": "WireMock.Net_DynamicAsyncResponseProvider.htm", "coveredLines": 0, "uncoveredLines": 8, "coverableLines": 8, "totalLines": 24, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 0, "totalBranches": 0, "lineCoverageHistory": [], "branchCoverageHistory": [] }, { "name": "WireMock.ResponseProviders.DynamicResponseProvider", "reportPath": "WireMock.Net_DynamicResponseProvider.htm", "coveredLines": 8, "uncoveredLines": 0, "coverableLines": 8, "totalLines": 24, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 0, "totalBranches": 0, "lineCoverageHistory": [], "branchCoverageHistory": [] }, { "name": "WireMock.ResponseProviders.ProxyAsyncResponseProvider", "reportPath": "WireMock.Net_ProxyAsyncResponseProvider.htm", "coveredLines": 7, "uncoveredLines": 3, "coverableLines": 10, "totalLines": 28, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 0, "totalBranches": 0, "lineCoverageHistory": [], "branchCoverageHistory": [] }, { "name": "WireMock.ScenarioState", "reportPath": "WireMock.Net_ScenarioState.htm", "coveredLines": 4, "uncoveredLines": 0, "coverableLines": 4, "totalLines": 28, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 0, "totalBranches": 0, "lineCoverageHistory": [], "branchCoverageHistory": [] }, - { "name": "WireMock.Serialization.LogEntryMapper", "reportPath": "WireMock.Net_LogEntryMapper.htm", "coveredLines": 60, "uncoveredLines": 0, "coverableLines": 60, "totalLines": 72, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 8, "totalBranches": 8, "lineCoverageHistory": [], "branchCoverageHistory": [] }, + { "name": "WireMock.Serialization.LogEntryMapper", "reportPath": "WireMock.Net_LogEntryMapper.htm", "coveredLines": 60, "uncoveredLines": 0, "coverableLines": 60, "totalLines": 72, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 7, "totalBranches": 8, "lineCoverageHistory": [], "branchCoverageHistory": [] }, { "name": "WireMock.Serialization.MappingConverter", "reportPath": "WireMock.Net_MappingConverter.htm", "coveredLines": 87, "uncoveredLines": 29, "coverableLines": 116, "totalLines": 142, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 34, "totalBranches": 70, "lineCoverageHistory": [], "branchCoverageHistory": [] }, - { "name": "WireMock.Serialization.MatcherMapper", "reportPath": "WireMock.Net_MatcherMapper.htm", "coveredLines": 43, "uncoveredLines": 3, "coverableLines": 46, "totalLines": 96, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 63, "totalBranches": 74, "lineCoverageHistory": [], "branchCoverageHistory": [] }, - { "name": "WireMock.Server.FluentMockServer", "reportPath": "WireMock.Net_FluentMockServer.htm", "coveredLines": 399, "uncoveredLines": 333, "coverableLines": 732, "totalLines": 1311, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 151, "totalBranches": 260, "lineCoverageHistory": [], "branchCoverageHistory": [] }, + { "name": "WireMock.Serialization.MatcherMapper", "reportPath": "WireMock.Net_MatcherMapper.htm", "coveredLines": 43, "uncoveredLines": 3, "coverableLines": 46, "totalLines": 96, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 59, "totalBranches": 68, "lineCoverageHistory": [], "branchCoverageHistory": [] }, + { "name": "WireMock.Server.FluentMockServer", "reportPath": "WireMock.Net_FluentMockServer.htm", "coveredLines": 397, "uncoveredLines": 339, "coverableLines": 736, "totalLines": 1316, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 133, "totalBranches": 244, "lineCoverageHistory": [], "branchCoverageHistory": [] }, { "name": "WireMock.Server.RespondWithAProvider", "reportPath": "WireMock.Net_RespondWithAProvider.htm", "coveredLines": 42, "uncoveredLines": 4, "coverableLines": 46, "totalLines": 115, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 2, "totalBranches": 4, "lineCoverageHistory": [], "branchCoverageHistory": [] }, { "name": "WireMock.Settings.FluentMockServerSettings", "reportPath": "WireMock.Net_FluentMockServerSettings.htm", "coveredLines": 17, "uncoveredLines": 0, "coverableLines": 17, "totalLines": 87, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 0, "totalBranches": 0, "lineCoverageHistory": [], "branchCoverageHistory": [] }, { "name": "WireMock.Settings.ProxyAndRecordSettings", "reportPath": "WireMock.Net_ProxyAndRecordSettings.htm", "coveredLines": 5, "uncoveredLines": 0, "coverableLines": 5, "totalLines": 30, "coverageType": "LineCoverage", "methodCoverage": "-", "coveredBranches": 0, "totalBranches": 0, "lineCoverageHistory": [], "branchCoverageHistory": [] }, diff --git a/report/coverlet/index.htm b/report/coverlet/index.htm index ce4334b73..95c2c59fd 100644 --- a/report/coverlet/index.htm +++ b/report/coverlet/index.htm @@ -14,17 +14,17 @@

Summary

-Generated on:2018-09-21 - 14:00:17 +Generated on:2018-09-26 - 11:51:45 Parser:OpenCoverParser Assemblies:2 -Classes:93 -Files:95 -Covered lines:2739 -Uncovered lines:884 -Coverable lines:3623 -Total lines:8548 -Line coverage:75.6% -Branch coverage:67.1% +Classes:94 +Files:96 +Covered lines:2807 +Uncovered lines:856 +Coverable lines:3663 +Total lines:8614 +Line coverage:76.6% +Branch coverage:68.1%

Coverage

@@ -46,7 +46,7 @@

Coverage

NameCoveredUncoveredCoverableTotalLine coverageBranch coverage -WireMock.Net27397823521837577.7%
  
68.5%
  
+WireMock.Net28077543561844178.8%
  
69.6%
  
WireMock.Admin.Mappings.BodyModel10113100%
 
 
WireMock.Admin.Mappings.ClientIPModel011130%
 
 
WireMock.Admin.Mappings.CookieModel022200%
 
 
@@ -74,7 +74,7 @@

Coverage

WireMock.Logging.LogEntry60659100%
 
 
WireMock.Logging.WireMockConsoleLogger02424590%
 
0%
 
WireMock.Logging.WireMockNullLogger82104180%
  
 
-WireMock.Mapping36036140100%
 
92.8%
  
+WireMock.Mapping36036138100%
 
92.8%
  
WireMock.Matchers.ExactMatcher1701754100%
 
 
WireMock.Matchers.ExactObjectMatcher2402471100%
 
100%
 
WireMock.Matchers.JsonMatcher3754210588%
  
83.3%
  
@@ -83,7 +83,7 @@

Coverage

WireMock.Matchers.MatchBehaviourHelper60627100%
 
100%
 
WireMock.Matchers.MatchScores90961100%
 
66.6%
  
WireMock.Matchers.RegexMatcher3834110492.6%
  
100%
 
-WireMock.Matchers.Request.RequestMatchResult124168275%
  
100%
 
+WireMock.Matchers.Request.RequestMatchResult1601682100%
 
50%
  
WireMock.Matchers.Request.RequestMessageBodyMatcher67067158100%
 
88.4%
  
WireMock.Matchers.Request.RequestMessageClientIPMatcher271287596.4%
  
66.6%
  
WireMock.Matchers.Request.RequestMessageCompositeMatcher1601652100%
 
100%
 
@@ -98,25 +98,26 @@

Coverage

WireMock.Matchers.WildcardMatcher1701763100%
 
100%
 
WireMock.Matchers.XPathMatcher253287789.2%
  
100%
 
WireMock.Models.UrlDetails1501551100%
 
 
-WireMock.Owin.AspNetCoreSelfHost8158614894.1%
  
75%
  
-WireMock.Owin.GlobalExceptionMiddleware125175670.5%
  
58.3%
  
-WireMock.Owin.OwinRequestMapper287359080%
  
62.5%
  
-WireMock.Owin.OwinResponseMapper4254711489.3%
  
82.1%
  
-WireMock.Owin.WireMockMiddleware903412419472.5%
  
64.5%
  
-WireMock.Owin.WireMockMiddlewareOptions1101145100%
 
 
+WireMock.Owin.AspNetCoreSelfHost8859315794.6%
  
75%
  
+WireMock.Owin.GlobalExceptionMiddleware175227177.2%
  
58.3%
  
+WireMock.Owin.Mappers.OwinRequestMapper327398982%
  
62.5%
  
+WireMock.Owin.Mappers.OwinResponseMapper4434710093.6%
  
76.9%
  
+WireMock.Owin.MappingMatcher2802850100%
 
90.9%
  
+WireMock.Owin.WireMockMiddleware101610718794.3%
  
86.3%
  
+WireMock.Owin.WireMockMiddlewareOptions1101139100%
 
 
WireMock.RequestBuilders.Request208621441897.1%
  
100%
 
WireMock.RequestMessage81081212100%
 
95.8%
  
-WireMock.ResponseBuilders.Response1523118339783%
  
84%
  
+WireMock.ResponseBuilders.Response1613119241483.8%
  
84.7%
  
WireMock.ResponseMessage183219585.7%
  
50%
  
-WireMock.ResponseMessageBuilder1101126100%
 
50%
  
+WireMock.ResponseMessageBuilder1101126100%
 
100%
 
WireMock.ResponseProviders.DynamicAsyncResponseProvider088240%
 
 
WireMock.ResponseProviders.DynamicResponseProvider80824100%
 
 
WireMock.ResponseProviders.ProxyAsyncResponseProvider73102870%
  
 
WireMock.ScenarioState40428100%
 
 
-WireMock.Serialization.LogEntryMapper6006072100%
 
100%
 
+WireMock.Serialization.LogEntryMapper6006072100%
 
87.5%
  
WireMock.Serialization.MappingConverter872911614275%
  
48.5%
  
-WireMock.Serialization.MatcherMapper433469693.4%
  
85.1%
  
-WireMock.Server.FluentMockServer399333732131154.5%
  
58%
  
+WireMock.Serialization.MatcherMapper433469693.4%
  
86.7%
  
+WireMock.Server.FluentMockServer397339736131653.9%
  
54.5%
  
WireMock.Server.RespondWithAProvider4244611591.3%
  
50%
  
WireMock.Settings.FluentMockServerSettings1701787100%
 
 
WireMock.Settings.ProxyAndRecordSettings50530100%
 
 
@@ -143,6 +144,6 @@

Coverage

WireMock.Net.StandAlone.StandAloneApp04848900%
 
0%
 
-
+ \ No newline at end of file diff --git a/test/WireMock.Net.Tests/Owin/GlobalExceptionMiddlewareTests.cs b/test/WireMock.Net.Tests/Owin/GlobalExceptionMiddlewareTests.cs new file mode 100644 index 000000000..8cc9502ad --- /dev/null +++ b/test/WireMock.Net.Tests/Owin/GlobalExceptionMiddlewareTests.cs @@ -0,0 +1,44 @@ +using System.Threading.Tasks; +using Moq; +using NFluent; +using WireMock.Owin; +using WireMock.Owin.Mappers; +using Xunit; +#if NET452 +using IContext = Microsoft.Owin.IOwinContext; +using IResponse = Microsoft.Owin.IOwinResponse; +#else +using IContext = Microsoft.AspNetCore.Http.HttpContext; +using IResponse = Microsoft.AspNetCore.Http.HttpResponse; +#endif + +namespace WireMock.Net.Tests.Owin +{ + public class GlobalExceptionMiddlewareTests + { + private Mock _optionsMock; + private Mock _responseMapperMock; + private Mock _contextMock; + + private GlobalExceptionMiddleware _sut; + + public GlobalExceptionMiddlewareTests() + { + _optionsMock = new Mock(); + _optionsMock.SetupAllProperties(); + + _responseMapperMock = new Mock(); + _responseMapperMock.SetupAllProperties(); + _responseMapperMock.Setup(m => m.MapAsync(It.IsAny(), It.IsAny())).Returns(Task.FromResult(true)); + + _sut = new GlobalExceptionMiddleware(null, _optionsMock.Object, _responseMapperMock.Object); + } + + [Fact] + public void GlobalExceptionMiddleware_Invoke_NullAsNext_Throws() + { + // Act + Check.ThatAsyncCode(() => _sut.Invoke(_contextMock.Object)).ThrowsAny(); + } + } +} diff --git a/test/WireMock.Net.Tests/Owin/WireMockMiddlewareTests.cs b/test/WireMock.Net.Tests/Owin/WireMockMiddlewareTests.cs index 74551a2fc..ec4329821 100644 --- a/test/WireMock.Net.Tests/Owin/WireMockMiddlewareTests.cs +++ b/test/WireMock.Net.Tests/Owin/WireMockMiddlewareTests.cs @@ -17,15 +17,11 @@ #if NET452 using Microsoft.Owin; using IContext = Microsoft.Owin.IOwinContext; -using OwinMiddleware = Microsoft.Owin.OwinMiddleware; -using Next = Microsoft.Owin.OwinMiddleware; using IRequest = Microsoft.Owin.IOwinRequest; using IResponse = Microsoft.Owin.IOwinResponse; #else using Microsoft.AspNetCore.Http; -using OwinMiddleware = System.Object; using IContext = Microsoft.AspNetCore.Http.HttpContext; -using Next = Microsoft.AspNetCore.Http.RequestDelegate; using IRequest = Microsoft.AspNetCore.Http.HttpRequest; using IResponse = Microsoft.AspNetCore.Http.HttpResponse; #endif