mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 22:30:41 +01:00
20 lines
790 B
Plaintext
20 lines
790 B
Plaintext
var builder = new MappingBuilder();
|
|
builder
|
|
.Given(Request.Create()
|
|
.UsingMethod("GET")
|
|
.WithPath(new WildcardMatcher(WireMock.Matchers.MatchBehaviour.AcceptOnMatch, "/test_path", false, WireMock.Matchers.MatchOperator.Or))
|
|
.WithParam("q", new ExactMatcher(WireMock.Matchers.MatchBehaviour.AcceptOnMatch, false, WireMock.Matchers.MatchOperator.And, "42"))
|
|
.WithClientIP("112.123.100.99")
|
|
.WithHeader("h-key", "h-value", true)
|
|
.WithCookie("c-key", "c-value", true)
|
|
.WithBody("b")
|
|
)
|
|
.WithGuid("8e7b9ab7-e18e-4502-8bc9-11e6679811cc")
|
|
.WithProbability(0.3)
|
|
.RespondWith(Response.Create()
|
|
.WithHeader("Keep-Alive", "test")
|
|
.WithBody("bbb")
|
|
.WithDelay(12345)
|
|
.WithTransformer()
|
|
);
|