mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-02-22 02:07:45 +01:00
* RejectOnMatch (wip) * RejectOnMatch (wip) * RejectOnMatch (wip) * RejectOnMatch (wip) * docs: improve sample app matcher to show use of reject on match * Reworked code review comments
70 lines
2.8 KiB
C#
70 lines
2.8 KiB
C#
using System;
|
|
using JetBrains.Annotations;
|
|
using WireMock.Matchers;
|
|
|
|
namespace WireMock.RequestBuilders
|
|
{
|
|
/// <summary>
|
|
/// IUrlAndPathRequestBuilder
|
|
/// </summary>
|
|
public interface IUrlAndPathRequestBuilder : IMethodRequestBuilder
|
|
{
|
|
/// <summary>
|
|
/// WithPath: add path matching based on IStringMatchers.
|
|
/// </summary>
|
|
/// <param name="matchers">The matchers.</param>
|
|
/// <returns>The <see cref="IRequestBuilder"/>.</returns>
|
|
IRequestBuilder WithPath([NotNull] params IStringMatcher[] matchers);
|
|
|
|
/// <summary>
|
|
/// WithPath: add path matching based on paths.
|
|
/// </summary>
|
|
/// <param name="paths">The paths.</param>
|
|
/// <returns>The <see cref="IRequestBuilder"/>.</returns>
|
|
IRequestBuilder WithPath([NotNull] params string[] paths);
|
|
|
|
/// <summary>
|
|
/// WithPath: add path matching based on paths and matchBehaviour.
|
|
/// </summary>
|
|
/// <param name="matchBehaviour">The match behaviour.</param>
|
|
/// <param name="paths">The paths.</param>
|
|
/// <returns>The <see cref="IRequestBuilder"/>.</returns>
|
|
IRequestBuilder WithPath(MatchBehaviour matchBehaviour, [NotNull] params string[] paths);
|
|
|
|
/// <summary>
|
|
/// WithPath: add path matching based on functions.
|
|
/// </summary>
|
|
/// <param name="funcs">The path funcs.</param>
|
|
/// <returns>The <see cref="IRequestBuilder"/>.</returns>
|
|
IRequestBuilder WithPath([NotNull] params Func<string, bool>[] funcs);
|
|
|
|
/// <summary>
|
|
/// WithUrl: add url matching based on IStringMatcher[].
|
|
/// </summary>
|
|
/// <param name="matchers">The matchers.</param>
|
|
/// <returns>The <see cref="IRequestBuilder"/>.</returns>
|
|
IRequestBuilder WithUrl([NotNull] params IStringMatcher[] matchers);
|
|
|
|
/// <summary>
|
|
/// WithUrl: add url matching based on urls.
|
|
/// </summary>
|
|
/// <param name="urls">The urls.</param>
|
|
/// <returns>The <see cref="IRequestBuilder"/>.</returns>
|
|
IRequestBuilder WithUrl([NotNull] params string[] urls);
|
|
|
|
/// <summary>
|
|
/// WithUrl: add url matching based on urls.
|
|
/// </summary>
|
|
/// <param name="matchBehaviour">The match behaviour.</param>
|
|
/// <param name="urls">The urls.</param>
|
|
/// <returns>The <see cref="IRequestBuilder"/>.</returns>
|
|
IRequestBuilder WithUrl(MatchBehaviour matchBehaviour, [NotNull] params string[] urls);
|
|
|
|
/// <summary>
|
|
/// WithUrl: add url matching based on functions.
|
|
/// </summary>
|
|
/// <param name="func">The path func.</param>
|
|
/// <returns>The <see cref="IRequestBuilder"/>.</returns>
|
|
IRequestBuilder WithUrl([NotNull] params Func<string, bool>[] func);
|
|
}
|
|
} |