Started with PartialMapping ...

This commit is contained in:
Stef Heyenrath
2017-02-03 16:35:37 +01:00
parent d1aa517f99
commit 841da80291
3 changed files with 45 additions and 26 deletions

View File

@@ -66,31 +66,5 @@ namespace WireMock.Admin.Requests
/// The body.
/// </value>
public string Body { get; set; }
/*
"id" : "45760a03-eebb-4387-ad0d-bb89b5d3d662",
"request" : {
"url" : "/received-request/9",
"absoluteUrl" : "http://localhost:56715/received-request/9",
"method" : "GET",
"clientIp" : "127.0.0.1",
"headers" : {
"Connection" : "keep-alive",
"Host" : "localhost:56715",
"User-Agent" : "Apache-HttpClient/4.5.1 (Java/1.7.0_51)"
},
"cookies" : { },
"browserProxyRequest" : false,
"loggedDate" : 1471442494809,
"bodyAsBase64" : "",
"body" : "",
"loggedDateString" : "2016-08-17T14:01:34Z"
},
"responseDefinition" : {
"status" : 404,
"transformers" : [ ],
"fromConfiguredStub" : false,
"transformerParameters" : { }
}*/
}
}

View File

@@ -0,0 +1,32 @@
namespace WireMock.Matchers.Request
{
/// <summary>
/// RequestMatchResult
/// </summary>
public class RequestMatchResult
{
/// <summary>
/// Gets or sets the number of matches.
/// </summary>
/// <value>
/// The number of matches.
/// </value>
public int Matched { get; set; }
/// <summary>
/// Gets or sets the total number of matches.
/// </summary>
/// <value>
/// The total number of matches.
/// </value>
public int Total { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance is perfect match.
/// </summary>
/// <value>
/// <c>true</c> if this instance is perfect match; otherwise, <c>false</c>.
/// </value>
public bool IsPerfectMatch { get; set; }
}
}

View File

@@ -32,6 +32,8 @@ namespace WireMock.Server
private TimeSpan _requestProcessingDelay = TimeSpan.Zero;
private bool _allowPartialMapping;
/// <summary>
/// Gets the ports.
/// </summary>
@@ -261,6 +263,17 @@ namespace WireMock.Server
}
}
/// <summary>
/// Allows the partial mapping.
/// </summary>
public void AllowPartialMapping()
{
lock (_syncRoot)
{
_allowPartialMapping = true;
}
}
/// <summary>
/// The given.
/// </summary>