mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-21 08:59:50 +01:00
37 lines
870 B
Plaintext
37 lines
870 B
Plaintext
var server = WireMockServer.Start();
|
|
server
|
|
.Given(Request.Create()
|
|
.UsingMethod("GET")
|
|
.WithPath("/foo1")
|
|
.WithParam("p1", "xyz")
|
|
)
|
|
.WithGuid("90356dba-b36c-469a-a17e-669cd84f1f05")
|
|
.RespondWith(Response.Create()
|
|
.WithStatusCode(200)
|
|
.WithBody("1")
|
|
);
|
|
|
|
server
|
|
.Given(Request.Create()
|
|
.UsingMethod("POST")
|
|
.WithPath("/foo2")
|
|
.WithParam("p2", "abc")
|
|
)
|
|
.WithGuid("1b731398-4a5b-457f-a6e3-d65e541c428f")
|
|
.RespondWith(Response.Create()
|
|
.WithStatusCode("201")
|
|
.WithHeader("hk", "hv")
|
|
.WithBody("2")
|
|
);
|
|
|
|
server
|
|
.Given(Request.Create()
|
|
.UsingMethod("DELETE")
|
|
.WithUrl("https://localhost/test")
|
|
)
|
|
.WithGuid("f74fd144-df53-404f-8e35-da22a640bd5f")
|
|
.RespondWith(Response.Create()
|
|
.WithStatusCode(208)
|
|
);
|
|
|