mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-26 10:18:26 +02:00
* Fixes for JsonPath * More tests * Fixes + added tests
This commit is contained in:
@@ -7,8 +7,8 @@ namespace WireMock.Matchers
|
||||
/// <summary>
|
||||
/// ExactMatcher
|
||||
/// </summary>
|
||||
/// <seealso cref="IMatcher" />
|
||||
public class ExactMatcher : IMatcher
|
||||
/// <seealso cref="IStringMatcher" />
|
||||
public class ExactMatcher : IStringMatcher
|
||||
{
|
||||
private readonly string[] _values;
|
||||
|
||||
@@ -23,29 +23,19 @@ namespace WireMock.Matchers
|
||||
_values = values;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether the specified input is match.
|
||||
/// </summary>
|
||||
/// <param name="input">The input.</param>
|
||||
/// <returns>A value between 0.0 - 1.0 of the similarity.</returns>
|
||||
/// <inheritdoc cref="IStringMatcher.IsMatch"/>
|
||||
public double IsMatch(string input)
|
||||
{
|
||||
return MatchScores.ToScore(_values.Select(value => value.Equals(input)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the value.
|
||||
/// </summary>
|
||||
/// <returns>Patterns</returns>
|
||||
/// <inheritdoc cref="IStringMatcher.GetPatterns"/>
|
||||
public string[] GetPatterns()
|
||||
{
|
||||
return _values;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <returns>Name</returns>
|
||||
/// <inheritdoc cref="IMatcher.GetName"/>
|
||||
public string GetName()
|
||||
{
|
||||
return "ExactMatcher";
|
||||
|
||||
Reference in New Issue
Block a user