Esempio n. 1
0
        public void WhenCallingEnableCustomDataItShouldSetupTheExpectedRouteAndHandler()
        {
            var httpConfiguration = new HttpConfiguration();
            var sc = new SwaggerUiConfig(new string[0], _ => "");

            sc.EnableCustomData(httpConfiguration, null);

            httpConfiguration.Routes.Count.Should().Be(1);
            var route = httpConfiguration.Routes[0];

            route.RouteTemplate.Should().Be("lsl-swaggerui-custom-data");
            route.Handler.Should().BeOfType <CustomDataHandler>();
        }