-
-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add overloads to AtUrl and AtAbsoluteUrl which can use a IStringMatcher
- Loading branch information
Showing
3 changed files
with
84 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Copyright © WireMock.Net | ||
|
||
namespace WireMock.Matchers; | ||
|
||
/// <summary> | ||
/// Provides some extension methods for matchers. | ||
/// </summary> | ||
public static class MatcherExtensions | ||
{ | ||
/// <summary> | ||
/// Determines if the match result is a perfect match. | ||
/// </summary> | ||
/// <param name="matcher">The string matcher.</param> | ||
/// <param name="input">The input string to match.</param> | ||
/// <returns><c>true</c>> if the match is perfect; otherwise, <c>false</c>>.</returns> | ||
public static bool IsPerfectMatch(this IStringMatcher matcher, string? input) | ||
{ | ||
return matcher.IsMatch(input).IsPerfect(); | ||
} | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters