using JetBrains.Annotations; using WireMock.Validation; namespace WireMock.Matchers.Request { /// /// The request verb matcher. /// internal class RequestMessageVerbMatcher : IRequestMatcher { /// /// The _verb. /// private readonly string _verb; /// /// Initializes a new instance of the class. /// /// /// The verb. /// public RequestMessageVerbMatcher([NotNull] string verb) { Check.NotNull(verb, nameof(verb)); _verb = verb.ToLower(); } /// /// Determines whether the specified RequestMessage is match. /// /// The RequestMessage. /// /// true if the specified RequestMessage is match; otherwise, false. /// public bool IsMatch(RequestMessage requestMessage) { return requestMessage.Verb == _verb; } } }