mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-11 21:12:16 +01: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");
|
||||
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