mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-18 23:20:11 +02:00
Updated Scenarios and States (markdown)
@@ -48,3 +48,21 @@ Check.That(postResponse.StatusCode).Equals(HttpStatusCode.Created);
|
|||||||
string getResponse2 = await new HttpClient().GetStringAsync(url + "/todo/items");
|
string getResponse2 = await new HttpClient().GetStringAsync(url + "/todo/items");
|
||||||
Check.That(getResponse2).Equals("Buy milk;Cancel newspaper subscription");
|
Check.That(getResponse2).Equals("Buy milk;Cancel newspaper subscription");
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The first Scenario and State definition can also be used in the JSON Admin interface like:
|
||||||
|
```js
|
||||||
|
{
|
||||||
|
"Scenario": "To do list",
|
||||||
|
"SetStateTo": "TodoList State Started",
|
||||||
|
"Request": {
|
||||||
|
"Path": "/todo/items",
|
||||||
|
"Methods": [
|
||||||
|
"get"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Response": {
|
||||||
|
"StatusCode": 200,
|
||||||
|
"Body": "Buy milk"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user