mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-18 08:07:09 +01:00
fix unit-test
This commit is contained in:
@@ -156,18 +156,19 @@ namespace WireMock.Net.Tests
|
||||
.RespondWith(Response.Create()
|
||||
.WithBody("Test state msg 2"));
|
||||
|
||||
// when
|
||||
// when / then
|
||||
string url = "http://localhost:" + _server.Ports[0];
|
||||
var responseNoState1 = await new HttpClient().GetStringAsync(url + "/state1");
|
||||
var responseNoState2 = await new HttpClient().GetStringAsync(url + "/state2");
|
||||
|
||||
var responseWithState1 = await new HttpClient().GetStringAsync(url + "/foo");
|
||||
var responseWithState2 = await new HttpClient().GetStringAsync(url + "/foo");
|
||||
|
||||
// then
|
||||
var http = new HttpClient();
|
||||
var responseNoState1 = await http.GetStringAsync(url + "/state1");
|
||||
Check.That(responseNoState1).Equals("No state msg 1");
|
||||
Check.That(responseWithState1).Equals("Test state msg 1");
|
||||
|
||||
var responseNoState2 = await http.GetStringAsync(url + "/state2");
|
||||
Check.That(responseNoState2).Equals("No state msg 2");
|
||||
|
||||
var responseWithState1 = await http.GetStringAsync(url + "/foo");
|
||||
Check.That(responseWithState1).Equals("Test state msg 1");
|
||||
|
||||
var responseWithState2 = await http.GetStringAsync(url + "/foo");
|
||||
Check.That(responseWithState2).Equals("Test state msg 2");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user