WireMockServer

Stef Heyenrath
2020-01-25 09:42:48 +01:00
parent 69b368bff7
commit 4951c10e98

@@ -29,7 +29,7 @@ Can be used to exactly match a string or object.
#### C# option
```csharp
var server = FluentMockServer.Start();
var server = WireMockServer.Start();
server
.Given(Request.Create().WithPath("/exact")
.WithParam("from", new ExactMatcher("abc")))
@@ -74,7 +74,7 @@ Can be used to match an object using Dynamic Linq (https://github.com/StefH/Syst
#### C# option
```csharp
var server = FluentMockServer.Start();
var server = WireMockServer.Start();
server
.Given(Request.Create().WithPath("/linq")
.WithParam("from", new LinqMatcher("DateTime.Parse(it) > \"2018-03-01 00:00:00\"")))
@@ -124,7 +124,7 @@ server
#### C# option
```csharp
var server = FluentMockServer.Start();
var server = WireMockServer.Start();
server
.Given(Request.Create().WithPath("/cs")
.WithParam("from", new CSharpCodeMatcher("return it == \"x\";")))
@@ -171,7 +171,7 @@ Checks if a JSON object (or JSON as string) is DeepEqual.
#### C# option 1
```csharp
var server = FluentMockServer.Start();
var server = WireMockServer.Start();
server
.Given(Request
.Create()
@@ -215,7 +215,7 @@ server
#### C# option 2
```csharp
var server = FluentMockServer.Start();
var server = WireMockServer.Start();
server
.Given(Request
.Create()
@@ -269,7 +269,7 @@ server
#### C# option 3
It's also possible to use set `IgnoreCase` to true, this means that the PropertNames and PropertyValues will be matced regarding any case.
```csharp
var server = FluentMockServer.Start();
var server = WireMockServer.Start();
server
.Given(Request
.Create()
@@ -323,7 +323,7 @@ A JSON body will be considered to match a path expression if the expression retu
#### C#
```csharp
var server = FluentMockServer.Start();
var server = WireMockServer.Start();
server
.Given(
Request.Create().WithPath("/some/thing").UsingGet()
@@ -380,7 +380,7 @@ A JSON body will be considered to match a path expression if the expression retu
#### C#
```csharp
var server = FluentMockServer.Start();
var server = WireMockServer.Start();
server
.Given(
Request.Create().WithPath("/jmespath_example").UsingGet()
@@ -437,7 +437,7 @@ WireMock delegates to [XPath2.Net](https://github.com/StefH/XPath2.Net), therefo
#### C#
```csharp
var server = FluentMockServer.Start();
var server = WireMockServer.Start();
server
.Given(Request.Create()
.WithPath("/xpath").UsingPost()
@@ -493,7 +493,7 @@ Will match xml below:
The RegexMatcher can be used to match using a regular expression.
```csharp
var server = FluentMockServer.Start();
var server = WireMockServer.Start();
server
.Given(
Request.Create().WithPath("/reg").UsingPost()
@@ -514,7 +514,7 @@ Hi WM
[SimMetrics.Net](https://github.com/StefH/SimMetrics.Net) is used as a Similarity Metric Library, e.g. from edit distance's (Levenshtein, Gotoh, Jaro etc) to other metrics, (e.g Soundex, Chapman).
```csharp
var server = FluentMockServer.Start();
var server = WireMockServer.Start();
server
.Given(
Request.Create().WithPath("/reg").UsingGet()
@@ -537,7 +537,7 @@ WildcardMatching is mostly used for Path and Url matching. This matcher allows a
#### Option 1
```csharp
var server = FluentMockServer.Start();
var server = WireMockServer.Start();
server
.Given(Request.Create().WithPath("/some*").UsingGet())
.RespondWith(Response.Create().WithBody("Hello"));