Updated Request Matching (markdown)

Stef Heyenrath
2019-08-27 18:12:02 +02:00
parent bfaeef3620
commit 9d55aa4cac

@@ -23,6 +23,51 @@ At this moment these matchers are supported:
* [WildcardMatcher](https://github.com/WireMock-Net/WireMock.Net/wiki/Request-Matching#wildcardmatching-wildcardmatcher)
## Exact matcher (ExactMatcher)
Can be used to exactly match a string or object.
#### C# option
```csharp
var server = FluentMockServer.Start();
server
.Given(Request.Create().WithPath("/exact")
.WithParam("from", new ExactMatcher("abc")))
.RespondWith(Response.Create()
.WithBody("Exact match")
);
```
#### JSON Mapping option
``` js
{
"Guid": "67ae335b-5d79-42dc-8ca7-236280ab9111",
"Request": {
"Path": {
"Matchers": [
{
"Name": "WildcardMatcher",
"Pattern": "/exact"
}
]
},
"Params": [
{
"Name": "from",
"Matchers": [
{
"Name": "ExactMatcher",
"Pattern": "abc"
}
]
}
]
},
"Response": {
"Body": "Exact match"
}
}
```
## Dynamic Linq (LinqMatcher)
Can be used to match an object using Dynamic Linq (https://github.com/StefH/System.Linq.Dynamic.Core)