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,14 +1,14 @@
using System;
using Microsoft.AspNetCore.Mvc;
using Moq;
using Ocelot.Configuration;
using Ocelot.Configuration.File;
using Ocelot.Configuration.Setter;
using Ocelot.Errors;
using Ocelot.Responses;
using Shouldly;
using System;
using TestStack.BDDfy;
using Xunit;
using Shouldly;
using Ocelot.Configuration;
namespace Ocelot.UnitTests.Controllers
{
@ -29,8 +29,8 @@ namespace Ocelot.UnitTests.Controllers
_repo = new Mock<IFileConfigurationRepository>();
_setter = new Mock<IFileConfigurationSetter>();
_controller = new FileConfigurationController(_repo.Object, _setter.Object, _provider.Object);
}
}
[Fact]
public void should_get_file_configuration()
{
@ -45,15 +45,15 @@ namespace Ocelot.UnitTests.Controllers
[Fact]
public void should_return_error_when_cannot_get_config()
{
var expected = new Responses.ErrorResponse<FileConfiguration>(It.IsAny<Error>());
this.Given(x => x.GivenTheGetConfigurationReturns(expected))
.When(x => x.WhenIGetTheFileConfiguration())
.Then(x => x.TheTheGetFileConfigurationIsCalledCorrectly())
.And(x => x.ThenTheResponseIs<BadRequestObjectResult>())
.BDDfy();
}
var expected = new Responses.ErrorResponse<FileConfiguration>(It.IsAny<Error>());
this.Given(x => x.GivenTheGetConfigurationReturns(expected))
.When(x => x.WhenIGetTheFileConfiguration())
.Then(x => x.TheTheGetFileConfigurationIsCalledCorrectly())
.And(x => x.ThenTheResponseIs<BadRequestObjectResult>())
.BDDfy();
}
[Fact]
public void should_post_file_configuration()
{
@ -103,8 +103,8 @@ namespace Ocelot.UnitTests.Controllers
}
private void ThenTheResponseIs<T>()
{
_result.ShouldBeOfType<T>();
{
_result.ShouldBeOfType<T>();
}
private void GivenTheGetConfigurationReturns(Ocelot.Responses.Response<FileConfiguration> fileConfiguration)
@ -120,16 +120,16 @@ namespace Ocelot.UnitTests.Controllers
}
private void TheTheGetFileConfigurationIsCalledCorrectly()
{
_repo
.Verify(x => x.Get(), Times.Once);
{
_repo
.Verify(x => x.Get(), Times.Once);
}
class FakeError : Error
private class FakeError : Error
{
public FakeError() : base(string.Empty, OcelotErrorCode.CannotAddDataError)
{
}
}
}
}
}