removed fake service tracer (#511)

* removed fake service tracer

* removed comments
This commit is contained in:
Tom Pallister
2018-07-30 22:44:07 +01:00
committed by GitHub
parent a5bb74a2ea
commit 049731b43b
8 changed files with 318 additions and 321 deletions

View File

@ -1,4 +1,6 @@
using System;
using Butterfly.Client.Tracing;
using Microsoft.Extensions.DependencyInjection;
using Moq;
using Ocelot.Infrastructure.RequestData;
using Ocelot.Requester;
@ -11,13 +13,18 @@ namespace Ocelot.UnitTests.Requester
{
private TracingHandlerFactory _factory;
private Mock<IServiceTracer> _tracer;
private IServiceCollection _serviceCollection;
private IServiceProvider _serviceProvider;
private Mock<IRequestScopedDataRepository> _repo;
public TracingHandlerFactoryTests()
{
_tracer = new Mock<IServiceTracer>();
_serviceCollection = new ServiceCollection();
_serviceCollection.AddSingleton<IServiceTracer>(_tracer.Object);
_serviceProvider = _serviceCollection.BuildServiceProvider();
_repo = new Mock<IRequestScopedDataRepository>();
_factory = new TracingHandlerFactory(_tracer.Object, _repo.Object);
_factory = new TracingHandlerFactory(_serviceProvider, _repo.Object);
}
[Fact]
@ -27,4 +34,4 @@ namespace Ocelot.UnitTests.Requester
handler.ShouldBeOfType<OcelotHttpTracingHandler>();
}
}
}
}