Fixed bug 301 by not setting BodyAsFile to null after first use (#302)

* Fixed bug 301 by not setting BodyAsFile to null after first use

* Added extra unit test

* 1.0.24.0
This commit is contained in:
Ronald Wildenberg
2019-07-22 18:33:40 +02:00
committed by Stef Heyenrath
parent af46a490a5
commit 7201479439
4 changed files with 8 additions and 5 deletions

View File

@@ -36,10 +36,14 @@ namespace WireMock.Net.Tests.ResponseBuilders
);
// Act
var response = await new HttpClient().GetStringAsync("http://localhost:" + server.Ports[0] + "/v1/content");
var response1 = await new HttpClient().GetStringAsync("http://localhost:" + server.Ports[0] + "/v1/content");
var response2 = await new HttpClient().GetStringAsync("http://localhost:" + server.Ports[0] + "/v1/content");
var response3 = await new HttpClient().GetStringAsync("http://localhost:" + server.Ports[0] + "/v1/content");
// Assert
response.Should().Contain("<hello>world</hello>");
response1.Should().Contain("<hello>world</hello>");
response2.Should().Contain("<hello>world</hello>");
response3.Should().Contain("<hello>world</hello>");
}
}
}