mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-20 16:01:39 +02:00
HttpContext
This commit is contained in:
@@ -4,6 +4,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Moq;
|
||||
using NFluent;
|
||||
using WireMock.Models;
|
||||
@@ -56,7 +57,7 @@ public class ResponseWithProxyTests : IDisposable
|
||||
var responseBuilder = Response.Create().WithProxy(_server.Urls[0]);
|
||||
|
||||
// Act
|
||||
var response = await responseBuilder.ProvideResponseAsync(_mappingMock.Object, request, _settings);
|
||||
var response = await responseBuilder.ProvideResponseAsync(_mappingMock.Object, Mock.Of<HttpContext>(), request, _settings);
|
||||
|
||||
// Assert
|
||||
Check.That(request.ProxyUrl).IsNotNull();
|
||||
@@ -84,7 +85,7 @@ public class ResponseWithProxyTests : IDisposable
|
||||
// Act
|
||||
var request = new RequestMessage(new UrlDetails($"{_server.Urls[0]}/{_guid}"), "GET", ClientIp);
|
||||
|
||||
Check.ThatCode(() => responseBuilder.ProvideResponseAsync(_mappingMock.Object, request, _settings)).Throws<HttpRequestException>();
|
||||
Check.ThatCode(() => responseBuilder.ProvideResponseAsync(_mappingMock.Object, Mock.Of<HttpContext>(), request, _settings)).Throws<HttpRequestException>();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
|
||||
Reference in New Issue
Block a user