Remove obsolete code

This commit is contained in:
Philip Wood
2017-04-18 15:35:54 +01:00
parent a1c6ab4ce4
commit 878eacf1db
14 changed files with 17 additions and 302 deletions

View File

@ -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;

View File

@ -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));

View File

@ -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;

View File

@ -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);
}

View File

@ -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);