Move some classes and restructure.

This commit is contained in:
Stef Heyenrath
2017-01-20 12:07:29 +01:00
parent 847745c256
commit e2552f03b9
28 changed files with 471 additions and 583 deletions

View File

@@ -0,0 +1,40 @@
using JetBrains.Annotations;
using WireMock.Validation;
namespace WireMock.Matchers.Request
{
/// <summary>
/// The request verb matcher.
/// </summary>
internal class RequestMessageVerbMatcher : IRequestMatcher
{
/// <summary>
/// The _verb.
/// </summary>
private readonly string _verb;
/// <summary>
/// Initializes a new instance of the <see cref="RequestMessageVerbMatcher"/> class.
/// </summary>
/// <param name="verb">
/// The verb.
/// </param>
public RequestMessageVerbMatcher([NotNull] string verb)
{
Check.NotNull(verb, nameof(verb));
_verb = verb.ToLower();
}
/// <summary>
/// Determines whether the specified RequestMessage is match.
/// </summary>
/// <param name="requestMessage">The RequestMessage.</param>
/// <returns>
/// <c>true</c> if the specified RequestMessage is match; otherwise, <c>false</c>.
/// </returns>
public bool IsMatch(RequestMessage requestMessage)
{
return requestMessage.Verb == _verb;
}
}
}