mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-06-19 13:48:15 +08:00
Removed unused usings, removed empty spaces, removed tons os warnings (#903)
This commit is contained in:
@ -1,9 +1,6 @@
|
||||
namespace Ocelot.UnitTests.Infrastructure
|
||||
{
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using System;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using Moq;
|
||||
using Ocelot.Infrastructure;
|
||||
using Ocelot.Infrastructure.RequestData;
|
||||
@ -11,6 +8,9 @@ namespace Ocelot.UnitTests.Infrastructure
|
||||
using Ocelot.Request.Middleware;
|
||||
using Ocelot.Responses;
|
||||
using Shouldly;
|
||||
using System;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using Xunit;
|
||||
|
||||
public class PlaceholdersTests
|
||||
@ -40,7 +40,7 @@ namespace Ocelot.UnitTests.Infrastructure
|
||||
[Fact]
|
||||
public void should_return_remote_ip_address()
|
||||
{
|
||||
var httpContext = new DefaultHttpContext(){Connection = { RemoteIpAddress = IPAddress.Any}};
|
||||
var httpContext = new DefaultHttpContext() { Connection = { RemoteIpAddress = IPAddress.Any } };
|
||||
_accessor.Setup(x => x.HttpContext).Returns(httpContext);
|
||||
var result = _placeholders.Get("{RemoteIpAddress}");
|
||||
result.Data.ShouldBe(httpContext.Connection.RemoteIpAddress.ToString());
|
||||
|
Reference in New Issue
Block a user