public void should_call_global_di_handlers() { var configuration = new FileConfiguration { ReRoutes = new List <FileReRoute> { new FileReRoute { DownstreamPathTemplate = "/", DownstreamScheme = "http", DownstreamHostAndPorts = new List <FileHostAndPort> { new FileHostAndPort { Host = "localhost", Port = 7187, } }, UpstreamPathTemplate = "/", UpstreamHttpMethod = new List <string> { "Get" }, } } }; this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:7187", "/", 200, "Hello from Laura")) .And(x => _steps.GivenThereIsAConfiguration(configuration)) .And(x => _steps.GivenOcelotIsRunningWithGlobalHandlersRegisteredInDi <FakeHandler, FakeHandlerTwo>()) .When(x => _steps.WhenIGetUrlOnTheApiGateway("/")) .Then(x => _steps.ThenTheStatusCodeShouldBe(HttpStatusCode.OK)) .And(x => _steps.ThenTheResponseBodyShouldBe("Hello from Laura")) .And(x => ThenTheHandlersAreCalledCorrectly()) .BDDfy(); }