Removed unused usings, removed empty spaces, removed tons os warnings (#903)

This commit is contained in:
Thiago Loureiro
2019-05-28 11:00:54 +08:00
committed by GitHub
parent 4476f8273e
commit 5d82e68534
486 changed files with 3049 additions and 3143 deletions

View File

@ -1,13 +1,13 @@
using Xunit;
using Shouldly;
using Ocelot.Authorisation;
using Ocelot.Infrastructure.Claims.Parser;
using Moq;
using Ocelot.Authorisation;
using Ocelot.Errors;
using Ocelot.Infrastructure.Claims.Parser;
using Ocelot.Responses;
using Shouldly;
using System.Collections.Generic;
using System.Security.Claims;
using Ocelot.Responses;
using TestStack.BDDfy;
using Ocelot.Errors;
using Xunit;
namespace Ocelot.UnitTests.Infrastructure
{
@ -51,7 +51,7 @@ namespace Ocelot.UnitTests.Infrastructure
var fakeError = new FakeError();
this.Given(_ => GivenTheFollowing(new ClaimsPrincipal()))
.And(_ => GivenTheParserReturns(new ErrorResponse<List<string>>(fakeError)))
.And(_ => GivenTheFollowing(new List<string>(){"doesntmatter"}))
.And(_ => GivenTheFollowing(new List<string>() { "doesntmatter" }))
.When(_ => WhenIAuthorise())
.Then(_ => ThenTheFollowingIsReturned(new ErrorResponse<bool>(fakeError)))
.BDDfy();
@ -61,7 +61,7 @@ namespace Ocelot.UnitTests.Infrastructure
public void should_match_scopes_and_return_ok_result()
{
var claimsPrincipal = new ClaimsPrincipal();
var allowedScopes = new List<string>(){"someScope"};
var allowedScopes = new List<string>() { "someScope" };
this.Given(_ => GivenTheFollowing(claimsPrincipal))
.And(_ => GivenTheParserReturns(new OkResponse<List<string>>(allowedScopes)))
@ -76,8 +76,8 @@ namespace Ocelot.UnitTests.Infrastructure
{
var fakeError = new FakeError();
var claimsPrincipal = new ClaimsPrincipal();
var allowedScopes = new List<string>(){"someScope"};
var userScopes = new List<string>(){"anotherScope"};
var allowedScopes = new List<string>() { "someScope" };
var userScopes = new List<string>() { "anotherScope" };
this.Given(_ => GivenTheFollowing(claimsPrincipal))
.And(_ => GivenTheParserReturns(new OkResponse<List<string>>(userScopes)))
@ -112,12 +112,12 @@ namespace Ocelot.UnitTests.Infrastructure
_result.Data.ShouldBe(expected.Data);
_result.IsError.ShouldBe(expected.IsError);
}
}
public class FakeError : Error
{
public FakeError() : base("fake error", OcelotErrorCode.CannotAddDataError)
{
}
}
public class FakeError : Error
{
public FakeError() : base("fake error", OcelotErrorCode.CannotAddDataError)
{
}
}
}
}