path <> url

This commit is contained in:
Stef Heyenrath
2017-01-29 14:24:48 +01:00
parent 7fe0f41a9d
commit fddc85f48d
9 changed files with 167 additions and 198 deletions

View File

@@ -54,13 +54,46 @@ namespace WireMock.RequestBuilders
}
/// <summary>
/// The with url.
/// The with path.
/// </summary>
/// <param name="matchers">The matchers.</param>
/// <returns>The <see cref="IRequestBuilder"/>.</returns>
public IRequestBuilder WithUrl(params IMatcher[] matchers)
public IRequestBuilder WithPath(params IMatcher[] matchers)
{
_requestMatchers.Add(new RequestMessageUrlMatcher(matchers));
_requestMatchers.Add(new RequestMessagePathMatcher(matchers));
return this;
}
/// <summary>
/// The with path.
/// </summary>
/// <param name="paths">The paths.</param>
/// <returns>The <see cref="IRequestBuilder"/>.</returns>
public IRequestBuilder WithPath(params string[] paths)
{
_requestMatchers.Add(new RequestMessagePathMatcher(paths));
return this;
}
/// <summary>
/// The with path.
/// </summary>
/// <param name="funcs">The path func.</param>
/// <returns>The <see cref="IRequestBuilder"/>.</returns>
public IRequestBuilder WithPath(params Func<string, bool>[] funcs)
{
_requestMatchers.Add(new RequestMessagePathMatcher(funcs));
return this;
}
/// <summary>
/// The with url.
/// </summary>
/// <param name="matcher">The matcher.</param>
/// <returns>The <see cref="IRequestBuilder"/>.</returns>
public IRequestBuilder WithUrl(params IMatcher[] matcher)
{
_requestMatchers.Add(new RequestMessageUrlMatcher(matcher));
return this;
}
@@ -86,39 +119,6 @@ namespace WireMock.RequestBuilders
return this;
}
/// <summary>
/// The with url.
/// </summary>
/// <param name="matcher">The matcher.</param>
/// <returns>The <see cref="IRequestBuilder"/>.</returns>
public IRequestBuilder WithPath(params IMatcher[] matcher)
{
_requestMatchers.Add(new RequestMessagePathMatcher(matcher));
return this;
}
/// <summary>
/// The with path.
/// </summary>
/// <param name="paths">The path.</param>
/// <returns>The <see cref="IRequestBuilder"/>.</returns>
public IRequestBuilder WithPath(params string[] paths)
{
_requestMatchers.Add(new RequestMessagePathMatcher(paths));
return this;
}
/// <summary>
/// The with path.
/// </summary>
/// <param name="funcs">The path func.</param>
/// <returns>The <see cref="IRequestBuilder"/>.</returns>
public IRequestBuilder WithPath(params Func<string, bool>[] funcs)
{
_requestMatchers.Add(new RequestMessagePathMatcher(funcs));
return this;
}
/// <summary>
/// The using get.
/// </summary>