mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-30 13:51:48 +02:00
Partial matching
This commit is contained in:
@@ -30,10 +30,22 @@ namespace WireMock.Matchers.Request
|
||||
/// Determines whether the specified RequestMessage is match.
|
||||
/// </summary>
|
||||
/// <param name="requestMessage">The RequestMessage.</param>
|
||||
/// <param name="requestMatchResult">The RequestMatchResult.</param>
|
||||
/// <returns>
|
||||
/// <c>true</c> if the specified RequestMessage is match; otherwise, <c>false</c>.
|
||||
/// </returns>
|
||||
public bool IsMatch(RequestMessage requestMessage)
|
||||
public bool IsMatch(RequestMessage requestMessage, RequestMatchResult requestMatchResult)
|
||||
{
|
||||
bool isMatch = IsMatch(requestMessage);
|
||||
if (isMatch)
|
||||
requestMatchResult.Matched++;
|
||||
|
||||
requestMatchResult.Total++;
|
||||
|
||||
return isMatch;
|
||||
}
|
||||
|
||||
private bool IsMatch(RequestMessage requestMessage)
|
||||
{
|
||||
return Methods.Contains(requestMessage.Method);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user