mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-10 02:43:33 +02:00
Partial matching
This commit is contained in:
@@ -30,5 +30,13 @@ namespace WireMock.Admin.Requests
|
||||
/// The response.
|
||||
/// </value>
|
||||
public LogResponseModel Response { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the request match result.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The request match result.
|
||||
/// </value>
|
||||
public LogRequestMatchModel RequestMatchResult { get; set; }
|
||||
}
|
||||
}
|
||||
40
src/WireMock.Net/Admin/Requests/LogRequestMatchModel.cs
Normal file
40
src/WireMock.Net/Admin/Requests/LogRequestMatchModel.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
namespace WireMock.Admin.Requests
|
||||
{
|
||||
/// <summary>
|
||||
/// LogRequestMatchModel
|
||||
/// </summary>
|
||||
public class LogRequestMatchModel
|
||||
{
|
||||
/// <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 => Matched == Total;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the match percentage.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The match percentage.
|
||||
/// </value>
|
||||
public double MatchPercentage => Total == 0 ? 100 : 100.0 * Matched / Total;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user