Fix brace line spacing and remove multiple concurrent whitespace characters

SA1025, SA1505, SA1508, SA-1509, SA1513
This commit is contained in:
Philip Wood
2018-03-03 13:14:24 +00:00
parent 28a41b21a4
commit c61dc9fd11
80 changed files with 98 additions and 119 deletions

View File

@ -79,6 +79,7 @@ namespace Ocelot.UnitTests.Configuration
{
_result.Count.ShouldBeGreaterThan(0);
}
private void GivenTheFollowingDictionary(Dictionary<string,string> claimsToThings)
{
_claimsToThings = claimsToThings;
@ -107,4 +108,4 @@ namespace Ocelot.UnitTests.Configuration
.Verify(x => x.Extract(_claimsToThings.First().Key, _claimsToThings.First().Value), Times.Once);
}
}
}
}

View File

@ -981,7 +981,8 @@ namespace Ocelot.UnitTests.Configuration
.And(x => x.ThenTheErrorMessageAtPositionIs(0, "When not using service discovery DownstreamHostAndPorts must be set and not empty or Ocelot cannot find your service!"))
.BDDfy();
}
[Fact]
[Fact]
public void configuration_is_not_valid_when_host_and_port_is_empty()
{
this.Given(x => x.GivenAConfiguration(new FileConfiguration

View File

@ -34,6 +34,7 @@ namespace Ocelot.UnitTests.Configuration
_repo.Setup(x => x.Get()).ReturnsAsync(new OkResponse<FileConfiguration>(_fileConfig));
_poller = new ConsulFileConfigurationPoller(_factory.Object, _repo.Object, _setter.Object);
}
public void Dispose()
{
_poller.Dispose();
@ -49,7 +50,6 @@ namespace Ocelot.UnitTests.Configuration
[Fact]
public void should_call_setter_when_gets_new_config()
{
var newConfig = new FileConfiguration {
ReRoutes = new List<FileReRoute>
{

View File

@ -823,8 +823,7 @@ namespace Ocelot.UnitTests.Configuration
result.DownstreamReRoute[0].ClaimsToClaims.Count.ShouldBe(expected.DownstreamReRoute[0].ClaimsToClaims.Count);
result.DownstreamReRoute[0].ClaimsToHeaders.Count.ShouldBe(expected.DownstreamReRoute[0].ClaimsToHeaders.Count);
result.DownstreamReRoute[0].ClaimsToQueries.Count.ShouldBe(expected.DownstreamReRoute[0].ClaimsToQueries.Count);
result.DownstreamReRoute[0].RequestIdKey.ShouldBe(expected.DownstreamReRoute[0].RequestIdKey);
result.DownstreamReRoute[0].RequestIdKey.ShouldBe(expected.DownstreamReRoute[0].RequestIdKey);
}
}

View File

@ -111,7 +111,7 @@ namespace Ocelot.UnitTests.Configuration
}
}
private void GivenTheConfigurationIs(FileConfiguration fileConfiguration)
private void GivenTheConfigurationIs(FileConfiguration fileConfiguration)
{
var configurationPath = $"{AppContext.BaseDirectory}/configuration{(string.IsNullOrEmpty(_environmentName) ? string.Empty : ".")}{_environmentName}.json";

View File

@ -33,13 +33,11 @@ namespace Ocelot.UnitTests.Configuration
UpstreamHeaderTransform = new Dictionary<string, string>
{
{"Test", "Test, Chicken"},
{"Moop", "o, a"}
},
DownstreamHeaderTransform = new Dictionary<string, string>
{
{"Pop", "West, East"},
{"Bop", "e, r"}
}
};
@ -155,4 +153,4 @@ namespace Ocelot.UnitTests.Configuration
}
}
}
}
}

View File

@ -7,7 +7,6 @@ using Xunit;
namespace Ocelot.UnitTests.Configuration
{
public class HttpHandlerOptionsCreatorTests
{
private readonly IHttpHandlerOptionsCreator _httpHandlerOptionsCreator;

View File

@ -70,7 +70,7 @@ namespace Ocelot.UnitTests.Configuration
[Fact]
public void should_create_template_pattern_that_matches_anything_to_end_of_string()
{
var fileReRoute = new FileReRoute
var fileReRoute = new FileReRoute
{
UpstreamPathTemplate = "/api/products/{productId}",
ReRouteIsCaseSensitive = true
@ -181,4 +181,4 @@ namespace Ocelot.UnitTests.Configuration
_result.Priority.ShouldBe(v);
}
}
}
}