mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-17 14:40:00 +02:00
Proxy (#15)
This commit is contained in:
@@ -353,6 +353,22 @@ namespace WireMock.Net.Tests
|
||||
Check.That(watch.ElapsedMilliseconds).IsStrictlyGreaterThan(200);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task Should_proxy_responses()
|
||||
{
|
||||
// given
|
||||
_server = FluentMockServer.Start();
|
||||
_server
|
||||
.Given(Request.Create().WithPath("/*"))
|
||||
.RespondWith(Response.Create().FromProxyUrl("http://www.google.com"));
|
||||
|
||||
// when
|
||||
var result = await new HttpClient().GetStringAsync("http://localhost:" + _server.Ports[0] + "/foo");
|
||||
|
||||
// then
|
||||
Check.That(result).Contains("google");
|
||||
}
|
||||
|
||||
//[TearDown]
|
||||
public void Dispose()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user