mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-06-19 05:48:16 +08:00
Remove obsolete code
This commit is contained in:
@ -1,8 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Claims;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.Primitives;
|
||||
using Moq;
|
||||
using Ocelot.Configuration;
|
||||
using Ocelot.Errors;
|
||||
@ -23,7 +21,6 @@ namespace Ocelot.UnitTests.Headers
|
||||
private readonly HttpRequestMessage _downstreamRequest;
|
||||
private List<Claim> _claims;
|
||||
private List<ClaimToThing> _configuration;
|
||||
private HttpContext _context;
|
||||
private Response _result;
|
||||
private Response<string> _claimValue;
|
||||
|
||||
|
@ -56,6 +56,8 @@ namespace Ocelot.UnitTests.Headers
|
||||
app.UseHttpRequestHeadersBuilderMiddleware();
|
||||
});
|
||||
|
||||
_downstreamRequest = new HttpRequestMessage();
|
||||
|
||||
_scopedRepository
|
||||
.Setup(sr => sr.Get<HttpRequestMessage>("DownstreamRequest"))
|
||||
.Returns(new OkResponse<HttpRequestMessage>(_downstreamRequest));
|
||||
|
@ -30,7 +30,6 @@ namespace Ocelot.UnitTests.LoadBalancer
|
||||
private readonly HttpClient _client;
|
||||
private HttpResponseMessage _result;
|
||||
private HostAndPort _hostAndPort;
|
||||
private OkResponse<string> _downstreamUrl;
|
||||
private OkResponse<DownstreamRoute> _downstreamRoute;
|
||||
private ErrorResponse<ILoadBalancer> _getLoadBalancerHouseError;
|
||||
private ErrorResponse<HostAndPort> _getHostAndPortError;
|
||||
|
@ -1,7 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Claims;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Moq;
|
||||
using Ocelot.Configuration;
|
||||
using Ocelot.Errors;
|
||||
@ -144,7 +143,6 @@ namespace Ocelot.UnitTests.QueryStrings
|
||||
|
||||
private void ThenTheResultIsError()
|
||||
{
|
||||
|
||||
_result.IsError.ShouldBe(true);
|
||||
}
|
||||
|
||||
|
@ -106,10 +106,7 @@ namespace Ocelot.UnitTests.Request
|
||||
private void GivenTheRequestBuilderReturns(Ocelot.Request.Request request)
|
||||
{
|
||||
_request = new OkResponse<Ocelot.Request.Request>(request);
|
||||
//_requestBuilder
|
||||
// .Setup(x => x.Build(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<Stream>(), It.IsAny<IHeaderDictionary>(),
|
||||
// It.IsAny<QueryString>(), It.IsAny<string>(), It.IsAny<Ocelot.RequestId.RequestId>(),It.IsAny<bool>(), It.IsAny<IQoSProvider>()))
|
||||
// .ReturnsAsync(_request);
|
||||
|
||||
_requestBuilder
|
||||
.Setup(x => x.Build(It.IsAny<HttpRequestMessage>(), It.IsAny<bool>(), It.IsAny<IQoSProvider>()))
|
||||
.ReturnsAsync(_request);
|
||||
|
Reference in New Issue
Block a user