Initial code (copy)

This commit is contained in:
Stef Heyenrath
2017-01-17 22:44:21 +01:00
parent 4ab93896d7
commit eeaeeb2c61
47 changed files with 3311 additions and 1 deletions

View File

@@ -0,0 +1,54 @@
using System.Diagnostics.CodeAnalysis;
[module:
SuppressMessage("StyleCop.CSharp.ReadabilityRules",
"SA1101:PrefixLocalCallsWithThis",
Justification = "Reviewed. Suppression is OK here, as it conflicts with internal naming rules.")]
[module:
SuppressMessage("StyleCop.CSharp.NamingRules",
"SA1309:FieldNamesMustNotBeginWithUnderscore",
Justification = "Reviewed. Suppression is OK here, as it conflicts with internal naming rules.")]
[module:
SuppressMessage("StyleCop.CSharp.DocumentationRules",
"SA1633:FileMustHaveHeader",
Justification = "Reviewed. Suppression is OK here, as unknown copyright and company.")]
// ReSharper disable ArrangeThisQualifier
// ReSharper disable InconsistentNaming
namespace WireMock
{
/// <summary>
/// The request path spec.
/// </summary>
public class RequestPathSpec : ISpecifyRequests
{
/// <summary>
/// The _path.
/// </summary>
private readonly string _path;
/// <summary>
/// Initializes a new instance of the <see cref="RequestPathSpec"/> class.
/// </summary>
/// <param name="path">
/// The path.
/// </param>
public RequestPathSpec(string path)
{
_path = path;
}
/// <summary>
/// The is satisfied by.
/// </summary>
/// <param name="request">
/// The request.
/// </param>
/// <returns>
/// The <see cref="bool"/>.
/// </returns>
public bool IsSatisfiedBy(Request request)
{
return WildcardPatternMatcher.MatchWildcardString(_path, request.Path);
}
}
}