mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-05-01 20:42:51 +08:00

* #280 can now add response headers inc trace id, now need to consolidate the header place holder stuff * #280 changed port for linux tests * #280 lots of hacking around to handle errors and consolidate placeholders into one class
30 lines
821 B
C#
30 lines
821 B
C#
using Butterfly.Client.Tracing;
|
|
using Moq;
|
|
using Ocelot.Infrastructure.RequestData;
|
|
using Ocelot.Requester;
|
|
using Shouldly;
|
|
using Xunit;
|
|
|
|
namespace Ocelot.UnitTests.Requester
|
|
{
|
|
public class TracingHandlerFactoryTests
|
|
{
|
|
private TracingHandlerFactory _factory;
|
|
private Mock<IServiceTracer> _tracer;
|
|
private Mock<IRequestScopedDataRepository> _repo;
|
|
|
|
public TracingHandlerFactoryTests()
|
|
{
|
|
_tracer = new Mock<IServiceTracer>();
|
|
_repo = new Mock<IRequestScopedDataRepository>();
|
|
_factory = new TracingHandlerFactory(_tracer.Object, _repo.Object);
|
|
}
|
|
|
|
[Fact]
|
|
public void should_return()
|
|
{
|
|
var handler = _factory.Get();
|
|
handler.ShouldBeOfType<OcelotHttpTracingHandler>();
|
|
}
|
|
}
|
|
} |