# Summary

Class: | WireMock.Matchers.Request.RequestMessageMethodMatcher
Assembly: | WireMock.Net
File(s): | C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Matchers\Request\RequestMessageMethodMatcher.cs
Covered lines: | 14
Uncovered lines: | 0
Coverable lines: | 14
Total lines: | 45
Line coverage: | 100%

# Metrics

Method | Cyclomatic complexity | NPath complexity | Sequence coverage | Branch coverage
--- | --- | --- | --- | ---
GetMatchingScore(...) | 0 | 0 | 1 | 0
IsMatch(...) | 0 | 0 | 1 | 0
.ctor(...) | 0 | 0 | 1 | 0

# File(s)

## C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Matchers\Request\RequestMessageMethodMatcher.cs

| # | Line |  | Line coverage
--- | --- | --- | --- | ---
|  | `1` |  | `using System;`
|  | `2` |  | `using System.Linq;`
|  | `3` |  | `using JetBrains.Annotations;`
|  | `4` |  | `using WireMock.Validation;`
|  | `5` |  | ``
|  | `6` |  | `namespace WireMock.Matchers.Request`
|  | `7` |  | `{`
|  | `8` |  | `/// <summary>`
|  | `9` |  | `/// The request verb matcher.`
|  | `10` |  | `/// </summary>`
|  | `11` |  | `internal class RequestMessageMethodMatcher : IRequestMatcher`
|  | `12` |  | `{`
|  | `13` |  | `private readonly MatchBehaviour _matchBehaviour;`
|  | `14` |  | ``
|  | `15` |  | `/// <summary>`
|  | `16` |  | `/// The methods`
|  | `17` |  | `/// </summary>`
| 292 | `18` |  | `public string[] Methods { get; }`
|  | `19` |  | ``
|  | `20` |  | `/// <summary>`
|  | `21` |  | `/// Initializes a new instance of the <see cref="RequestMessageMethodMatcher"/> class.`
|  | `22` |  | `/// </summary>`
|  | `23` |  | `/// <param name="matchBehaviour">The match behaviour.</param>`
|  | `24` |  | `/// <param name="methods">The methods.</param>`
| 258 | `25` |  | `public RequestMessageMethodMatcher(MatchBehaviour matchBehaviour, [NotNull] params string[] methods)`
| 258 | `26` |  | `{`
| 258 | `27` |  | `Check.NotNull(methods, nameof(methods));`
| 258 | `28` |  | `_matchBehaviour = matchBehaviour;`
|  | `29` |  | ``
| 258 | `30` |  | `Methods = methods;`
| 258 | `31` |  | `}`
|  | `32` |  | ``
|  | `33` |  | `/// <inheritdoc cref="IRequestMatcher.GetMatchingScore"/>`
|  | `34` |  | `public double GetMatchingScore(RequestMessage requestMessage, RequestMatchResult requestMatchResult)`
| 292 | `35` |  | `{`
| 292 | `36` |  | `double score = MatchBehaviourHelper.Convert(_matchBehaviour, IsMatch(requestMessage));`
| 292 | `37` |  | `return requestMatchResult.AddScore(GetType(), score);`
| 292 | `38` |  | `}`
|  | `39` |  | ``
|  | `40` |  | `private double IsMatch(RequestMessage requestMessage)`
| 292 | `41` |  | `{`
| 292 | `42` |  | `return MatchScores.ToScore(Methods.Contains(requestMessage.Method, StringComparer.OrdinalIgnoreCase));`
| 292 | `43` |  | `}`
|  | `44` |  | `}`
|  | `45` |  | `}`

# Methods/Properties

Methods()
.ctor(WireMock.Matchers.MatchBehaviour,System.String[])
GetMatchingScore(WireMock.RequestMessage,WireMock.Matchers.Request.RequestMatchResult)
IsMatch(WireMock.RequestMessage)